Crea sito


org.zu.ardulink.protocol.parser
Interface IProtocolParser

All Known Implementing Classes:
ALProtocolParser

public interface IProtocolParser


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
 

Method Detail

getProtocolName

String getProtocolName()
Returns:
the protocol name

parse

MessageParsedInfo parse(String message)
                        throws ParseException
Parse an incoming message.

Parameters:
message -
Returns:
MessageParsedInfo
Throws:
ParseException

reply

int[] reply(boolean success,
            MessageParsedInfo messageParsedInfo)
write a Reply message like arduino that use a specific protocol

Parameters:
success -
messageParsedInfo -
Returns:

analogRead

int[] analogRead(int pin,
                 int value)
write a message for an analog read event

Parameters:
pin -
value -
Returns:

digitalRead

int[] digitalRead(int pin,
                  int value)
write a message for a digital read event

Parameters:
pin -
value -
Returns:

customMessage

int[] customMessage(String message)
write a custom message

Parameters:
message -
Returns:

getMessageStore

IProtocolMessageStore getMessageStore()


Copyright © 2015. All rights reserved.