public class HdlcDemoIEC extends java.lang.Object implements ICallbacks
| Modifier and Type | Class and Description |
|---|---|
class |
HdlcDemoIEC.DemoException |
| Constructor and Description |
|---|
HdlcDemoIEC() |
| Modifier and Type | Method and Description |
|---|---|
void |
initializeParameters()
Initialize parameters.
|
static void |
main(java.lang.String[] args)
Launches the demo
|
void |
onReceivedStream(byte[] stream)
onReceivedStream callback method.
|
void |
onSentStream(byte[] stream)
OnSentStream callback method.
|
void |
onStateChange(HDLCProtocolState state)
onStateChange callback method.
|
boolean |
processXmlFile(java.lang.String filePath)
Processes an XML file.
|
public void initializeParameters()
Adapt to your meter parameters.
public boolean processXmlFile(java.lang.String filePath)
throws icube.xmlpdu.infra.XmlPduException,
EzHdlcException,
java.io.IOException
filePath - the file pathicube.xmlpdu.infra.XmlPduExceptionEzHdlcExceptionjava.io.IOExceptionpublic static void main(java.lang.String[] args)
public void onReceivedStream(byte[] stream)
ICallbacksCalled when a byte stream is received from the meter.
onReceivedStream in interface ICallbacksstream - Byte stream received.public void onSentStream(byte[] stream)
ICallbacksCalled when a byte stream is sent to the meter.
onSentStream in interface ICallbacksstream - Byte stream sent.public void onStateChange(HDLCProtocolState state)
ICallbacksCalled when a Meter's state change occurs.
onStateChange in interface ICallbacksstate - The new state.HDLCProtocolState