public class BlueGoldEngine extends MessageDecoder implements Connection
This handles both "configuring" and "being configured"
cases. It also handles both consumers and producers
via working with the
SingleConsumerNode
and SingleProducerNode
example classes.
For button inputs, it currently has only "click" operations. Perhaps "down" and "up" will be needed eventually. Similarly, it only does "on" and "off" for the two lights.
Connection.ConnectionListener
Modifier and Type | Field and Description |
---|---|
(package private) Connection |
c |
(package private) List<SingleConsumer> |
consumers |
(package private) NodeID |
nid |
(package private) List<SingleProducer> |
producers |
(package private) int |
selectedPC |
(package private) ScatterGather |
sg |
Constructor and Description |
---|
BlueGoldEngine(NodeID nid,
ScatterGather sg,
List<SingleProducer> producers,
List<SingleConsumer> consumers) |
Modifier and Type | Method and Description |
---|---|
void |
blueClick() |
boolean |
getBlueLightOn() |
(package private) EventID |
getEventID(int n) |
boolean |
getGoldLightOn() |
void |
goldClick() |
void |
handleLearnEvent(LearnEventMessage msg,
Connection sender)
Handle "Learn Event" message
|
void |
longBluePress() |
void |
longGoldPress() |
void |
put(Message msg,
Connection sender)
Process message.
|
protected void |
sendLearnEventMessage(EventID eid) |
void |
setBlueLightBlink(int dwell) |
void |
setBlueLightOn(boolean f) |
(package private) void |
setEventID(int n,
EventID eid) |
void |
setGoldLightBlink(int dwell) |
void |
setGoldLightOn(boolean f) |
defaultHandler, handleConsumerIdentified, handleDatagram, handleDatagramAcknowledged, handleDatagramRejected, handleIdentifyConsumers, handleIdentifyEvents, handleIdentifyProducers, handleInitializationComplete, handleOptionalIntRejected, handleProducerConsumerEventReport, handleProducerIdentified, handleProtocolIdentificationReply, handleProtocolIdentificationRequest, handleSimpleNodeIdentInfoReply, handleSimpleNodeIdentInfoRequest, handleStreamDataComplete, handleStreamDataProceed, handleStreamDataSend, handleStreamInitReply, handleStreamInitRequest, handleVerifiedNodeIDNumber, handleVerifyNodeIDNumber
registerStartNotification
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
registerStartNotification
int selectedPC
NodeID nid
ScatterGather sg
Connection c
List<SingleProducer> producers
List<SingleConsumer> consumers
public BlueGoldEngine(NodeID nid, ScatterGather sg, List<SingleProducer> producers, List<SingleConsumer> consumers)
public void goldClick()
public void longGoldPress()
public void blueClick()
public void longBluePress()
public void handleLearnEvent(LearnEventMessage msg, Connection sender)
MessageDecoder
handleLearnEvent
in class MessageDecoder
public void setBlueLightOn(boolean f)
public boolean getBlueLightOn()
public void setBlueLightBlink(int dwell)
public void setGoldLightOn(boolean f)
public boolean getGoldLightOn()
public void setGoldLightBlink(int dwell)
public void put(Message msg, Connection sender)
MessageDecoder
Base implementation refers back to message to implement its own specific type.
put
in interface Connection
put
in class MessageDecoder
msg
- Input to be processed by typesender
- Passed through for specific message processing,
e.g. to send a reply back to the originatorprotected void sendLearnEventMessage(EventID eid)
EventID getEventID(int n)
void setEventID(int n, EventID eid)
Information on copyright, trademarks and licenses is linked here.
Site hosted by: