Static utility class for common Keba controller functionality and constants. More...
Static Public Member Functions | |
| static ? SignalType | MapKebaTypeToSignalType (string kebaType) |
| Maps Keba data types to realvirtual signal types. | |
| static string | MapSignalTypeToKebaType (SignalType signalType) |
| Maps realvirtual signal types to Keba data types. | |
| static bool | IsKebaTypeSupported (string kebaType) |
| Checks if a Keba data type is supported by realvirtual. | |
| static string[] | GetSupportedKebaTypes () |
| Gets all supported Keba data types. | |
| static string | GetCleanSignalName (string kebaVariableName) |
| Cleans a Keba variable name for use as Unity GameObject name. | |
| static bool | IsValidKebaVariablePath (string path) |
| Validates if a string is a valid Keba variable path. | |
| static KebaWebSocketMessage | CreateWebSocketMessage (int requestId, string command, object args) |
| Creates a Keba WebSocket message structure. | |
| static KebaCreateTopicArgs | CreateTopicArgs (string topicName) |
| Creates arguments for create_topic command. | |
| static KebaAddToTopicArgs | CreateAddToTopicArgs (string topicName, KebaTopicVariable[] variables, bool addNotFoundVars=true) |
| Creates arguments for add_to_topic command. | |
| static KebaSubscribeTopicArgs | CreateSubscribeTopicArgs (string topicName, int cycleTimeMs=DEFAULT_SUBSCRIPTION_CYCLE_MS, string protocol="default") |
| Creates arguments for subscribe_topic command. | |
| static KebaUnsubscribeTopicArgs | CreateUnsubscribeTopicArgs (string topicName) |
| Creates arguments for unsubscribe_topic command. | |
| static KebaTopicVariable | CreateTopicVariable (string variableName, bool onChange=true) |
| Creates topic variable configuration. | |
| static KebaWriteVarsArgs | CreateWriteVarsArgs (Dictionary< string, object > signalValues, Func< string, string > getKebaVarName) |
| Creates arguments for write_vars command with signal name to Keba variable name mapping. | |
| static KebaWriteVarsArgs | CreateWriteVarsArgs (IEnumerable< Signal > signals) |
| Creates arguments for write_vars command from signals. | |
| static string | BuildAuthUrl (string baseUrl, int httpPort) |
| Builds Keba authentication URL. | |
| static string | BuildWebSocketUrl (string baseUrl, int webSocketPort, string authToken) |
| Builds Keba WebSocket URL with authentication token. | |
| static string | BuildVariablesUrl (string baseUrl, int httpPort, string path, bool recursive) |
| Builds Keba variables API URL. | |
| static Dictionary< string, object > | CreateSignalMetadata (KebaVariable variable) |
| Creates standard metadata dictionary for Keba signals. | |
| static Dictionary< string, object > | CreateSignalMetadata (string variableName, string dataType, object value=null) |
| Creates metadata dictionary with custom values. | |
| static string | GetKebaVariableName (Signal signal) |
| Extracts Keba variable name from signal metadata. | |
| static string | GetKebaDataType (Signal signal) |
| Extracts Keba data type from signal metadata. | |
| static bool | ValidateConnectionParameters (string baseUrl, int httpPort, int webSocketPort, string username, string password, out string errorMessage) |
| Validates Keba controller connection parameters. | |
| static bool | ValidateTopicParameters (string topicName, int cycleTimeMs, out string errorMessage) |
| Validates topic subscription parameters. | |
| static string | FormatLogMessage (string operation, string details) |
| Creates formatted log message for Keba operations. | |
| static string | FormatErrorMessage (string operation, string error) |
| Creates formatted error message for Keba operations. | |
Static Public Attributes | |
| const int | DEFAULT_HTTP_PORT |
| Default HTTP port for Keba controllers. | |
| const int | DEFAULT_WEBSOCKET_PORT |
| Default WebSocket port for Keba controllers. | |
| const float | DEFAULT_CONNECTION_TIMEOUT |
| Default connection timeout in seconds. | |
| const int | DEFAULT_SUBSCRIPTION_CYCLE_MS |
| Default subscription cycle time in milliseconds. | |
| const int | DEFAULT_TOKEN_LIFETIME |
| Default authentication token lifetime in seconds (if not provided by server) | |
| const int | TOKEN_REFRESH_MARGIN |
| Token refresh margin in seconds (refresh this many seconds before expiration) | |
Detailed Description
Static utility class for common Keba controller functionality and constants.
Member Function Documentation
◆ BuildAuthUrl()
|
static |
Builds Keba authentication URL.
◆ BuildVariablesUrl()
|
static |
Builds Keba variables API URL.
◆ BuildWebSocketUrl()
|
static |
Builds Keba WebSocket URL with authentication token.
◆ CreateAddToTopicArgs()
|
static |
Creates arguments for add_to_topic command.
◆ CreateSignalMetadata() [1/2]
|
static |
Creates standard metadata dictionary for Keba signals.
◆ CreateSignalMetadata() [2/2]
|
static |
Creates metadata dictionary with custom values.
◆ CreateSubscribeTopicArgs()
|
static |
Creates arguments for subscribe_topic command.
◆ CreateTopicArgs()
|
static |
Creates arguments for create_topic command.
◆ CreateTopicVariable()
|
static |
Creates topic variable configuration.
◆ CreateUnsubscribeTopicArgs()
|
static |
Creates arguments for unsubscribe_topic command.
◆ CreateWebSocketMessage()
|
static |
Creates a Keba WebSocket message structure.
◆ CreateWriteVarsArgs() [1/2]
|
static |
Creates arguments for write_vars command with signal name to Keba variable name mapping.
◆ CreateWriteVarsArgs() [2/2]
|
static |
Creates arguments for write_vars command from signals.
◆ FormatErrorMessage()
|
static |
Creates formatted error message for Keba operations.
◆ FormatLogMessage()
|
static |
Creates formatted log message for Keba operations.
◆ GetCleanSignalName()
|
static |
Cleans a Keba variable name for use as Unity GameObject name.
◆ GetKebaDataType()
|
static |
Extracts Keba data type from signal metadata.
◆ GetKebaVariableName()
|
static |
Extracts Keba variable name from signal metadata.
◆ GetSupportedKebaTypes()
|
static |
Gets all supported Keba data types.
◆ IsKebaTypeSupported()
|
static |
Checks if a Keba data type is supported by realvirtual.
◆ IsValidKebaVariablePath()
|
static |
Validates if a string is a valid Keba variable path.
◆ MapKebaTypeToSignalType()
|
static |
Maps Keba data types to realvirtual signal types.
◆ MapSignalTypeToKebaType()
|
static |
Maps realvirtual signal types to Keba data types.
◆ ValidateConnectionParameters()
|
static |
Validates Keba controller connection parameters.
◆ ValidateTopicParameters()
|
static |
Validates topic subscription parameters.
Member Data Documentation
◆ DEFAULT_CONNECTION_TIMEOUT
|
static |
Default connection timeout in seconds.
◆ DEFAULT_HTTP_PORT
|
static |
Default HTTP port for Keba controllers.
◆ DEFAULT_SUBSCRIPTION_CYCLE_MS
|
static |
Default subscription cycle time in milliseconds.
◆ DEFAULT_TOKEN_LIFETIME
|
static |
Default authentication token lifetime in seconds (if not provided by server)
◆ DEFAULT_WEBSOCKET_PORT
|
static |
Default WebSocket port for Keba controllers.
◆ TOKEN_REFRESH_MARGIN
|
static |
Token refresh margin in seconds (refresh this many seconds before expiration)