0

In OPC UA embedded stack, some libraries exist already, the task is to implement the callback functions to facilitate the server with data access capability..

For historical access, for instance, the historical data for a specific node (node_handle) is saved in a file, to read the historical data of that node, following callback functions are provided

UA_Status_t  UAServer_Callback_File_Open( uint32_t node_handle, uint8_t mode, uint32_t* file_handle){

}

UASErver_Callback_File_Write(uint32_t node_handle,uint32_t file_handle, UA_Byte_String_t * data) 

The question is, how to implement this? What is the format for the file, that is suggested? uint32_t file_handle, does this mean, the file is like a array with the element of type uint32_t

In C, when I want to open a file. we use FILE * fopen( const char* file_name, const char * mode), the file is a binary file, but how this fopen is implemented is dependent on the kernel system

Thank you in advance

Laurent LA RIZZA
  • 2,905
  • 1
  • 23
  • 41

1 Answers1

0

Does it suggest, the file is actually an array of type uint32_t?

  • Which version of the stack are you using ? The stack is only the communication protocol, I guess how it could include some I/O code... Are you maybe more using a SDK ? (Unified Automation`s one maybe ?) – Camille G. Sep 30 '13 at 08:09
  • yes, it is a SDK, but not from Unified Automation, it is from Matrikon OPC UA embedded stack for micro-controller programming. – user1798597 Sep 30 '13 at 14:59
  • How the callback is registered. Could you provide more code ? Specially the callback function... – Camille G. Oct 01 '13 at 07:53
  • They are registered in the library, the library is polled periodically in response to server-client activity...And the host implement the callback function in response to the call from the library.. – user1798597 Oct 07 '13 at 11:05