ANSI C Based OPC UA Client/Server/PubSub SDK  1.9.1.442
UaBasePlatformUtilities

Functions

OpcUa_StatusCode UaBase_P_DateTime_ToMilliseconds (OpcUa_DateTime dateTime, OpcUa_UInt32 *pResult)
 Calculate the difference between two OpcUa_DateTime values. More...
 
OpcUa_DateTime UaBase_P_DateTime_Diff (OpcUa_DateTime value1, OpcUa_DateTime value2)
 Get the difference of two OpcUa_DateTime. More...
 
OpcUa_Void UaBase_P_Sleep (OpcUa_Int nMilliseconds)
 Let the server sleep for a fixed time. More...
 
OpcUa_Int32 UaBase_P_Abs (OpcUa_Int32 a_Value)
 Get the abs value. More...
 
OpcUa_Double UaBase_P_FAbs (OpcUa_Double a_Value)
 Get the fabs value. More...
 
OpcUa_Int32 UaBase_P_StrToL (const OpcUa_CharA *s, OpcUa_Byte base)
 Convert a string to long. More...
 
OpcUa_UInt32 UaBase_P_StrToUL (const OpcUa_CharA *s, OpcUa_Byte base)
 Convert a string to unsigned long. More...
 
OpcUa_Double UaBase_P_StrToD (const OpcUa_CharA *s)
 Convert a string to double. More...
 
OpcUa_Float UaBase_P_StrToF (const OpcUa_CharA *s)
 Convert a string to float. More...
 
OpcUa_CharA * UaBase_P_StrDup (const OpcUa_CharA *s)
 Duplicate a string. More...
 
OpcUa_StatusCode UaBase_P_TimeTFromDateTime (OpcUa_DateTime *a_pDateTime, time_t *a_pTime)
 Converts OpcUa_DateTime to time_t. More...
 
OpcUa_Boolean UaBase_P_IsShutdownHandlerRegistered ()
 Returns OpcUa_True if the shutdown keystroke/signal handler was registered.
 
OpcUa_StatusCode UaBase_P_RegisterShutdownHandler ()
 Initializes the check for shutdown keystrokes/signals If this function was called, the server SDK will automatically react to shutdown keystrokes/signals by returning a bad status code after the configured shutdown delay (see UaServer_SetShutdownDelay). More...
 
OpcUa_Boolean UaBase_P_ShouldShutdown ()
 Checks if the shutdown keystroke/signal was triggered by the user. More...
 
OpcUa_Boolean UaBase_P_ShouldRestart ()
 Checks if the restart keystroke/signal was triggered by the user. More...
 
OpcUa_StatusCode UaBase_P_UnregisterShutdownHandler ()
 Cleans up the check for shutdown keystrokes/signals. More...
 
OpcUa_StatusCode UaBase_P_InitShutdownFlag ()
 
OpcUa_Boolean UaBase_P_IsShutdownFlagSet ()
 
OpcUa_Boolean UaBase_P_IsRestartFlagSet ()
 
OpcUa_StatusCode UaBase_P_ClearShutdownFlag ()
 
static __inline int UaBase_Atomic_Increment (volatile int *pointer)
 Atomically increments the int pointed to by pointer. More...
 
static __inline int UaBase_Atomic_Decrement (volatile int *pointer)
 Atomically decrements the int pointed to by pointer. More...
 
static __inline int UaBase_Atomic_Get (volatile int *pointer)
 Atomically returns the int pointed to by pointer. More...
 

Detailed Description

Function Documentation

static __inline int UaBase_Atomic_Decrement ( volatile int *  pointer)
static

Atomically decrements the int pointed to by pointer.

Parameters
pointerPointer to the int to decrement.
Returns
The value of pointer after the decrement.
static __inline int UaBase_Atomic_Get ( volatile int *  pointer)
static

Atomically returns the int pointed to by pointer.

Parameters
pointerPointer to the int to return.
Returns
The value of pointer.
static __inline int UaBase_Atomic_Increment ( volatile int *  pointer)
static

Atomically increments the int pointed to by pointer.

Parameters
pointerPointer to the int to increment.
Returns
The value of pointer after the increment.
OpcUa_Int32 UaBase_P_Abs ( OpcUa_Int32  a_Value)

Get the abs value.

Parameters
a_Valuea value as an integer.
Returns
the abs value.
OpcUa_StatusCode UaBase_P_ClearShutdownFlag ( )
Deprecated:
Use UaBase_P_UnregisterShutdownHandler instead.
OpcUa_DateTime UaBase_P_DateTime_Diff ( OpcUa_DateTime  value1,
OpcUa_DateTime  value2 
)

Get the difference of two OpcUa_DateTime.

Parameters
value1The first OpcUa_DateTime.
value2The second OpcUa_DateTime.
Returns
The result of subtracting value2 from value1.
OpcUa_StatusCode UaBase_P_DateTime_ToMilliseconds ( OpcUa_DateTime  dateTime,
OpcUa_UInt32 *  pResult 
)

Calculate the difference between two OpcUa_DateTime values.

Parameters
dateTimeFirst operand.
pResultSecond operand.
Returns
the OPC UA Status code.
OpcUa_Double UaBase_P_FAbs ( OpcUa_Double  a_Value)

Get the fabs value.

Parameters
a_Valuea value as an double.
Returns
the fabs value.
OpcUa_StatusCode UaBase_P_InitShutdownFlag ( )
Deprecated:
Use UaBase_P_RegisterShutdownHandler instead.
OpcUa_Boolean UaBase_P_IsRestartFlagSet ( )
Deprecated:
Use UaBase_P_ShouldRestart instead.
OpcUa_Boolean UaBase_P_IsShutdownFlagSet ( )
Deprecated:
Use UaBase_P_ShouldShutdown instead.
OpcUa_StatusCode UaBase_P_RegisterShutdownHandler ( )

Initializes the check for shutdown keystrokes/signals If this function was called, the server SDK will automatically react to shutdown keystrokes/signals by returning a bad status code after the configured shutdown delay (see UaServer_SetShutdownDelay).

The client SDK will not react to shutdown keystrokes/signals automatically, this has to be implemented by the application using UaBase_P_ShouldShutdown and/or UaBase_P_ShouldRestart.

Returns
OpcUa_Good on success.
OpcUa_Boolean UaBase_P_ShouldRestart ( )

Checks if the restart keystroke/signal was triggered by the user.

Returns
OpcUa_True if the keystroke/signal was triggered.
OpcUa_Boolean UaBase_P_ShouldShutdown ( )

Checks if the shutdown keystroke/signal was triggered by the user.

Returns
OpcUa_True if the keystroke/signal was triggered.
OpcUa_Void UaBase_P_Sleep ( OpcUa_Int  nMilliseconds)

Let the server sleep for a fixed time.

Parameters
nMillisecondsthe interval for the server to sleep.
OpcUa_CharA* UaBase_P_StrDup ( const OpcUa_CharA *  s)

Duplicate a string.

Parameters
sThe string to duplicate
Returns
The duplicated string, ensured to be zero terminated.
OpcUa_Double UaBase_P_StrToD ( const OpcUa_CharA *  s)

Convert a string to double.

Parameters
sThe string to convert
Returns
The converted double
OpcUa_Float UaBase_P_StrToF ( const OpcUa_CharA *  s)

Convert a string to float.

Parameters
sThe string to convert
Returns
The converted float
OpcUa_Int32 UaBase_P_StrToL ( const OpcUa_CharA *  s,
OpcUa_Byte  base 
)

Convert a string to long.

Parameters
sThe string to convert
baseThe base of the number in the string
Returns
The converted long
OpcUa_UInt32 UaBase_P_StrToUL ( const OpcUa_CharA *  s,
OpcUa_Byte  base 
)

Convert a string to unsigned long.

Parameters
sThe string to convert
baseThe base of the number in the string
Returns
The converted unsigned long
OpcUa_StatusCode UaBase_P_TimeTFromDateTime ( OpcUa_DateTime a_pDateTime,
time_t *  a_pTime 
)

Converts OpcUa_DateTime to time_t.

Parameters
a_pDateTimeTime to convert.
a_pTimeGiven time in time_t format.
Returns
OpcUa_Good on success, error if the conversion failed.
OpcUa_StatusCode UaBase_P_UnregisterShutdownHandler ( )

Cleans up the check for shutdown keystrokes/signals.

Returns
OpcUa_Good on success.