Class SerialNode
- java.lang.Object
-
- jmri.jmrix.AbstractNode
-
- jmri.jmrix.ieee802154.IEEE802154Node
-
- jmri.jmrix.ieee802154.serialdriver.SerialNode
-
public class SerialNode extends IEEE802154Node
Implementation of a Serial Node for IEEE 802.15.4 networks.Integrated with
SerialTrafficController.Each node has 3 addresses associated with it:
- A 16 bit PAN (Personal Area Network) ID assigned by the user
- A 16 bit User Assigned Address
- A 64 bit Globally Unique ID assigned by the manufacturer
All nodes in a given network must have the same PAN ID
-
-
Field Summary
-
Fields inherited from class jmri.jmrix.ieee802154.IEEE802154Node
globaladdress, panaddress, useraddress
-
Fields inherited from class jmri.jmrix.AbstractNode
nodeAddress
-
-
Constructor Summary
Constructors Constructor Description SerialNode()Creates a new instance of AbstractNodeSerialNode(byte[] pan, byte[] user, byte[] global)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractMRMessagecreateInitPacket()Create the needed Initialization packet (AbstractMRMessage) for this node.AbstractMRMessagecreateOutPacket()Create an Transmit packet (AbstractMRMessage) to send current statebooleangetSensorsActive()Are there sensors present, and hence this node will need to be polled?booleanhandleTimeout(AbstractMRMessage m, AbstractMRListener l)Deal with a timeout in the transmission controller.voidresetTimeout(AbstractMRMessage m)A reply was received, so there was not timeout, do any needed processing.-
Methods inherited from class jmri.jmrix.ieee802154.IEEE802154Node
checkNodeAddress, getGlobalAddress, getPANAddress, getUserAddress, mustSend, resetMustSend, setGlobalAddress, setMustSend, setNodeAddress, setPANAddress, setUserAddress
-
Methods inherited from class jmri.jmrix.AbstractNode
getNodeAddress
-
-
-
-
Constructor Detail
-
SerialNode
public SerialNode()
Creates a new instance of AbstractNode
-
SerialNode
public SerialNode(byte[] pan, byte[] user, byte[] global)
-
-
Method Detail
-
createInitPacket
public AbstractMRMessage createInitPacket()
Create the needed Initialization packet (AbstractMRMessage) for this node. Returns null if not needed.- Specified by:
createInitPacketin classIEEE802154Node- Returns:
- the packet, or 'null' if not needed
-
createOutPacket
public AbstractMRMessage createOutPacket()
Create an Transmit packet (AbstractMRMessage) to send current state- Specified by:
createOutPacketin classIEEE802154Node- Returns:
- packet to send current node state.
-
getSensorsActive
public boolean getSensorsActive()
Are there sensors present, and hence this node will need to be polled? Note: returns 'true' if at least one sensor is active for this node- Specified by:
getSensorsActivein classIEEE802154Node- Returns:
- 'true' if at least one sensor is active for this node
-
handleTimeout
public boolean handleTimeout(AbstractMRMessage m, AbstractMRListener l)
Deal with a timeout in the transmission controller.- Specified by:
handleTimeoutin classIEEE802154Node- Parameters:
m- message that didn't receive a replyl- listener that sent the message- Returns:
- true if initialization required
-
resetTimeout
public void resetTimeout(AbstractMRMessage m)
A reply was received, so there was not timeout, do any needed processing.- Specified by:
resetTimeoutin classIEEE802154Node- Parameters:
m- message received that has reset the timeout and is waiting to be handled
-
-