Class SelfLinkingBoardLink
- All Implemented Interfaces:
BoardIdentifier
HardwareLink object for boards that implement SelfLinkingBoard.
This type of board doesn't rely on some external linking mechanism such as
an adapter or other persistent connection that is originated from the actual
device. This is intended for use where the logical board manages the concept
of being linked on its own. For example, consider a board that interacts with
some other system via http endpoints. There is no incoming connection from the
external system to trigger a link, but the board can ping the external system
and mark itself linked if the external system is available. If it later goes
down, the board can unlink itself which will trigger unlink behavior such as
lifecycle events and BoardNotLinkedTrouble.- Since:
- 9
- Version:
- 9
-
Constructor Summary
ConstructorsConstructorDescriptionSelfLinkingBoardLink(Board board, String serialNum) Constructor which takes the board to be linked. -
Method Summary
Modifier and TypeMethodDescriptionReturns theinstanceIdof the board.Returns the serial number of the board, if available.getType()Returns thetypeof the board.Methods inherited from class com.kosdev.kos.core.service.hardware.HardwareLink
close, getBoard, getFirmwareVersions, getIdentity, getLinkType, getRevision, getSerialNum, isValid, setInvalid
-
Constructor Details
-
SelfLinkingBoardLink
Constructor which takes the board to be linked.- Since:
- 9
-
-
Method Details
-
getMfgSerialNum
Description copied from class:HardwareLinkReturns the serial number of the board, if available. This serial number should match the manufacturing data of the board and should be used in analytic data. This should not be used for display purposes.- Specified by:
getMfgSerialNumin classHardwareLink
-
getType
Description copied from interface:BoardIdentifierReturns thetypeof the board.The hardware service uses the type to determine compatible firmware, as well as to link with adapters that are connected to the matching physical board.
If a physical board is revised, it may keep the same type but have different variant information. The logical board is primarily concerned with the high-level feature set of the hardware, and leverages the link to the adapter to perform actual operations on the hardware. This means that a new version of a board can be spun with a different CPU and hardware changes, but so long as the protocol to the device is the same, it can still have the same board type.
- Specified by:
getTypein interfaceBoardIdentifier- Specified by:
getTypein classHardwareLink
-
getInstanceId
Description copied from interface:BoardIdentifierReturns theinstanceIdof the board.If there is more than one instance of the board in the system, then the instanceId is used to determine which one is which. Typically, the hardware has a mechanism to identify which instance it is (via cable harness, jumper or some other mechanism), and that is the value that must be used here. For example, if a device can contain three instances of a board, and the cable harness allows the board to identify its position as "1", "2", or "3", then the logical board must use an instanceId of "1", "2", or "3" so that hardware service can match the incoming adapter link to the logical board.
In general, there should never be more than one instance of a particular board type with the same identifierId, as there is no way to distinguish them from each other.
If there is only one instance of the board, this will typically return null, as the hardware will not need to determine an instance ID in the adapter code.
- Specified by:
getInstanceIdin interfaceBoardIdentifier- Specified by:
getInstanceIdin classHardwareLink
-