ANSI C Based OPC UA Client/Server/PubSub SDK
1.9.1.442
|
Functions | |
OpcUa_StatusCode | UaServer_PubSub_SetCallback (UaServer *a_pUaServer, UaServer_PubSubCallbackInterface *a_pPubSubCallbackInterface) |
Sets the PubSub callback interface. More... | |
OpcUa_StatusCode | UaServer_PubSub_RegisterBackend (struct pubsub_backend *a_pPubSubBackend) |
Registers a custom network backend. More... | |
OpcUa_StatusCode | UaServer_PubSub_WriterGroup_Sample (pubsub_handle a_hWriterGroup) |
Creates a network message for a WriterGroup. More... | |
OpcUa_StatusCode | UaServer_PubSub_WriterGroup_Publish (pubsub_handle a_hWriterGroup) |
Sends the network message for a WriterGroup. More... | |
OpcUa_StatusCode | UaServer_PubSub_WriterGroup_Get (pubsub_handle a_hWriterGroup, const struct ua_writergroupdatatype **a_ppWriterGroup) |
Get the configuration structure for a WriterGroup. More... | |
OpcUa_StatusCode | UaServer_PubSub_DataSetWriter_Get (pubsub_handle a_hDataSetWriter, const struct ua_datasetwriterdatatype **a_ppDataSetWriter) |
Get the configuration structure for a DataSetWriter. More... | |
OpcUa_StatusCode | UaServer_PubSub_DataSetReader_Get (pubsub_handle a_hDataSetReader, const struct ua_datasetreaderdatatype **a_ppDataSetReader) |
Get the configuration structure for a DataSetReader. More... | |
OpcUa_StatusCode | UaServer_PubSub_PublishedDataSet_Get (pubsub_handle a_hDataSetWriter, const struct ua_publisheddatasetdatatype **a_ppPublishedDataSet) |
Get the configuration structure of a PublishedDataSet for a DataSetWriter. More... | |
OpcUa_StatusCode | UaServer_SetUserAuthenticationTypeEx (UaServer *a_pUaServer, UaServer_UserAuthType a_type, UaServer_AuthCallbackInterface *a_pAuthCallbackInterface) |
Sets the authentication type used in ActivateSession. More... | |
OpcUa_StatusCode | UaServer_SetCallback_SessionCreated (UaServer *a_pUaServer, UaServer_pfServer_SessionCreated a_pCallbackFunction) |
Sets the SessionCreated callback function. More... | |
OpcUa_StatusCode | UaServer_SetCallback_SessionActivated (UaServer *a_pUaServer, UaServer_pfServer_SessionActivated a_pCallbackFunction) |
Sets the SessionActivated callback function. More... | |
OpcUa_StatusCode | UaServer_SetCallback_SessionClosed (UaServer *a_pUaServer, UaServer_pfServer_SessionClosed a_pCallbackFunction) |
Sets the SessionClosed callback function. More... | |
OpcUa_StatusCode | UaServer_SetCallback_TranslateEventField (UaServer *a_pUaServer, UaServer_pfServer_TranslateEventField a_pCallbackFunction) |
Sets the TranslateEventField callback function. More... | |
OpcUa_StatusCode | UaServer_GetUserId (OpcUa_String *a_sUsername, OpcUa_uid_t *a_pUID, OpcUa_gid_t *a_pGID) |
Returns user identity information. More... | |
OpcUa_StatusCode | UaServer_GetGroupId (OpcUa_String *a_sGroupname, OpcUa_gid_t *a_pGID) |
Returns the GID for the given groupname. More... | |
OpcUa_StatusCode | UaServer_GetUserGroups (OpcUa_String *a_sUsername, OpcUa_UInt16 *a_piNoGroups, OpcUa_gid_t a_pGroups[]) |
Returns list of groups to which a user belongs. More... | |
OpcUa_StatusCode | UaServer_Initialize (UaServer *a_pUaServer) |
Initialize the UaServer object structure. More... | |
UaServer_Configuration * | UaServer_GetConfiguration (UaServer *a_pUaServer) |
Returns the configuration struct of the server. More... | |
OpcUa_StatusCode | UaServer_StartUp (UaServer *a_pUaServer) |
Start the UaServer to enable OPC UA connection establishment from clients. More... | |
OpcUa_StatusCode | UaServer_Shutdown (UaServer *a_pUaServer, OpcUa_UInt32 a_uSecondsTillShutdown, OpcUa_LocalizedText *a_pShutdownReason, OpcUa_Boolean a_bRestart) |
Shut the server down in the given number of seconds. More... | |
OpcUa_Void | UaServer_SetShutdownDelay (OpcUa_UInt32 a_uShutdownDelay) |
Sets the shutdown delay to use if the server gets shut down via shutdown keystrokes or signals. More... | |
OpcUa_Void | UaServer_Clear (UaServer *a_pUaServer) |
Cleans up application and used resources. More... | |
OpcUa_StatusCode | UaServer_DumpServerDiagnostics (OpcUa_ServerStatusDataType *a_pServerStatus, OpcUa_ServerDiagnosticsSummaryDataType *a_pServerDiagnosticsSummary, OpcUa_UInt32 *a_pNoOfSessionDiagnostics, OpcUa_SessionDiagnosticsDataType **a_ppSessionDiagnostics, OpcUa_UInt32 *a_pNoOfSessionSecurityDiagnostics, OpcUa_SessionSecurityDiagnosticsDataType **a_ppSessionSecurityDiagnostics, OpcUa_UInt32 *a_pNoOfSubscriptionDiagnostics, OpcUa_SubscriptionDiagnosticsDataType **a_ppSubscriptionDiagnostics) |
Fills the passed structures with the current diagnostic information of the server. More... | |
OpcUa_StatusCode | UaServer_Settings_GetConfigurationFromSettings (UaBase_Settings *pSettings, UaServer_Configuration *pServerConfiguration, const char *szHostname) |
Fill the server configuration object using the provided settings structure. More... | |
OpcUa_Void UaServer_Clear | ( | UaServer * | a_pUaServer | ) |
Cleans up application and used resources.
a_pUaServer | a pointer to the servers object. |
OpcUa_StatusCode UaServer_DumpServerDiagnostics | ( | OpcUa_ServerStatusDataType * | a_pServerStatus, |
OpcUa_ServerDiagnosticsSummaryDataType * | a_pServerDiagnosticsSummary, | ||
OpcUa_UInt32 * | a_pNoOfSessionDiagnostics, | ||
OpcUa_SessionDiagnosticsDataType ** | a_ppSessionDiagnostics, | ||
OpcUa_UInt32 * | a_pNoOfSessionSecurityDiagnostics, | ||
OpcUa_SessionSecurityDiagnosticsDataType ** | a_ppSessionSecurityDiagnostics, | ||
OpcUa_UInt32 * | a_pNoOfSubscriptionDiagnostics, | ||
OpcUa_SubscriptionDiagnosticsDataType ** | a_ppSubscriptionDiagnostics | ||
) |
Fills the passed structures with the current diagnostic information of the server.
Pass NULL for all structures that should not be filled.
UaServer_Configuration * UaServer_GetConfiguration | ( | UaServer * | a_pUaServer | ) |
Returns the configuration struct of the server.
[in] | a_pUaServer | The server to use |
OpcUa_StatusCode UaServer_GetGroupId | ( | OpcUa_String * | a_sGroupname, |
OpcUa_gid_t * | a_pGID | ||
) |
Returns the GID for the given groupname.
a_sGroupname | Name of the group. |
a_pGID | Numeric group ID to return. |
OpcUa_StatusCode UaServer_GetUserGroups | ( | OpcUa_String * | a_sUsername, |
OpcUa_UInt16 * | a_piNoGroups, | ||
OpcUa_gid_t | a_pGroups[] | ||
) |
Returns list of groups to which a user belongs.
a_sUsername | The username. |
a_piNoGroups | Number of groups. |
a_pGroups | Array of group IDs. |
OpcUa_StatusCode UaServer_GetUserId | ( | OpcUa_String * | a_sUsername, |
OpcUa_uid_t * | a_pUID, | ||
OpcUa_gid_t * | a_pGID | ||
) |
Returns user identity information.
a_sUsername | The username to lookup. |
a_pUID | The user id. |
a_pGID | The user's group id. |
OpcUa_StatusCode UaServer_Initialize | ( | UaServer * | a_pUaServer | ) |
OpcUa_StatusCode UaServer_PubSub_DataSetReader_Get | ( | pubsub_handle | a_hDataSetReader, |
const struct ua_datasetreaderdatatype ** | a_ppDataSetReader | ||
) |
Get the configuration structure for a DataSetReader.
[in] | a_hDataSetReader | Handle of the DataSetReader. |
[out] | a_ppDataSetReader | Configuration structure for the DataSetReader. |
OpcUa_StatusCode UaServer_PubSub_DataSetWriter_Get | ( | pubsub_handle | a_hDataSetWriter, |
const struct ua_datasetwriterdatatype ** | a_ppDataSetWriter | ||
) |
Get the configuration structure for a DataSetWriter.
[in] | a_hDataSetWriter | Handle of the DataSetWriter. |
[out] | a_ppDataSetWriter | Configuration structure for the DataSetWriter. |
OpcUa_StatusCode UaServer_PubSub_PublishedDataSet_Get | ( | pubsub_handle | a_hDataSetWriter, |
const struct ua_publisheddatasetdatatype ** | a_ppPublishedDataSet | ||
) |
Get the configuration structure of a PublishedDataSet for a DataSetWriter.
[in] | a_hDataSetWriter | Handle of the DataSetWriter. |
[out] | a_ppPublishedDataSet | Configuration structure for the PublishedDataSet. |
OpcUa_StatusCode UaServer_PubSub_RegisterBackend | ( | struct pubsub_backend * | a_pPubSubBackend | ) |
Registers a custom network backend.
[in] | a_pPubSubBackend | Interface of the custom network backend. |
OpcUa_StatusCode UaServer_PubSub_SetCallback | ( | UaServer * | a_pUaServer, |
UaServer_PubSubCallbackInterface * | a_pPubSubCallbackInterface | ||
) |
Sets the PubSub callback interface.
The callback interface provides callbacks for custom DataSetWriter message creation, custom DataSetReader message processing and custom WriterGroup timing handling.
[in] | a_pUaServer | A pointer to the UaServer object. |
[in] | a_pPubSubCallbackInterface | The callback interface. |
OpcUa_StatusCode UaServer_PubSub_WriterGroup_Get | ( | pubsub_handle | a_hWriterGroup, |
const struct ua_writergroupdatatype ** | a_ppWriterGroup | ||
) |
Get the configuration structure for a WriterGroup.
[in] | a_hWriterGroup | Handle of the WriterGroup. |
[out] | a_ppWriterGroup | Configuration structure for the WriterGroup. |
OpcUa_StatusCode UaServer_PubSub_WriterGroup_Publish | ( | pubsub_handle | a_hWriterGroup | ) |
Sends the network message for a WriterGroup.
[in] | a_hWriterGroup | Handle of the WriterGroup. |
OpcUa_StatusCode UaServer_PubSub_WriterGroup_Sample | ( | pubsub_handle | a_hWriterGroup | ) |
Creates a network message for a WriterGroup.
[in] | a_hWriterGroup | Handle of the WriterGroup. |
OpcUa_StatusCode UaServer_SetCallback_SessionActivated | ( | UaServer * | a_pUaServer, |
UaServer_pfServer_SessionActivated | a_pCallbackFunction | ||
) |
Sets the SessionActivated callback function.
This function was introduced in version 1.2.1.
[in] | a_pUaServer | A pointer to the UaServer object. |
[in] | a_pCallbackFunction | The function to call if a session was activated. |
OpcUa_StatusCode UaServer_SetCallback_SessionClosed | ( | UaServer * | a_pUaServer, |
UaServer_pfServer_SessionClosed | a_pCallbackFunction | ||
) |
Sets the SessionClosed callback function.
This function was introduced in version 1.2.1.
[in] | a_pUaServer | A pointer to the UaServer object. |
[in] | a_pCallbackFunction | The function to call if a session was closed. |
OpcUa_StatusCode UaServer_SetCallback_SessionCreated | ( | UaServer * | a_pUaServer, |
UaServer_pfServer_SessionCreated | a_pCallbackFunction | ||
) |
Sets the SessionCreated callback function.
This function was introduced in version 1.2.1.
[in] | a_pUaServer | A pointer to the UaServer object. |
[in] | a_pCallbackFunction | The function to call if a session was created. |
OpcUa_StatusCode UaServer_SetCallback_TranslateEventField | ( | UaServer * | a_pUaServer, |
UaServer_pfServer_TranslateEventField | a_pCallbackFunction | ||
) |
Sets the TranslateEventField callback function.
This function was introduced in version 1.7.0.
[in] | a_pUaServer | A pointer to the UaServer object. |
[in] | a_pCallbackFunction | The function to call if an EventField needs to be translated. |
OpcUa_Void UaServer_SetShutdownDelay | ( | OpcUa_UInt32 | a_uShutdownDelay | ) |
Sets the shutdown delay to use if the server gets shut down via shutdown keystrokes or signals.
By default, the shutdown delay is 3 seconds.
OpcUa_StatusCode UaServer_Settings_GetConfigurationFromSettings | ( | UaBase_Settings * | pSettings, |
UaServer_Configuration * | pServerConfiguration, | ||
const char * | szHostname | ||
) |
Fill the server configuration object using the provided settings structure.
The provided settings object is expected to contain settings described above.
pSettings | The settings to use. |
pServerConfiguration | The server configuration to set. |
szHostname | Optional: the string to replace [gethostname] placeholders with. |
OpcUa_StatusCode UaServer_SetUserAuthenticationTypeEx | ( | UaServer * | a_pUaServer, |
UaServer_UserAuthType | a_type, | ||
UaServer_AuthCallbackInterface * | a_pAuthCallbackInterface | ||
) |
Sets the authentication type used in ActivateSession.
[in] | a_pUaServer | A pointer to the UaServer object. |
[in] | a_type | The authentication type to set. |
[in] | a_pAuthCallbackInterface | Optional: If a custom authentication module should be set, a_type must be set to UserAuthType_User and the authentication callback interface containing the custom auth function pointers must be passed. If a_type is not set to UserAuthType_User, this parameter is ignored. |
OpcUa_StatusCode UaServer_Shutdown | ( | UaServer * | a_pUaServer, |
OpcUa_UInt32 | a_uSecondsTillShutdown, | ||
OpcUa_LocalizedText * | a_pShutdownReason, | ||
OpcUa_Boolean | a_bRestart | ||
) |
Shut the server down in the given number of seconds.
After a_uSecondsTillShutdown have passed, UaServer_DoCom will return with status OpcUa_BadShutdown or OpcUa_BadContinue, depending on the value of a_bRestart
.
a_pUaServer | A pointer to the server object. |
a_uSecondsTillShutdown | The number of seconds to wait until shutdown. |
a_pShutdownReason | The reason for shutdown. |
a_bRestart | Should the server restart after shutting down. If true, UaBase_DoCom will return OpcUa_BadContinue to inform the application that a restart is requested. |
OpcUa_StatusCode UaServer_StartUp | ( | UaServer * | a_pUaServer | ) |