Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cache proof of concept #2

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add cache proof of concept #2

wants to merge 1 commit into from

Conversation

sclaiborne
Copy link
Member

No description provided.

Comment on lines +57 to +68
struct cacheItem_typ {
std::string variable;
std::string alias;
std::string value;
VAR_TYPE_enum type;
void* address = 0; // This needs to be initialized to 0
size_t length;
size_t dimension;
cacheTime lastAccessed; // TODO: Maybe make it something other than a udint
std::vector<varTools::cacheSubscribe_typ> subscribers; // This may end up being a vector of pointers of cacheSubLink_typ
std::vector<varTools::cacheAuth_typ> authorization;
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
struct cacheItem_typ {
std::string variable;
std::string alias;
std::string value;
VAR_TYPE_enum type;
void* address = 0; // This needs to be initialized to 0
size_t length;
size_t dimension;
cacheTime lastAccessed; // TODO: Maybe make it something other than a udint
std::vector<varTools::cacheSubscribe_typ> subscribers; // This may end up being a vector of pointers of cacheSubLink_typ
std::vector<varTools::cacheAuth_typ> authorization;
};
struct cacheItem_typ {
std::string variable;
std::string alias;
std::string value;
VAR_TYPE_enum type;
void* address = 0; // This needs to be initialized to 0
size_t length;
size_t dimension;
cacheTime lastAccessed; // TODO: Maybe make it something other than a udint
std::vector<varTools::cacheSubscribe_typ> subscribers; // This may end up being a vector of pointers of cacheSubLink_typ
std::vector<varTools::cacheAuth_typ> authorization;
std::vector<UDINT> children;
};

Maybe check out link list or trees

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant