org.indi.server
Class SmartDevice

java.lang.Object
  extended by org.indi.server.SmartDevice
All Implemented Interfaces:
org.indi.reactor.TimerCallback, Device, ObserverCallback

public class SmartDevice
extends java.lang.Object
implements Device


Field Summary
 java.lang.String name
           
 
Constructor Summary
SmartDevice(IndiServer server, java.lang.String name)
           
 
Method Summary
 void def(org.indi.objects.Vector vector)
           
 void def(org.indi.objects.Vector vector, java.lang.String message)
           
 void del(org.indi.objects.Vector vector)
           
 void del(org.indi.objects.Vector vector, java.lang.String message)
           
 java.lang.String getName()
           
 void msg(java.lang.String message)
           
 void onGetProperties(org.indi.clientmessages.GetProperties o)
          Called when a GetProperties message was received client.
 void onNew(org.indi.objects.BlobVector vector)
          Called by the reactor whenever a BLOBVector (a request to change the state of a blob was received from the client)
 void onNew(org.indi.objects.NumberVector vector)
          Called by the reactor whenever a NumberVector (a request to change the state of a number was received from the client)
 void onNew(org.indi.objects.SwitchVector vector)
          Called by the reactor whenever a SwitchVector (a request to change the state of a switch was received from the client)
 void onNew(org.indi.objects.TextVector vector)
          Called by the reactor whenever a TextVector (a request to change the state of a text was received from the client)
 void onObserved(org.indi.objects.Vector vector)
          Callback method called by the server when the observed vector changed
 void onTimer()
           
 void set(org.indi.objects.Vector vector)
           
 void set(org.indi.objects.Vector vector, java.lang.String message)
           
 void timer(long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Constructor Detail

SmartDevice

public SmartDevice(IndiServer server,
                   java.lang.String name)
Method Detail

def

public void def(org.indi.objects.Vector vector)

set

public void set(org.indi.objects.Vector vector)

del

public void del(org.indi.objects.Vector vector)

def

public void def(org.indi.objects.Vector vector,
                java.lang.String message)

set

public void set(org.indi.objects.Vector vector,
                java.lang.String message)

del

public void del(org.indi.objects.Vector vector,
                java.lang.String message)

timer

public void timer(long timeout)

msg

public void msg(java.lang.String message)

onGetProperties

public void onGetProperties(org.indi.clientmessages.GetProperties o)
Description copied from interface: Device
Called when a GetProperties message was received client. Each property of the device should be defined here using the def methods.

Specified by:
onGetProperties in interface Device
Parameters:
o - the GetProperties message received from the client

onNew

public void onNew(org.indi.objects.SwitchVector vector)
Description copied from interface: Device
Called by the reactor whenever a SwitchVector (a request to change the state of a switch was received from the client)

Specified by:
onNew in interface Device
Parameters:
vector - the vector received from the client

onNew

public void onNew(org.indi.objects.NumberVector vector)
Description copied from interface: Device
Called by the reactor whenever a NumberVector (a request to change the state of a number was received from the client)

Specified by:
onNew in interface Device
Parameters:
vector - the vector received from the client

onNew

public void onNew(org.indi.objects.BlobVector vector)
Description copied from interface: Device
Called by the reactor whenever a BLOBVector (a request to change the state of a blob was received from the client)

Specified by:
onNew in interface Device
Parameters:
vector - the vector received from the client

onNew

public void onNew(org.indi.objects.TextVector vector)
Description copied from interface: Device
Called by the reactor whenever a TextVector (a request to change the state of a text was received from the client)

Specified by:
onNew in interface Device
Parameters:
vector - the vector received from the client

onTimer

public void onTimer()
Specified by:
onTimer in interface org.indi.reactor.TimerCallback

onObserved

public void onObserved(org.indi.objects.Vector vector)
Description copied from interface: ObserverCallback
Callback method called by the server when the observed vector changed

Specified by:
onObserved in interface ObserverCallback
Parameters:
vector - the vector that changed

getName

public java.lang.String getName()
Specified by:
getName in interface Device
Returns:
the name of the device


Copyright © 2008. All Rights Reserved.