Crea sito


org.zu.ardulink.protocol.parser
Class ALProtocolParser

java.lang.Object
  extended by org.zu.ardulink.protocol.parser.ALProtocolParser
All Implemented Interfaces:
IProtocolParser

public class ALProtocolParser
extends Object
implements IProtocolParser


Constructor Summary
ALProtocolParser()
           
 
Method Summary
 int[] analogRead(int pin, int value)
          write a message for an analog read event
 int[] customMessage(String message)
          write a custom message
 int[] digitalRead(int pin, int value)
          write a message for a digital read event
 IProtocolMessageStore getMessageStore()
           
 String getProtocolName()
           
 MessageParsedInfo parse(String message)
          Parse an incoming message.
 int[] reply(boolean success, MessageParsedInfo messageParsedInfo)
          write a Reply message like arduino that use a specific protocol
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ALProtocolParser

public ALProtocolParser()
Method Detail

getProtocolName

public String getProtocolName()
Specified by:
getProtocolName in interface IProtocolParser
Returns:
the protocol name

parse

public MessageParsedInfo parse(String message)
                        throws ParseException
Description copied from interface: IProtocolParser
Parse an incoming message.

Specified by:
parse in interface IProtocolParser
Returns:
MessageParsedInfo
Throws:
ParseException

reply

public int[] reply(boolean success,
                   MessageParsedInfo messageParsedInfo)
Description copied from interface: IProtocolParser
write a Reply message like arduino that use a specific protocol

Specified by:
reply in interface IProtocolParser
Returns:

analogRead

public int[] analogRead(int pin,
                        int value)
Description copied from interface: IProtocolParser
write a message for an analog read event

Specified by:
analogRead in interface IProtocolParser
Returns:

digitalRead

public int[] digitalRead(int pin,
                         int value)
Description copied from interface: IProtocolParser
write a message for a digital read event

Specified by:
digitalRead in interface IProtocolParser
Returns:

customMessage

public int[] customMessage(String message)
Description copied from interface: IProtocolParser
write a custom message

Specified by:
customMessage in interface IProtocolParser
Returns:

getMessageStore

public IProtocolMessageStore getMessageStore()
Specified by:
getMessageStore in interface IProtocolParser


Copyright © 2015. All rights reserved.