acplt/open62541 — pull request #121 by Stasik0 (2014-09-04 18:43:01+00:00)
Title: Generation hack

okay, a next try
```C
typedef struct UA_VariableNode {
UA_NodeId nodeId;
UA_NodeClass nodeClass;
UA_QualifiedName browseName;
UA_LocalizedText displayName;
UA_LocalizedText description;
UA_UInt32 writeMask;
UA_UInt32 userWriteMask;
UA_Int32 referencesSize;
UA_ReferenceNode* references;
UA_Variant value;
UA_NodeId dataType;
UA_Int32 valueRank;
UA_Int32 arrayDimensionsSize;
UA_UInt32* arrayDimensions;
UA_Byte accessLevel;
UA_Byte userAccessLevel;
UA_Double minimumSamplingInterval;
UA_Boolean historizing;
//I will not be seen on the wire, I will not be freed by _destroy
UA_Open62541Data* Open62541Data;
} UA_VariableNode;
```

The definition of UA_Open62541Data is hidden and will be used in ua_application.c like this
```
//FIXME: not tested
/*
struct UA_Open62541Data{
//FIXME: enum or union to come
UA_Int32(*readCallback)(const UA_NodeId* nodeid, UA_Int32 typeId, const UA_Variant* value);
UA_Int32(*writeCallback)(const UA_NodeId* nodeid, UA_Int32 typeId, const UA_Variant* value);
};
v->Open62541Data = (UA_Open62541Data*)malloc(sizeof(UA_Open62541Data));
free(namespaceArray->value.data)
*/
```

We will probably need to source out the definition into a ua_opaque types.c, since it will be used on different places: here and at least once
* in the binaryEncode function, just before encoding the value,
* or in the service just before reading the variable node
dunno yet. I'd probably go for calling callbacks form a service