|
FireSync API
|
Represents a FireSync node (sensor).
The kNode class supports sensor configuration and control. kNode objects are constructed and managed by the kSystem class, and can be accessed using functions such as kSystem_NodeCount and kSystem_NodeAt.
Node objects can transition through a variety of states (kNodeState), and the current state can be determined using the thread-safe kNode_State function. Node state can change as a result of actions performed using the kNode API, or from asynchronous changes in the remote device or network. The kNode_State function can be called at any time to inquire about the current state.
Immediately after discovery, a node will typically be in the Online state, indicating that the node is present in the network but not currently connected. In this state, only a handful of node functions can be used, including kNode_Id, kNode_Type, kNode_PlatformVersion, kNode_ProtocolVersion, kNode_DiscoveryIpConfig, kNode_SetDiscoveryIpConfig, and kNode_Connect.
For most other actions, a control connection must first be established to the node using the kNode_Connect or kSystem_Connect functions. Upon successful connection, a node will most often be in the Ready state, indicating that it is ready to accept additional commands. However, if the remote device implements an incompatible version of FireSync network protocols, it may be in the Incompatible state. In this state, only a few services are available, notably kNode_Info, kNode_Stop, kNode_LoadFirmware (or kNode_LoadFirmwareFromStream), and kNode_Storage.
In the event that a remote device experiences problems at boot time, it may load and run an alternate program image. This can be detected by examining the kNodeInfo.bootState field. The type of program image is not reflected in the node state; regardless of the source of the program, a node can exist any state (e.g., Ready, Incompatible).
A large variety of methods and sub-objects are available for sensor configuration. In general, the following sequence is often used for sensor configuration:
kNode methods are not thread-safe, except where noted. The same rule applies to all node sub-objects, such as cameras, event managers, or storage modules. However, separate nodes can safely be configured in parallel using separate threads. This approach can be advantageous in large systems, where sequential configuration is time consuming.
The following example illustrates a simple node configuration routine.

Public Member Functions | |
| kActions | kNode_Actions (kNode node) |
| Gets the actions configuration module. More... | |
| kStatus | kNode_AllowWatchdog (kNode node, kBool allow) |
| Specifies whether the watchdog can be enabled/disabled. More... | |
| kAnalogOut | kNode_AnalogOutAt (kNode node, kSize index) |
| Gets the analog output at the specified index. More... | |
| kSize | kNode_AnalogOutCount (kNode node) |
| Reports the number of analog outputs supported by this node. More... | |
| kStatus | kNode_Apply (kNode node) |
| Sends current settings to this node. More... | |
| const kChar * | kNode_AppName (kNode node) |
| Gets the name of the application running on this node. More... | |
| kVersion | kNode_AppVersion (kNode node) |
| Gets the application version running on this node. More... | |
| kBool | kNode_AutoExecuteEnabled (kNode node) |
| Reports whether firmware will execute automatically at boot time. More... | |
| kStatus | kNode_AutoExecuteEnabledInfo (kNode node, kInfoBool *info) |
| Reports constraint and validity information for the AutoExcecute setting. More... | |
| kStatus | kNode_BeginEngage (kNode node, k64u startTime, k64s startEncoder) |
| Initiates acquisition after BeginStart/EndStart. More... | |
| kStatus | kNode_BeginStart (kNode node) |
| Begins preparing node for acquisition and data processing activities. More... | |
| kStatus | kNode_BeginStop (kNode node, kBool synchronizeData) |
| Begins stopping node acquisition and data processing activities. More... | |
| kBootMode | kNode_BootMode (kNode node) |
| Gets the method that will be used to boot this device. More... | |
| kStatus | kNode_BootModeInfo (kNode node, kInfoBits *info) |
| Reports constraint and validity information for the BootMode setting. More... | |
| kCamera | kNode_CameraAt (kNode node, kSize index) |
| Gets the camera module at the specified index. More... | |
| kSize | kNode_CameraCount (kNode node) |
| Reports the number of camera modules supported by this node. More... | |
| kStatus | kNode_Clear (kNode node) |
| Restores mode settings to default values. More... | |
| kStatus | kNode_ClearCrashLog (kNode node) |
| Clears the crash log data stored on the device. More... | |
| kStatus | kNode_ClearEx (kNode node, kNodeClearOption options) |
| Restores the specified aspects of node state to default values. More... | |
| kStatus | kNode_ClearFirmware (kNode node, kNodeFirmwareType type) |
| Clears a firmware program from non-volatile storage. More... | |
| kStatus | kNode_ClearHealthLog (kNode node) |
| Clears the node health log. More... | |
| kStatus | kNode_CloseData (kNode node) |
| Closes the data connection to the remote node. More... | |
| kStatus | kNode_CloseHealth (kNode node) |
| Closes the health connection to the remote node. More... | |
| kStatus | kNode_Commit (kNode node) |
| Commits current settings to non-volatile storage, to be used as defaults after boot. More... | |
| kStatus | kNode_CommitDeviceConfig (kNode node) |
| Commits current device settings to non-volatile storage, to be used as defaults after boot. More... | |
| kStatus | kNode_CommitModeConfig (kNode node) |
| Commits current mode settings to non-volatile storage, to be used as defaults after boot. More... | |
| kStatus | kNode_Connect (kNode node) |
| Creates a control connection to the node. More... | |
| kBool | kNode_CrashLogEnabled (kNode node) |
| Reports whether firmware will enable crash logging facility. More... | |
| kStatus | kNode_CrashLogEnabledInfo (kNode node, kInfoBool *info) |
| Reports constraint and validity information for the EnableCrashLog setting. More... | |
| kDaughterboardModel | kNode_DaughterboardModel (kNode node) |
| Gets the model of the daughterboard. More... | |
| kStatus | kNode_DeleteVariable (kNode node, const kChar *name) |
| Disposes a remote variable with the specified name. More... | |
| kStatus | kNode_DeleteVariables (kNode node) |
| Disposes all remote variables. More... | |
| kDigitalOut | kNode_DigitalOutAt (kNode node, kSize index) |
| Gets the digital output at the specified index. More... | |
| kSize | kNode_DigitalOutCount (kNode node) |
| Reports the number of digital outputs supported by this node. More... | |
| kStatus | kNode_Disconnect (kNode node) |
| Disconnects the node's control connection. More... | |
| kStatus | kNode_DiscoveryIpConfig (kNode node, kIpConfig *ipConfig) |
| Gets the current IP configuration, as received via sensor discovery. More... | |
| kStatus | kNode_Enable (kNode node, kBool enable) |
| Enables or disables the node. More... | |
| kStatus | kNode_EnableAutoExecute (kNode node, kBool enable) |
| Enables automatic execution of firmware at boot time. More... | |
| kStatus | kNode_EnableCrashLog (kNode node, kBool enable) |
| Enables crash log facility. More... | |
| kStatus | kNode_EnableErrorRecovery (kNode node, kBool enable) |
| Enables automatic recovery from hardware/software errors (e.g. More... | |
| kStatus | kNode_EnableLightDriverHighPower (kNode node, kBool enable) |
| Enables light driver high power setting. More... | |
| kStatus | kNode_EnableRescueWait (kNode node, kBool enable) |
| Enables the feature to wait for a rescue message at boot time. More... | |
| kStatus | kNode_EnableSshd (kNode node, kBool enable) |
| Enables Secure Shell Daemon (SSHD). More... | |
| kEncoder | kNode_Encoder (kNode node) |
| Gets the encoder configuration module, if present. More... | |
| k64s | kNode_EncoderCounter (kNode node) |
| Gets the current encoder value from the node. More... | |
| kStatus | kNode_EndDataSession (kNode node) |
| Ends data collection until the next time that this node is started/resumed. More... | |
| kStatus | kNode_EndEngage (kNode node) |
| Completes an asynchronous engage operation that was initiated using the kNode_BeginEngage method. More... | |
| kStatus | kNode_EndStart (kNode node) |
| Completes an asynchronous start operation that was initiated using the kNode_BeginStart method. More... | |
| kStatus | kNode_EndStop (kNode node) |
| Completes an asynchronous stop operation that was initiated using the kNode_BeginStop method. More... | |
| kStatus | kNode_ErrorAt (kNode node, kSize index, kChar *error, kSize capacity) |
| Gets the verification error string at the specified index. More... | |
| kSize | kNode_ErrorCount (kNode node) |
| Returns the number of errors that were detected when the node was last verified. More... | |
| kBool | kNode_ErrorRecoveryEnabled (kNode node) |
| Reports whether automatic error recovery is enabled. More... | |
| kStatus | kNode_ErrorRecoveryEnabledInfo (kNode node, kInfoBool *info) |
| Reports constraint and validity information for the ErrorRecovery setting. More... | |
| kEventManager | kNode_EventManagerAt (kNode node, kSize index) |
| Gets the event manager at the specified index. More... | |
| kSize | kNode_EventManagerCount (kNode node) |
| Reports the number of event managers supported by this node. More... | |
| kStatus | kNode_ExportModeConfig (kNode node, const kChar *filePath) |
| Saves current mode configuration to the specified local file. More... | |
| kStatus | kNode_FindStat (kNode node, kHealthId id, k32u instance, k64s *value) |
| Gets the health statistic with the specified id and instance. More... | |
| kStatus | kNode_FindStatByName (kNode node, const kChar *name, k64s *value) |
| Gets the health statistic with the specified name. More... | |
| kStatus | kNode_FirmwareInfo (kNode node, kInfoBits *info) |
| Determines the types of firmware that can be loaded to the device. More... | |
| kGpioBank | kNode_GpioBankAt (kNode node, kSize index) |
| Gets the GPIO bank at the specified index. More... | |
| kSize | kNode_GpioBankCount (kNode node) |
| Reports the number of GPIO banks supported by this node. More... | |
| k64u | kNode_HealthLogPeriod (kNode node) |
| Reports the current health logging period. More... | |
| kStatus | kNode_HealthLogPeriodInfo (kNode node, kInfo64u *info) |
| Reports constraint and validity information for the health logging period setting. More... | |
| kStatus | kNode_I2cRead (kNode node, k32u deviceId, k32u address, kByte *data, kSize size) |
| Reads I2C register value. More... | |
| kStatus | kNode_I2cWrite (kNode node, k32u deviceId, k32u address, const kByte *data, kSize size) |
| Writes to I2C register. More... | |
| k32u | kNode_Id (kNode node) |
| Gets the current device identifier for this node, which typically corresponds to a manufacturing serial number. More... | |
| kStatus | kNode_ImportModeConfig (kNode node, const kChar *filePath) |
| Loads mode configuration from a local file. More... | |
| kStatus | kNode_IncrementInputCounter (kNode node) |
| Increments the node software input counter. More... | |
| kStatus | kNode_Info (kNode node, kNodeInfo *info) |
| Gets general information about this node. More... | |
| kIoTest | kNode_IoTestAt (kNode node, kSize index) |
| Gets the I/O test at the specified index. More... | |
| kSize | kNode_IoTestCount (kNode node) |
| Reports the number of I/O tests supported by this node. More... | |
| kBool | kNode_IsEnabled (kNode node) |
| Reports whether the node is currently enabled. More... | |
| kBool | kNode_IsServer (kNode node) |
| Reports whether the node handle is associated with a local server node. More... | |
| kLight | kNode_LightAt (kNode node, kSize index) |
| Gets the light module at the specified index. More... | |
| kSize | kNode_LightCount (kNode node) |
| Reports the number of light modules supported by this node. More... | |
| kBool | kNode_LightDriverHighPowerEnabled (kNode node) |
| Reports whether light driver high power is enabled. More... | |
| kStatus | kNode_LightDriverHighPowerInfo (kNode node, kInfoBool *info) |
| Reports constraint and validity information for the light driver high power setting. More... | |
| kStatus | kNode_ListVariables (kNode node, kArrayList variableNames) |
| Gets the list of custom variables available from this node. More... | |
| kStatus | kNode_LoadFirmware (kNode node, kNodeFirmwareType type, const kChar *path, kCallbackFx progress, kPointer context) |
| Loads firmware from a local file to non-volatile storage. More... | |
| kStatus | kNode_LoadFirmwareFromStream (kNode node, kNodeFirmwareType type, kStream stream, kSize size, kCallbackFx progress, kPointer context) |
| Loads firmware from a local stream to non-volatile storage. More... | |
| kStatus | kNode_LoadModeConfig (kNode node, const kChar *filePath) |
| Loads mode configuration from a file in node storage. More... | |
| kTempProbeId | kNode_MainTempProbe (kNode node) |
| Gets the primary source for temperature information used by this node. More... | |
| kStatus | kNode_MainTempProbeInfo (kNode node, kInfoBits *info) |
| Reports constraint and validity information for the MainTempProbe setting. More... | |
| kNet | kNode_Net (kNode node) |
| Gets the network configuration module. More... | |
| const kChar * | kNode_NetBootPath (kNode node) |
| Reports the FTP resource path used to fetch firmware during a network-based boot. More... | |
| kIpAddress | kNode_NetBootServer (kNode node) |
| Reports the IP address of the FTP server that will provide firmware during a network-based boot. More... | |
| k32u | kNode_NextId (kNode node) |
| Gets the device identifier that will take effect after reset. More... | |
| kStatus | kNode_NextIdInfo (kNode node, kInfo32u *info) |
| Reports constraint and validity information for the NextId setting. More... | |
| kStatus | kNode_OpenData (kNode node) |
| Opens a data connection to the remote node. More... | |
| kStatus | kNode_OpenHealth (kNode node) |
| Opens a health connection to the remote node. More... | |
| kOrientation | kNode_Orientation (kNode node) |
| Gets the orientation configuration module, if present. More... | |
| kVersion | kNode_OsVersion (kNode node) |
| Gets the operating system version running on this node. More... | |
| kStatus | kNode_Pause (kNode node) |
| (Deprecated) Function currently calls kNode_Stop. More... | |
| kPipe | kNode_Pipe (kNode node) |
| Gets the pipe configuration module. More... | |
| kVersion | kNode_PlatformVersion (kNode node) |
| Gets the platform version running on this node. More... | |
| k64u | kNode_PowerSaverThreshold (kNode node) |
| Gets the power saver threshold for all lights. More... | |
| kStatus | kNode_PowerSaverThresholdInfo (kNode node, kInfo64u *info) |
| Reports constraint and validity information for the power saver threshold setting. More... | |
| k64u | kNode_PowerSaverTimeout (kNode node) |
| Gets the power saver timeout for all lights. More... | |
| kStatus | kNode_PowerSaverTimeoutInfo (kNode node, kInfo64u *info) |
| Reports constraint and validity information for the power saver timeout setting. More... | |
| kProjector | kNode_ProjectorAt (kNode node, kSize index) |
| Gets the projector module at the specified index. More... | |
| kSize | kNode_ProjectorCount (kNode node) |
| Reports the number of projector modules supported by this node. More... | |
| kVersion | kNode_ProtocolVersion (kNode node) |
| Gets the protocol version support by this node. More... | |
| kStatus | kNode_ReadCrashLog (kNode node, kString *crashLog, kAlloc allocator) |
| Retrieves a crash log summary from the node. More... | |
| kStatus | kNode_ReadHealthLog (kNode node, kHealthSummary *summary, kAlloc alloc) |
| Reads and summarizes the node health log. More... | |
| kStatus | kNode_ReadLogHistory (kNode node, kArrayList logItems) |
| Gets a list of log messages. More... | |
| kStatus | kNode_ReadMemory (kNode node, kNodeMemorySpace space, k64u offset, kSize length, void *data) |
| Reads from the specified memory space. More... | |
| kStatus | kNode_ReadRegisterOverrides (kNode node, kRegisterModule moduleType, kArrayList registers) |
| Reads a list of register overrides for a given module type. More... | |
| kStatus | kNode_ReadRegisters (kNode node, kRegisterModule moduleType, kSize moduleIndex, kArrayList registers) |
| Gets a list of registers for a given module type and module index. More... | |
| kStatus | kNode_Refresh (kNode node) |
| Refreshes node state. More... | |
| kStatus | kNode_RefreshStats (kNode node) |
| Retrieves latest health statistics from the node. More... | |
| kStatus | kNode_ReloadFirmware (kNode node, kNodeFirmwareType type, const kChar *path) |
| Replaces currently running firmware without affecting non-volatile storage. More... | |
| kStatus | kNode_ReloadFirmwareFromStream (kNode node, kNodeFirmwareType type, kStream stream, kSize size) |
| Replaces currently running firmware without affecting non-volatile storage. More... | |
| kStatus | kNode_Replay (kNode node, kMsgInfo input, kArrayList output) |
| Replays an input message and waits to receive output. More... | |
| kStatus | kNode_Report (kNode node, kObject *report, kAlloc allocator) |
| Creates a report containing a description of current node state. More... | |
| kBool | kNode_RescueWaitEnabled (kNode node) |
| Reports whether the feature to wait for a rescue message at boot time is enabled. More... | |
| kStatus | kNode_RescueWaitEnabledInfo (kNode node, kInfoBool *info) |
| Reports constraint and validity information for the RescueWait setting. More... | |
| k64u | kNode_RescueWaitTimeout (kNode node) |
| Reports the current value for the RescueWait timeout setting. More... | |
| kStatus | kNode_RescueWaitTimeoutInfo (kNode node, kInfo64u *info) |
| Reports constraint and validity information for the RescueWait timeout setting. More... | |
| kStatus | kNode_Reset (kNode node, kBool defer=kFALSE) |
| Begins rebooting the node. More... | |
| kStatus | kNode_Restart (kNode node, kBool defer=kFALSE) |
| Begins restarting node application software. More... | |
| kStatus | kNode_Resume (kNode node) |
| (Deprecated) Function currently calls kNode_Start. More... | |
| kStatus | kNode_SaveAsVirtual (kNode node, const kChar *path) |
| Creates the necessary content in the local file system to support simulating this node. More... | |
| kStatus | kNode_SaveModeConfig (kNode node, const kChar *filePath) |
| Saves current mode configuration to the specified file. More... | |
| kStatus | kNode_SaveReport (kNode node, const kChar *filePath) |
| Saves a report containing a description of current node state to the specified file. More... | |
| kSerialOut | kNode_SerialOutAt (kNode node, kSize index) |
| Gets the serial output at the specified index. More... | |
| kSize | kNode_SerialOutCount (kNode node) |
| Reports the number of serial outputs supported by this node. More... | |
| kSvNode | kNode_Server (kNode node) |
| Gets the local server node handle associated with the specified client node handle. More... | |
| kStatus | kNode_SetBootMode (kNode node, kBootMode mode) |
| Sets the method that should be used to boot this device. More... | |
| kStatus | kNode_SetDateTime (kNode node, kDateTime dateTime) |
| Adjusts the date-time value that will be reported by the node. More... | |
| kStatus | kNode_SetDiscoveryIpConfig (kNode node, const kIpConfig *ipConfig) |
| Sets the current IP configuration via a sensor discovery broadcast. More... | |
| kStatus | kNode_SetHealthLogPeriod (kNode node, k64u period) |
| Sets the health logging period. More... | |
| kStatus | kNode_SetLedMode (kNode node, kLed instance, kLedMode mode) |
| Sets the given LED to the desired operational mode. More... | |
| kStatus | kNode_SetMainTempProbe (kNode node, kTempProbeId probeId) |
| Specifies the primary source for temperature information used by this node. More... | |
| kStatus | kNode_SetNetBootPath (kNode node, const kChar *path) |
| Sets the FTP resource path used to fetch firmware during a network-based boot. More... | |
| kStatus | kNode_SetNetBootServer (kNode node, kIpAddress address) |
| Sets the IP address of the FTP server that will provide firmware during a network-based boot. More... | |
| kStatus | kNode_SetNextId (kNode node, k32u id) |
| Sets the device identifier for this node, which typically corresponds to a manufacturing serial number. More... | |
| kStatus | kNode_SetPowerSaverThreshold (kNode node, k64u threshold) |
| Sets the power saver threshold for all lights. More... | |
| kStatus | kNode_SetPowerSaverTimeout (kNode node, k64u timeout) |
| Sets the power saver timeout for all lights. More... | |
| kStatus | kNode_SetRescueWaitTimeout (kNode node, k64u waitTimeout) |
| Sets the RescueWait timeout (us). More... | |
| kStatus | kNode_SetVariable (kNode node, const kChar *name, kObject variable) |
| Sets the value of a remote variable. More... | |
| kBool | kNode_SshdEnabled (kNode node) |
| Reports whether firmware will enable SSHD. More... | |
| kStatus | kNode_SshdEnabledInfo (kNode node, kInfoBool *info) |
| Reports constraint and validity information for the EnableSshd setting. More... | |
| kStatus | kNode_Start (kNode node) |
| Starts node acquisition and data processing activities. More... | |
| kStatus | kNode_StartReplay (kNode node) |
| Prepares node to begin receiving and processing replay data. More... | |
| const kHealthStat * | kNode_StatAt (kNode node, kSize index) |
| Gets the health statistic at the specified index. More... | |
| kSize | kNode_StatCount (kNode node) |
| Gets the number of available health statistics. More... | |
| kNodeState | kNode_State (kNode node) |
| Reports the current state of the node. More... | |
| kStatus | kNode_Stats (kNode node, kNodeStats *stats) |
| Reports a selection of top-level run-time statistics for the node. More... | |
| kStatus | kNode_Stop (kNode node) |
| Stops node acquisition and data processing activities. More... | |
| kStorage | kNode_Storage (kNode node) |
| Gets the storage module. More... | |
| kStatus | kNode_SubscribeData (kNode node, const k16u *ports, kSize portCount) |
| Sets the network data output ports to which this client should connect. More... | |
| kTempControl | kNode_TempControl (kNode node) |
| Gets the temperature control configuration module, if present. More... | |
| kTestJig | kNode_TestJig (kNode node) |
| Gets the test jig configuration module, if present. More... | |
| k64u | kNode_TimeCounter (kNode node) |
| Gets the current synchronization time value from the node. More... | |
| kNodeType | kNode_Type (kNode node) |
| Gets the type of this node. More... | |
| kStatus | kNode_Variable (kNode node, const kChar *name, kObject *variable, kAlloc alloc) |
| Gets the value of the specified remote variable. More... | |
| kStatus | kNode_VariableInfo (kNode node, const kChar *name, kNodeVariableInfo *info) |
| Gets information about a custom variable. More... | |
| kStatus | kNode_Verify (kNode node) |
| Checks the validity of all node settings. More... | |
| kStatus | kNode_VerifyAndApply (kNode node) |
| Checks for errors and applies settings if no errors are detected. More... | |
| kStatus | kNode_WarningAt (kNode node, kSize index, kChar *warning, kSize capacity) |
| Gets the verification warning string at the specified index. More... | |
| kSize | kNode_WarningCount (kNode node) |
| Returns the number of warnings that were detected when the node was last verified. More... | |
| kBool | kNode_WatchdogAllowed (kNode node) |
| Reports whether watchdog feature is allowed to be enabled/disabled. More... | |
| kStatus | kNode_WatchdogAllowedInfo (kNode node, kInfoBool *info) |
| Reports constraint and validity information for the AllowWatchdog setting. More... | |
| kStatus | kNode_Wipe (kNode node) |
| Resets device settings and storage contents to defaults. More... | |
| kStatus | kNode_WriteMemory (kNode node, kNodeMemorySpace space, k64u offset, kSize length, const void *data) |
| Writes to the specified memory space. More... | |
| kStatus | kNode_WriteRegisterOverrides (kNode node, kRegisterModule moduleType, kArrayList registers) |
| Writes a list of registers overrides for a given module type. More... | |
| kStatus | kSystem_VerifyAndApply (kSystem system) |
| Checks for errors and applies settings if no errors are detected. More... | |