libIEC61850
1.0.1
Open-source IEC 61850 MMS/GOOSE/SV server and client library
|
Typedefs | |
typedef struct sFileDirectoryEntry * | FileDirectoryEntry |
typedef bool(* | IedClientGetFileHandler) (void *parameter, uint8_t *buffer, uint32_t bytesRead) |
user provided handler to receive the data of the GetFile request More... | |
Functions | |
FileDirectoryEntry | FileDirectoryEntry_create (const char *fileName, uint32_t fileSize, uint64_t lastModified) |
void | FileDirectoryEntry_destroy (FileDirectoryEntry self) |
char * | FileDirectoryEntry_getFileName (FileDirectoryEntry self) |
uint32_t | FileDirectoryEntry_getFileSize (FileDirectoryEntry self) |
uint64_t | FileDirectoryEntry_getLastModified (FileDirectoryEntry self) |
LinkedList | IedConnection_getFileDirectory (IedConnection self, IedClientError *error, const char *directoryName) |
returns the directory entries of the specified file directory. More... | |
uint32_t | IedConnection_getFile (IedConnection self, IedClientError *error, const char *fileName, IedClientGetFileHandler handler, void *handlerParameter) |
Implementation of the GetFile ACSI service. More... | |
void | IedConnection_setFile (IedConnection self, IedClientError *error, const char *sourceFilename, const char *destinationFilename) |
Implementation of the SetFile ACSI service. More... | |
void | IedConnection_deleteFile (IedConnection self, IedClientError *error, const char *fileName) |
Implementation of the DeleteFile ACSI service. More... | |
typedef struct sFileDirectoryEntry* FileDirectoryEntry |
typedef bool(* IedClientGetFileHandler) (void *parameter, uint8_t *buffer, uint32_t bytesRead) |
user provided handler to receive the data of the GetFile request
This handler will be invoked whenever the clients receives a data block from the server. The API user has to copy the data to another location before returning. The other location could for example be a file in the clients file system.
parameter | user provided parameter |
buffer | pointer to the buffer containing the received data |
bytesRead | number of bytes available in the buffer |
FileDirectoryEntry FileDirectoryEntry_create | ( | const char * | fileName, |
uint32_t | fileSize, | ||
uint64_t | lastModified | ||
) |
void FileDirectoryEntry_destroy | ( | FileDirectoryEntry | self | ) |
char* FileDirectoryEntry_getFileName | ( | FileDirectoryEntry | self | ) |
uint32_t FileDirectoryEntry_getFileSize | ( | FileDirectoryEntry | self | ) |
uint64_t FileDirectoryEntry_getLastModified | ( | FileDirectoryEntry | self | ) |
void IedConnection_deleteFile | ( | IedConnection | self, |
IedClientError * | error, | ||
const char * | fileName | ||
) |
Implementation of the DeleteFile ACSI service.
Delete a file at the server.
self | the connection object |
error | the error code if an error occurs |
fileName | the name of the file to delete |
uint32_t IedConnection_getFile | ( | IedConnection | self, |
IedClientError * | error, | ||
const char * | fileName, | ||
IedClientGetFileHandler | handler, | ||
void * | handlerParameter | ||
) |
Implementation of the GetFile ACSI service.
Download a file from the server.
self | the connection object |
error | the error code if an error occurs |
fileName | the name of the file to be read from the server |
LinkedList IedConnection_getFileDirectory | ( | IedConnection | self, |
IedClientError * | error, | ||
const char * | directoryName | ||
) |
returns the directory entries of the specified file directory.
Requires the server to support file services.
NOTE: the returned linked list has to be freed by the user. You can user the following statement to free the list of directory entries:
LinkedList_destroyDeep(fileNames, (LinkedListValueDeleteFunction) FileDirectoryEntry_destroy);
where fileNames is the return value of this function.
self | the connection object |
error | the error code if an error occurs |
directoryName | the name of the directory or NULL to get the entries of the root directory |
void IedConnection_setFile | ( | IedConnection | self, |
IedClientError * | error, | ||
const char * | sourceFilename, | ||
const char * | destinationFilename | ||
) |
Implementation of the SetFile ACSI service.
Upload a file to the server. The file has to be available in the local VMD filestore.
self | the connection object |
error | the error code if an error occurs |
sourceFilename | the filename of the local (client side) file |
destinationFilename | the filename of the remote (service side) file |