ANSI C Based OPC UA Client/Server/PubSub SDK
1.9.3.467
|
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_VerifyEndpointsConfiguration (UaServer_Configuration *a_pConfig) |
Verify Endpoints Configuration. More... | |
OpcUa_StatusCode | UaServer_StartUpEndpoint (UaServer_Configuration *a_pConfig, OpcUa_UInt32 a_uIndex) |
Startup Endpoint. More... | |
OpcUa_StatusCode | UaServer_StartUp (UaServer *a_pUaServer) |
Start the UaServer to enable OPC UA connection establishment from clients. More... | |
OpcUa_StatusCode | UaServer_EndpointsRestart (UaServer_pfServer_EndpointsStartStopStateCB a_pCallback, OpcUa_Handle a_hCallbackData) |
Restart Endpoints with current settings. More... | |
OpcUa_StatusCode | UaServer_EndpointsStop (UaServer_pfServer_EndpointsStartStopStateCB a_pCallback, OpcUa_Handle a_hCallbackData) |
Stop Endpoints. More... | |
OpcUa_StatusCode | UaServer_EndpointsStart (void) |
Start Endpoints. More... | |
OpcUa_StatusCode | UaServer_EndpointsStartStop_CloseEndpoints (void) |
Close Endpoints. More... | |
OpcUa_StatusCode | UaServer_EndpointsStartStop_OpenEndpoints (void) |
Open Endpoints. 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.
OpcUa_StatusCode UaServer_EndpointsRestart | ( | UaServer_pfServer_EndpointsStartStopStateCB | a_pCallback, |
OpcUa_Handle | a_hCallbackData | ||
) |
Restart Endpoints with current settings.
Closes all Endpoints and re-opens those. It works async and the state is reported through the callback passed to the function.
It enables loading of updated server certificate, private key and endpoint settings.
a_pCallback | pointer to the callback for reporting the progress and status. |
a_hCallbackData | user data for the callback |
OpcUa_StatusCode UaServer_EndpointsStart | ( | void | ) |
Start Endpoints.
It re-opens all Endpoints closed due to Stop Endpoints triggered earlier. The state is reported through the callback passed to Stop Endpoints triggered earlier.
It enables re-opening of Endpoints with updated config, server certificate and private key.
OpcUa_StatusCode UaServer_EndpointsStartStop_CloseEndpoints | ( | void | ) |
Close Endpoints.
OpcUa_StatusCode UaServer_EndpointsStartStop_OpenEndpoints | ( | void | ) |
Open Endpoints.
OpcUa_StatusCode UaServer_EndpointsStop | ( | UaServer_pfServer_EndpointsStartStopStateCB | a_pCallback, |
OpcUa_Handle | a_hCallbackData | ||
) |
Stop Endpoints.
It closes all Endpoints. It works async and the state is reported through the callback passed to the function.
It enables Endpoints config changes. Endpoints config changes can be made after Stop Endpoints is completed. Then the Endpoints should be re-opened through UaServer_EndpointsStart.
a_pCallback | pointer to the callback for reporting the progress and status. |
a_hCallbackData | user data for the callback |
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 | ) |
OpcUa_StatusCode UaServer_StartUpEndpoint | ( | UaServer_Configuration * | a_pConfig, |
OpcUa_UInt32 | a_uIndex | ||
) |
Startup Endpoint.
a_pConfig | a pointer to the UaServer Configuration. |
a_uIndex | endpoint index. |
OpcUa_StatusCode UaServer_VerifyEndpointsConfiguration | ( | UaServer_Configuration * | a_pConfig | ) |
Verify Endpoints Configuration.
a_pConfig | a pointer to the UaServer Configuration. |