|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsidnet.core.misc.Node
public class Node
| Field Summary | |
|---|---|
NodesList |
neighboursList
list of neighbours. |
long |
packetReceivedCount
|
long |
packetSentCount
|
| Constructor Summary | |
|---|---|
Node(int id,
EnergyManagement energyManagement,
PanelContext hostingPanelContext,
LocationContext fieldContext,
ColorProfile colorCode,
SimManager simControl)
Creates a new instance of Node |
|
| Method Summary | |
|---|---|
void |
addQuery(Query query)
Adds a query to the query list. |
void |
addSensor(Sensor sensor)
|
void |
appendTerminalText(java.lang.String s)
Appends the supplied string to the console associated with the Terminal of the calling node |
void |
enableRelocation(Field field)
|
CallbackInterface |
getAppCallback()
|
double |
getEffectiveCoverage_ft()
|
EnergyManagement |
getEnergyManagement()
|
GPS |
getGPS()
|
int |
getID()
Gets the unique ID that has been associated with the node. |
NetAddress |
getIP()
Get the IP address of the node |
Location2D |
getLocation2D()
Get the geographical location of the sensor node in real metric units, not in screen coordinates |
LocationContext |
getLocationContext()
Returns the LocationContext in which the getLocation2D returns the measurements |
NCS_Location2D |
getNCS_Location2D()
Returns the location of this node as an NCS (Normalized Coordinate System) |
NodeGUIimpl |
getNodeGUI()
Gets the handle over the NodeGUIimpl which contains functions related to GUI |
java.util.List<Query> |
getQueryList()
Returns the list of queries that have been posted by the client through this node. |
Sensor |
getSensor(int sensorIndex)
|
SimControl |
getSimControl()
Return the SimControl handle |
byte |
getType()
Get the TYPE of a node |
boolean |
isFaulty()
|
void |
malfunctioned()
|
double |
readAnalogSensorData(int sensorIndex)
Reads sensor data |
void |
setAppCallback(CallbackInterface appCallback)
|
void |
setGPS(GPS gps)
|
void |
setIP(NetAddress ip)
|
void |
setLocation2D(Location2D fieldLocation)
|
void |
setQueryList(java.util.LinkedList<Query> terminalQueryList)
Not member of NodeAPI |
void |
setType(byte type)
Set the TYPE of a node |
void |
updateLocation2D(Location2D fieldLocation)
Should be called at runtime if node placement changes programmatically Will not work if the node relocation is not enabled (aka, the nodeGUI.field is null |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public long packetReceivedCount
public long packetSentCount
public NodesList neighboursList
| Constructor Detail |
|---|
public Node(int id,
EnergyManagement energyManagement,
PanelContext hostingPanelContext,
LocationContext fieldContext,
ColorProfile colorCode,
SimManager simControl)
| Method Detail |
|---|
public java.util.List<Query> getQueryList()
NodeAPI
getQueryList in interface NodeAPIpublic void addQuery(Query query)
NodeAPI
addQuery in interface NodeAPIpublic void setQueryList(java.util.LinkedList<Query> terminalQueryList)
public int getID()
NodeAPI
getID in interface NodeAPIpublic NetAddress getIP()
getIP in interface NodeAPIgetIP in interface NodeHardwareInterfacepublic void setType(byte type)
setType in interface NodeAPIshort - type The type, as a short, numerical value, to identify a node's type in a heterogeneous networkpublic byte getType()
getType in interface NodeAPIpublic void enableRelocation(Field field)
public SimControl getSimControl()
NodeAPI
getSimControl in interface NodeAPIpublic Location2D getLocation2D()
NodeAPI
getLocation2D in interface NodeAPIpublic NCS_Location2D getNCS_Location2D()
NodeAPI
getNCS_Location2D in interface NodeAPIpublic LocationContext getLocationContext()
NodeAPI
getLocationContext in interface NodeAPIpublic void malfunctioned()
public boolean isFaulty()
public double readAnalogSensorData(int sensorIndex)
NodeAPI
readAnalogSensorData in interface NodeAPIsensorIndex - indexes through the registered sensors, in case a node has more than one sensing capabilities. Otherwise, set to 0public void appendTerminalText(java.lang.String s)
NodeAPI
appendTerminalText in interface NodeAPIpublic NodeGUIimpl getNodeGUI()
NodeAPI
getNodeGUI in interface NodeAPIpublic void setIP(NetAddress ip)
setIP in interface NodeHardwareInterfacepublic EnergyManagement getEnergyManagement()
getEnergyManagement in interface NodeAPIgetEnergyManagement in interface NodeHardwareInterfacepublic void setGPS(GPS gps)
setGPS in interface NodeHardwareInterfacepublic GPS getGPS()
getGPS in interface NodeHardwareInterfacepublic void addSensor(Sensor sensor)
addSensor in interface NodeHardwareInterfacepublic Sensor getSensor(int sensorIndex)
getSensor in interface NodeHardwareInterfacepublic void setAppCallback(CallbackInterface appCallback)
setAppCallback in interface NodeAPIpublic CallbackInterface getAppCallback()
getAppCallback in interface NodeAPIpublic void updateLocation2D(Location2D fieldLocation)
public void setLocation2D(Location2D fieldLocation)
public double getEffectiveCoverage_ft()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||