8 #ifndef K_FIRESYNC_HX_NODE_H
9 #define K_FIRESYNC_HX_NODE_H
20 #include <kFireSync/Hardware/kHxNode.x.h>
115 return xkHxNode_VTable(node)->VLoadApp(node, library);
129 return obj->hasStorage;
143 return obj->netInterfaceCount;
157 return kString_Chars(obj->storagePath);
170 return xkHxNode_VTable(node)->VSetMessageAlloc(node, allocator);
291 return obj->minHealthLogPeriod;
314 *priorityClass = obj->healthLogPriorityClass;
315 *priorityOffset = obj->healthLogPriorityOffset;
329 return xkHxNode_VTable(node)->VHealth(node);
351 obj->restartRequested =
kTRUE;
367 return obj->restartRequested;
425 return obj->hasWatchdog;
448 return xkHxNode_VTable(node)->VEnableWatchdog(node, enable, timeoutPeriod);
467 return xkHxNode_VTable(node)->VUpdateWatchdog(node, reason);
482 return xkHxNode_VTable(node)->VClear(node);
494 return xkHxNode_VTable(node)->VStart(node);
509 return xkHxNode_VTable(node)->VEngage(node, startTime, startEncoder, maintainPhase);
523 return xkHxNode_VTable(node)->VDisengage(node);
535 return xkHxNode_VTable(node)->VStop(node);
551 return xkHxNode_VTable(node)->VClearStats(node);
568 return xkHxNode_VTable(node)->VWaitForRecoveryEvent(node, timeout);
596 return obj->nodeType;
628 return xkHxNode_VTable(node)->VSetNextId(node,
id);
642 return obj->mainProbe;
657 obj->mainProbe = probeId;
679 *config = obj->ipConfig[index];
697 *config = obj->nextIpConfig[index];
718 return xkHxNode_VTable(node)->VSetNextIpConfig(node, index, config);
734 return xkHxNode_VTable(node)->VWaitForNetworkOnline(node);
754 return xkHxNode_VTable(node)->VDynamicIpConfig(node, index, config);
772 *address = obj->macAddress[index];
792 return xkHxNode_VTable(node)->VSetBootConfig(node, config);
806 return obj->powerSaverTimeout;
821 obj->powerSaverTimeout = timeout;
837 return obj->powerSaverThreshold;
852 obj->powerSaverThreshold = threshold;
868 return obj->lightDriverHighPowerEnabled;
883 obj->lightDriverHighPowerEnabled = enabled;
885 return xkHxNode_VTable(node)->VEnableLightDriverHighPower(node, enabled);
900 *config = obj->bootConfig;
917 return obj->networkSpeed[index];
932 return obj->nextNetworkSpeed[index];
951 return xkHxNode_VTable(node)->VSetNextNetworkSpeed(node, index, speed);
966 return obj->networkSpeedCapabilities[index];
981 return obj->defaultNetworkSpeed[index];
995 return xkHxNode_VTable(node)->VSetNetworkTransmitRate(node, index, rate);
1008 return xkHxNode_VTable(node)->VNetworkTransmitRate(node, index);
1023 return obj->networkTransmitRateSupported[index];
1038 return xkHxNode_VTable(node)->VCommitConfig(node);
1051 return xkHxNode_VTable(node)->VClearFirmware(node, type);
1070 return xkHxNode_VTable(node)->VWriteFirmware(node, type, stream, size, progress, context);
1087 return xkHxNode_VTable(node)->VReloadFirmware(node, type, stream, size);
1139 return obj->cpuCount;
1154 return xkHxNode_VTable(node)->VLogEx(node, options, source, message);
1201 return xkHxNode_VTable(node)->VGetCrashLog(node, crashLog, allocator);
1213 return xkHxNode_VTable(node)->VClearCrashLog(node);
1227 return xkHxNode_VTable(node)->VSetCrashLogAppInfo(node, version, nodeId);
1242 return xkHxNode_VTable(node)->VStats(node, stats);
1258 return xkHxNode_VTable(node)->VPlLoaded(node);
1274 return obj->mainPlVersion;
1290 return obj->mainPlConfig;
1306 return xkHxNode_VTable(node)->VPl2Loaded(node);
1322 return obj->secondaryPlVersion;
1338 return obj->secondaryPlConfig;
1354 return obj->daughterboardModel;
1359 return xkHxNode_VTable(node)->VReadMemory(node, space, offset, length, data);
1364 return xkHxNode_VTable(node)->VWriteMemory(node, space, offset, length, data);
1369 return xkHxNode_VTable(node)->VReadRegisters(node, moduleType, moduleIndex, registers);
1374 return xkHxNode_VTable(node)->VReadRegisterOverrides(node, moduleType, registers);
1379 return xkHxNode_VTable(node)->VWriteRegisterOverrides(node, moduleType, registers);
1384 return xkHxNode_VTable(node)->VI2cRead(node, deviceId, address, data, size);
1389 return xkHxNode_VTable(node)->VI2cWrite(node, deviceId, address, data, size);
1394 return xkHxNode_VTable(node)->VBeginSpi(node, deviceType);
1399 return xkHxNode_VTable(node)->VEndSpi(node);
1404 return xkHxNode_VTable(node)->VSpiRead(node, opCode, opSize, data, dataSize);
1409 return xkHxNode_VTable(node)->VSpiWrite(node, opCode, opSize, data, dataSize);
1414 return xkHxNode_VTable(node)->VSetTempControl(node, temp);
1419 return xkHxNode_VTable(node)->VTempControl(node, temp);
1426 return kArrayList_Count(obj->eventManagers);
1440 return kArrayList_Count(obj->cameras);
1454 return kArrayList_Count(obj->lights);
1468 return kArrayList_Count(obj->digitalOutputs);
1475 return kArrayList_AsT(obj->digitalOutputs, index, kHxDigitalOut);
1482 return kArrayList_Count(obj->analogOutputs);
1496 return kArrayList_Count(obj->serialOutputs);
1510 return kArrayList_Count(obj->projectors);
1524 return kArrayList_Count(obj->ioTests);
1538 return obj->encoder;
1552 return obj->testJig;
1557 return xkHxNode_VTable(node)->VEnableLed(node, instance, enabled);
1564 return obj->controllerType;
1569 return xkHxNode_VTable(node)->VEncoderCounter(node);
1574 return xkHxNode_VTable(node)->VTimeCounter(node);
1593 return obj->hasPeltier;
1600 return obj->hasExternalTempProbe;
1607 return obj->fanCount;
1614 return obj->cameraDataBandwidth;
1627 return xkHxNode_VTable(node)->VSetSyncSource(node, source);
1641 return obj->syncSource;
1646 return xkHxNode_VTable(node)->VSetEventHandler(node,
function, receiver, eventAlloc);
1651 return xkHxNode_VTable(node)->VSetLightDriverControl(node, key, index, enabled);
1656 return xkHxNode_VTable(node)->VGetLightDriverControl(node, key, index, enabled);
1661 return xkHxNode_VTable(node)->VSetLightDriverPower(node, key, index, power, commit);
1666 return xkHxNode_VTable(node)->VGetLightDriverPower(node, key, index, power);
1671 return xkHxNode_VTable(node)->VSetLightDriverCurrentLimit(node, key, index, currentLimit, commit);
1676 return xkHxNode_VTable(node)->VGetLightDriverCurrentLimit(node, key, index, currentLimit);
1681 return xkHxNode_VTable(node)->VGetLightDriverRemainingSlotCount(node, key, index, remainingCount);
1686 return xkHxNode_VTable(node)->VSetLightDriverInfo(node, key, index, model, revision, deviceId);
1691 return xkHxNode_VTable(node)->VGetLightDriverInfo(node, key, index, model, revision, deviceId);
1696 return xkHxNode_VTable(node)->VSetLightDriverCalibration(node, index, key, ldCal, commit);
1701 return xkHxNode_VTable(node)->VGetLightDriverCalibration(node, index, key, ldCal, alloc);
1706 return xkHxNode_VTable(node)->VReadLightDriverTemperature(node, index, key, temperature);
1756 kAtomic32s_Increment(&obj->inputCounter);
1790 return kAtomic32s_Get(&obj->inputCounter);
kStatus kHxNode_SetMainTempProbe(kHxNode node, kTempProbeId probeId)
Specifies whether the internal temperature is selected to present in message stamp.
Definition: kHxNode.h:653
kStatus kHxNode_ConstructPlatformInstance(k32s argc, const kChar **argv)
Constructs a hardware node object representing the underlying platform.
#define kBOOT_MODE_FALLBACK
Program is the boot loader, operating in fallback mode.
Definition: kNodeDef.h:2068
void kHxNode_RequestAppRestart(kHxNode node)
Requests that the application should be restarted after exiting.
Definition: kHxNode.h:347
kStatus kHxNode_HealthLogPriority(kHxNode node, kThreadPriorityClass *priorityClass, k32s *priorityOffset)
Returns the recommended thread priority for health logging.
Definition: kHxNode.h:310
kStatus kHxNode_ReadLogItems(kHxNode node, kArrayList logItems)
Destructively reads log messages from the log history queue.
kStatus kHxNode_StopHealth(kHxNode node)
Destroys health services related to the base node object.
kStatus kHxNode_Disengage(kHxNode node)
Begins termination of node acquisition and output activities.
Definition: kHxNode.h:521
kStatus kHxNode_ClearFirmware(kHxNode node, kNodeFirmwareType type)
Clear the firmware region specified.
Definition: kHxNode.h:1049
kStatus kHxNode_SetPowerSaverTimeout(kHxNode node, k64u timeout)
Sets the node's power saver timeout.
Definition: kHxNode.h:817
Numeric identifier for kStamp temperature source.
kStatus kHxNode_LogEx(kHxNode node, kLogOption options, const kChar *source, const kChar *message)
Adds an item to the log.
Definition: kHxNode.h:1152
kHxNode kHxNode_PlatformInstance()
Returns a reference to the hardware platform singleton, if it exists.
Definition: kHxNode.h:83
Represents indicator LED operational modes.
kStatus kHxNode_WaitForNetworkOnline(kHxNode node)
Waits for network startup complation.
Definition: kHxNode.h:732
kStatus kHxNode_Stats(kHxNode node, kNodeStats *stats)
Fills in the node statistics items that are known by the kHardware library.
Definition: kHxNode.h:1240
kStatus kHxNode_GetLogItems(kHxNode node, kArrayList logItems)
Gets all log messages in the log history queue.
Represents configuration parameter for a light temperature control algorithm.
Definition: kNodeDef.h:1023
kBool kHxNode_NetworkTransmitRateSupported(kHxNode node, kSize index)
Reports whether the TransmitRate setting is supported by this device.
Definition: kHxNode.h:1019
kVersion kHxNode_PlVersion(kHxNode node)
Reports the node's primary PL firmware version.
Definition: kHxNode.h:1270
Represents types of node firmware.
kSize kHxNode_NetInterfaceCount(kHxNode node)
Reports the number of network interfaces.
Definition: kHxNode.h:139
kStatus kHxNode_SetPowerSaverThreshold(kHxNode node, k64u threshold)
Sets the node's power saver threshold.
Definition: kHxNode.h:848
kStatus kHxNode_Clear(kHxNode node)
Resets most mode configuration to defaults.
Definition: kHxNode.h:480
Represents an enumeration of register modules.
#define kStaticOf(SYMBOL)
kStatus kHxNode_SetSyncSource(kHxNode node, kSyncSource source)
Sets the node's preferred synchronization source.
Definition: kHxNode.h:1625
kStatus kHxNode_ClearStats(kHxNode node)
Clears cumulative run-time counters.
Definition: kHxNode.h:549
Represents FireSync synchronization sources.
kStatus kHxNode_WaitForRecoveryEvent(kHxNode node, k64u timeout)
Reports whether the node has an error condition requiring it to be stopped and started again...
Definition: kHxNode.h:564
Represents a tree of data objects.
k64u kHxNode_MinHealthLogPeriod(kHxNode node)
Returns the recommended minimum health logging period.
Definition: kHxNode.h:287
kStatus kHxNode_CommitConfig(kHxNode node)
Commits changes to device configuration.
Definition: kHxNode.h:1036
kStatus kHxNode_SetMessageAlloc(kHxNode node, kAlloc allocator)
Sets the memory allocator used to generate camera messages.
Definition: kHxNode.h:168
kDateTime kHxNode_DateTime(kHxNode node)
Gets the current calendar date/time for the node.
kNetworkSpeed kHxNode_DefaultNetworkSpeed(kHxNode node, kSize index)
Gets the default network speed settings for this device.
Definition: kHxNode.h:977
kStatus kHxNode_BootConfig(kHxNode node, kBootConfig *config)
Gets the node's boot configuration parameters.
Definition: kHxNode.h:896
Represents types of nodes.
kDaughterboardModel kHxNode_DaughterboardModel(kHxNode node)
Reports the node's daughterboard model.
Definition: kHxNode.h:1350
kStatus kHxNode_RemoveEnvironUpdateHandler(kHxNode node, kCallbackFx function, kPointer receiver)
Unregisters a callback function that was previously registered using kHxNode_AddEnvironUpdateHandler...
kTempProbeId kHxNode_MainTempProbe(kHxNode node)
Gets a value indicating the stamp temperature source.
Definition: kHxNode.h:638
Represents detailed information about node hardware/firmware.
Definition: kNodeDef.h:2219
k64u kHxNode_PowerSaverThreshold(kHxNode node)
Gets the node's power saver threshold.
Definition: kHxNode.h:833
kStatus kHxNode_IpConfig(kHxNode node, kSize index, kIpConfig *config)
Gets the IP configuration with which the device booted.
Definition: kHxNode.h:675
kStatus kHxNode_Stop(kHxNode node)
Ends node acquisition and output activities.
Definition: kHxNode.h:533
const kChar * kHxNode_StoragePath(kHxNode node)
Provides the root storage path for this node (if storage is supported).
Definition: kHxNode.h:153
kStatus kHxNode_MacAddress(kHxNode node, kSize index, kMacAddress *address)
Gets the node's Ethernet MAC address.
Definition: kHxNode.h:768
Represents address configuration for an Internet Protocol adapter.
Definition: kFsDef.h:157
kStatus kHxNode_SetBootConfig(kHxNode node, const kBootConfig *config)
Sets boot configuration parameters.
Definition: kHxNode.h:790
Represents an addressable memory space within a node.
kStatus kHxNode_AddHealthUpdateHandler(kHxNode node, kCallbackFx function, kPointer receiver)
Registers a callback function for periodic health updates.
kStatus kHxNode_ReloadFirmware(kHxNode node, kNodeFirmwareType type, kStream stream, kSize size)
Reloads firmware without affecting non-volatile records or rebooting.
Definition: kHxNode.h:1085
kStatus kHxNode_SetLedMode(kHxNode node, kLed instance, kLedMode mode)
Sets the given LED to the given operational state.
k32u kHxNode_PlConfig(kHxNode node)
Reports the node's primary PL configuration id.
Definition: kHxNode.h:1286
kStatus kHxNode_GetCrashLog(kHxNode node, kString *crashLog, kAlloc allocator)
Gets all log messages in the log history records.
Definition: kHxNode.h:1199
Essential declarations related to FireSync nodes.
k32u kHxNode_NetworkTransmitRate(kHxNode node, kSize index)
Reports the maximum Ethernet transmission rate.
Definition: kHxNode.h:1006
k64u kHxNode_PowerSaverTimeout(kHxNode node)
Gets the node's power saver timeout.
Definition: kHxNode.h:802
kStatus kHxNode_EnableWatchdog(kHxNode node, kBool enable, k64u timeoutPeriod)
Enables or disables the watchdog timer.
Definition: kHxNode.h:446
kStatus kHxNode_UpdateWatchdog(kHxNode node, kRestartReason reason)
Updates the watchdog status, optionally resetting the watchdog countdown timer.
Definition: kHxNode.h:465
kNodeType kHxNode_NodeType(kHxNode node)
Gets the type of node.
Definition: kHxNode.h:592
Abstract base class for hardware node classes.
kStatus kHxNode_Engage(kHxNode node, k64u startTime, k64s startEncoder, kBool maintainPhase)
Begin node acquisition and output activities.
Definition: kHxNode.h:507
kStatus kHxNode_SetNextId(kHxNode node, k32u id)
Sets the node's future device identifier (after reboot).
Definition: kHxNode.h:626
Base class for a health statistics collection service.
kStatus kHxNode_SetDateTime(kHxNode node, kDateTime dateTime)
Set the current calendar date/time for the node.
kBool kHxNode_HasStorage(kHxNode node)
Reports whether this node provides storage support.
Definition: kHxNode.h:125
kStatus kHxNode_DynamicIpConfig(kHxNode node, kSize index, kIpConfig *config)
Retrieve IP configuration by querying the stack.
Definition: kHxNode.h:752
#define kObj(TypeName_T, T_object)
kBool kHxNode_LightDriverHighPowerEnabled(kHxNode node)
Reports whether use of higher-powered light-driver set points is enabled.
Definition: kHxNode.h:864
kStatus kHxNode_SetDataHandler(kHxNode node, kCallbackFx function, kPointer receiver)
Sets the callback for camera data messages.
kStatus kHxNode_RemoveHealthUpdateHandler(kHxNode node, kCallbackFx function, kPointer receiver)
Unregisters a callback function that was previously registered using kHxNode_AddHealthUpdateHandler.
kStatus kHxNode_FindPlatformInstance(kHxNode *node)
Locates a hardware node object representing the underlying platform.
Definition: kHxNode.h:98
kStatus kHxNode_Log(kHxNode node, const kChar *message)
Adds an item to the log.
Definition: kHxNode.h:1165
Represents types of node controllers.
#define kBOOT_MODE_RESCUE
Program was loaded by bootloader under rescue conditions.
Definition: kNodeDef.h:2065
kSyncSource kHxNode_SyncSource(kHxNode node)
Gets the node's preferred synchronization source.
Definition: kHxNode.h:1637
kStatus kHxNode_InputCounter(kHxNode node)
Reports the current input counter value.
Definition: kHxNode.h:1786
kStatus kHealthProbe_SetValue(kHealthProbe probe, k64s value)
Sets the current value of a health probe.
Definition: kHealthProbe.h:125
kBool kHxNode_PlLoaded(kHxNode node)
Reports whether the node's primary PL has been successfully programmed.
Definition: kHxNode.h:1254
kStatus kHxNode_EnableLightDriverHighPower(kHxNode node, kBool enabled)
Enables use of higher-powered light-driver set points.
Definition: kHxNode.h:879
kStatus(kCall * kHxNodeMainFx)()
Dynamic entry point to user application.
Definition: kHxNode.h:28
kNetworkSpeed kHxNode_NetworkSpeed(kHxNode node, kSize index)
Gets current network speed.
Definition: kHxNode.h:913
#define kArrayList_AsT(kArrayList_list, kSize_index, T)
Represents model of daughterboard.
kBool kHxNode_IsVirtual(kHxNode node)
Reports whether this node is a virtual (simulated) node.
Definition: kHxNode.h:1121
void kHxNode_AddLeakedMemory(kHxNode node, kSize amount)
Adds to the total reported amount of memory leaked by this node.
Definition: kHxNode.h:394
Represents the reason that a device was rebooted.
kStatus kHxNode_SetNextIpConfig(kHxNode node, kSize index, const kIpConfig *config)
Sets the node's future IP configuration (after reboot).
Definition: kHxNode.h:716
kBool kHxNode_Pl2Loaded(kHxNode node)
Reports whether the node's secondary PL has been successfully programmed.
Definition: kHxNode.h:1302
kStatus kHxNode_LoadApp(kHxNode node, kDynamicLib *library)
Uses platform-specific methodology to load the library containing the application.
Definition: kHxNode.h:113
kSize kHxNode_LeakedMemory(kHxNode node)
Reports the total amount of leaked memory.
Definition: kHxNode.h:407
kNetworkSpeed kHxNode_NetworkSpeedCapabilities(kHxNode node, kSize index)
Gets the network speed settings supported by this device.
Definition: kHxNode.h:962
kBool kHxNode_HasWatchdog(kHxNode node)
Reports whether watchdog services are available on this platform.
Definition: kHxNode.h:421
kStatus kHxNode_NextIpConfig(kHxNode node, kSize index, kIpConfig *config)
Gets the node's future IP configuration (after reboot).
Definition: kHxNode.h:693
Declares the kHealth class and related types.
kNetworkSpeed kHxNode_NextNetworkSpeed(kHxNode node, kSize index)
Gets network speed that should take effect on next reboot.
Definition: kHxNode.h:928
k32u kHxNode_NextId(kHxNode node)
Gets the node's future device identifier (after reboot).
Definition: kHxNode.h:606
kStatus kHxNode_Info(kHxNode node, kNodeInfo *info)
Fills in the given node info structure with any known information about this node.
#define kCONTROLLER_TYPE_VIRTUAL
Host-based virtual device.
Definition: kNodeDef.h:1888
k64s kHealthProbe_Value(kHealthProbe probe)
Reports the current value of the health probe.
Definition: kHealthProbe.h:192
kStatus kHealthProbe_AddValue(kHealthProbe probe, k64s value)
Adds an amount to the current value of a health probe.
Definition: kHealthProbe.h:138
kStatus kHxNode_StartHealth(kHxNode node, kHealth health, kAlloc alloc)
Starts health services related to the base node object.
kStatus kHxNode_AddEnvironUpdateHandler(kHxNode node, kCallbackFx function, kPointer receiver)
Registers a callback function for periodic environment updates.
kStatus kHxNode_Start(kHxNode node)
Prepare for node acquisition and output activities.
Definition: kHxNode.h:492
Represents supported light device types.
kStatus kHxNode_SetNetworkTransmitRate(kHxNode node, kSize index, k32u rate)
Sets the maximum Ethernet transmission rate.
Definition: kHxNode.h:993
kBool kHxNode_GetRestartRequest(kHxNode node)
Gets the current state of the application restart flag.
Definition: kHxNode.h:363
kVersion kHxNode_Pl2Version(kHxNode node)
Reports the node's secondary PL firmware version.
Definition: kHxNode.h:1318
kHealth kHxNode_Health(kHxNode node)
Returns health service associated with this node.
Definition: kHxNode.h:327
kStatus kHxNode_IncrementInputCounter(kHxNode node)
Increments the node input counter.
Definition: kHxNode.h:1752
Represents node run-time statistics.
Definition: kNodeDef.h:2256
kStatus kHxNode_SetNextNetworkSpeed(kHxNode node, kSize index, kNetworkSpeed speed)
Sets network speed that should take effect on next reboot.
Definition: kHxNode.h:949
k32u kHxNode_Pl2Config(kHxNode node)
Reports the node's secondary PL configuration id.
Definition: kHxNode.h:1334
kStatus kHxNode_WriteFirmware(kHxNode node, kNodeFirmwareType type, kStream stream, kSize size, kCallbackFx progress, kPointer context)
Writes the firmware region specified.
Definition: kHxNode.h:1068
Declares the kHealthProbe class and related types.
void kHxNode_SetLeakedMemory(kHxNode node, kSize amount)
Sets the reported amount of memory that has been leaked on this node.
Definition: kHxNode.h:380
kStatus kHxNode_SetCrashLogAppInfo(kHxNode node, kVersion version, k32u nodeId)
Sets the appropriate fields in the crash log object.
Definition: kHxNode.h:1225
k32u kHxNode_Id(kHxNode node)
Gets the node's device identifier (serial number).
Definition: kHxNode.h:578
kSize kHxNode_ProcessorCount(kHxNode node)
Reports the number of available processor cores.
Definition: kHxNode.h:1135
Represents indicator LED types.
kStatus kHxNode_ClearCrashLog(kHxNode node)
Clears the crash log history records.
Definition: kHxNode.h:1211
Represents a network speed.