Class HardwareService
java.lang.Object
com.tccc.kos.commons.util.ready.ReadyBean
com.tccc.kos.commons.core.service.AbstractService
com.tccc.kos.core.service.hardware.HardwareService
- All Implemented Interfaces:
CtxEventListener
,ContextHandleAware
,HandleAware
,Ready
,ReadyListener
Service that manages all external hardware.
- Since:
- 1.0
- Version:
- 2023-03-06
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturn the list of resolvers so that new resolvers can be added in the desired order.void
register
(HardwareLink link) Register a hardware link.void
Trigger the board resolve process.void
unregister
(HardwareLink link) Unregister a hardware link.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefix
Methods inherited from class com.tccc.kos.commons.util.ready.ReadyBean
getReady, onBeanReady, onDependenciesReady
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompleted
Methods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPath
Methods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Field Details
-
TOPIC_BOARD_LINKED
- See Also:
-
TOPIC_BOARD_UNLINKED
- See Also:
-
-
Method Details
-
getResolvers
Return the list of resolvers so that new resolvers can be added in the desired order. Resolvers are used to matchHardwareLink
objects toBoard
objects. Out of the box these are matched usingBoardIdentity
but the list of resolvers can be modified to include alternate ways of matching boards to links. -
resolveBoards
public void resolveBoards()Trigger the board resolve process. This process is triggered internally so there is rarely a need to call this externally unless the resolvers list has been modified. -
register
Register a hardware link. The link will be matched with a board so that the board can access the hardware. -
unregister
Unregister a hardware link. Called when hardware disconnects so the board can be updated to indicate that it is offline.
-