|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcontrol.comm.eia709.Eia709Node
public class Eia709Node
Each instance of this class represents a node in the EIA709 network. Next to its own address information, it stores an address table, containing all communication partners and a network variable table.
In order to perform any useful actions, a node must be married to a Controllet, an application that performs network tasks, i.e. sends messages to other nodes in the network and receives incoming messages.
Usually, an EIA-709 application has to perform three steps to get a working node/controllet combination:
Eia709Node
instance with a unique node ID (neuron ID),Eia709Controllet
to the node,In JAVA code it looks followingly:
Eia709Node node = new Eia709Node( new byte[] { 'N', 'O', 'D', 'E', 'I', 'D'}); // create node node.setControllet( new LampControllet()); // set controllet node.start(); // start node
Eia709Controllet
Constructor Summary | |
---|---|
Eia709Node(byte[] neuronId)
Create a new EIA709 node. |
Method Summary | |
---|---|
void |
addGroupMembership(int groupId,
int groupSize,
int memberId)
Adds the current node to a group. |
protected void |
finalize()
|
byte[] |
getDomain()
Returns the domain this node belongs to. |
byte[] |
getNeuronId()
Returns this node's neuron ID. |
int |
getNodeAddress()
Returns this node's address. |
int |
getSubnet()
Returns this node's subnet. |
void |
setControllet(Eia709Controllet program)
Attaches a program controllet to the node. |
void |
setNodeAddress(byte[] domain,
int subnet,
int node)
Sets the address of this node. |
void |
start()
Starts this node. |
void |
stop()
Stops this node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Constructor Detail |
---|
public Eia709Node(byte[] neuronId)
neuronId
- 6 byte neuron ID of this node.Method Detail |
---|
public void setNodeAddress(byte[] domain, int subnet, int node)
domain
- domain (must be 0,1,3 or 6 bytes long)subnet
- subnet address between 0 and 255node
- node address between 0 and 127public void setControllet(Eia709Controllet program)
program
- the controllet to run on this nodepublic void start()
IllegalArgumentException
is thrown.
public void stop()
public void addGroupMembership(int groupId, int groupSize, int memberId)
groupId
- group IDgroupSize
- number of members in groupmemberId
- ID of this node within the grouppublic byte[] getDomain()
public byte[] getNeuronId()
public int getSubnet()
public int getNodeAddress()
protected void finalize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |