libiec61850
1.2.0
|
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... | |
LinkedList | IedConnection_getFileDirectoryEx (IedConnection self, IedClientError *error, const char *directoryName, const char *continueAfter, bool *moreFollows) |
returns the directory entries of the specified file directory returned by a single file directory request. 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_setFilestoreBasepath (IedConnection, const char *basepath) |
Set the virtual filestore basepath for the setFile 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 |
LinkedList IedConnection_getFileDirectoryEx | ( | IedConnection | self, |
IedClientError * | error, | ||
const char * | directoryName, | ||
const char * | continueAfter, | ||
bool * | moreFollows | ||
) |
returns the directory entries of the specified file directory returned by a single file directory request.
This function will only create a single request and the result may only be the directory that fits into a single MMS PDU. If the server contains more directory entries, this will be indicated by setting the moreFollows variable (if provided by the caller). If the directory entry does not fit into a single MMS PDU the next part of the directory list can be requested by setting the continueAfter parameter with the value of the last filename of the received list.
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 |
continueAfter | last received filename to continue after, or NULL for the first request |
moreFollows | if provided by the caller (non NULL) the function will indicate if more directory entries are available. |
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 |
void IedConnection_setFilestoreBasepath | ( | IedConnection | , |
const char * | basepath | ||
) |
Set the virtual filestore basepath for the setFile service.
All external file service accesses will be mapped to paths relative to the base directory. NOTE: This function is only available when the CONFIG_SET_FILESTORE_BASEPATH_AT_RUNTIME option in stack_config.h is set.
self | the connection object |
basepath | the new virtual filestore basepath |