public class SimuCanOpenProxy extends CanOpenProxy
| Modifier and Type | Class and Description |
|---|---|
protected static class |
FcsTcpProxy.ClientContext
A class to handle the tcpip connexion.
|
org.lsst.ccs.framework.Module.ValueUpdate| Modifier and Type | Field and Description |
|---|---|
protected FcsTcpProxy.ClientContext |
clientContext |
protected int |
fieldBusTimeout |
protected Condition |
hardwareBooted |
protected Lock |
lock |
protected int |
portNumber |
protected boolean |
stopped |
protected boolean |
stopping |
protected boolean |
tcpServerStarted |
bootingCompleted, hardwareList| Constructor and Description |
|---|
SimuCanOpenProxy(int portNumber,
int fieldBusTimeout,
String clientName,
long hardwareBootTimeout) |
| Modifier and Type | Method and Description |
|---|---|
Object |
call(String clientName,
String command)
This methods send a command to the tcp client.
|
org.lsst.ccs.framework.TreeWalkerDiag |
checkHardware()
This method has to be tested on test benches.
|
String |
getClientName()
For simulation ONLY.
|
int |
getPortNumber() |
void |
initModule() |
boolean |
isReady(String clientName) |
boolean |
isTcpServerStarted()
returns true if this server is started.
|
PDOStorage |
readPDOs()
This method sends a sync command to the can open stack and returns the
reply.
|
void |
start() |
void |
startServer()
Starts the server tcp on the port portNumber.
|
void |
startThreadReader()
Starts a thread which read on the tcp socket, waiting for messages coming
from tcp proxy.
|
void |
stopServer()
Stops the tcp server.
|
canClearAlert, checkBootedCanOpenNodes, checkCanOpenCommand, checkHardwareID, checkNewHardware, checkNodeID, checkNumberOfBootedNodes, checkStarted, checkStopped, connectHardware, disconnectHardware, getBootedNodeBySerialNumber, getMyClientName, getNodeName, getPdoStorage, identifyHardware, initialize, isBooted, isCANDevicesReady, isHardwareIdentified, listBootedNodes, listHardwareNames, printBootedNodeBySerialNumber, printHardwareList, printHardwareState, printPDOStorage, processEmcyMessage, processResponseToReadSDO, processSDORequestError, publishData, publishHardwareData, publishHardwareData, readDevicesInfo, readSDO, readSDOCommand, sendCanOpenCommand, setCanOpenNodeNumbersOK, setHardwareBootProcessEnded, setHardwareIdentified, setHardwareList, shutdownNow, toString, updateDeviceInfo, writeSDO, writeSDOgetNObserverThreads, getObservables, getTickMillis, init, listens, processUpdate, sendSignal, sendSignalWithTimeLimit, setNObserverThreads, setObservables, setTickMillis, signal, startTicking, tick, updateaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitraiseAlarm, raiseAlarm, raiseAlarm, raiseWarning, raiseWarning, raiseWarninggetComponentConfigurationEnvironment, getComponentLookup, getName, getSubsystemchange, dropSubmittedChanges, getChildren, getComponentByName, getEnvironment, getParent, getParentObject, getSubmittedChanges, isParameterConfigurable, postStart, printConfigurableParameters, setBulkParameter, submitChange, submitChanges, validateBulkChange@ConfigurationParameter(isFinal=true,
range="1024..99000",
description="tcpip port number on which this tcpip server starts on.")
protected int portNumber
@ConfigurationParameter(description="Timeout in Millisecond. If a command sent to the CANbus doesn\'t respond during this amount of time, we considere that they could be an issue on the hardware.") protected int fieldBusTimeout
protected volatile boolean stopped
protected volatile boolean stopping
protected volatile boolean tcpServerStarted
protected FcsTcpProxy.ClientContext clientContext
protected final Lock lock
protected final Condition hardwareBooted
public SimuCanOpenProxy(int portNumber,
int fieldBusTimeout,
String clientName,
long hardwareBootTimeout)
public void initModule()
initModule in class CanOpenProxypublic void startServer()
public void startThreadReader()
public void stopServer()
public org.lsst.ccs.framework.TreeWalkerDiag checkHardware()
throws org.lsst.ccs.HardwareException
CanOpenProxycheckHardware in interface org.lsst.ccs.framework.HardwareControllercheckHardware in class CanOpenProxyorg.lsst.ccs.HardwareExceptionpublic PDOStorage readPDOs()
CanOpenProxyreadPDOs in class CanOpenProxypublic boolean isTcpServerStarted()
public int getPortNumber()
public String getClientName()
public void start()
start in interface org.lsst.ccs.framework.Configurablestart in interface org.lsst.ccs.framework.HasLifecyclepublic boolean isReady(String clientName)
public Object call(String clientName, String command)
clientName - command - Copyright © 2016 LSST. All rights reserved.