Monitor
monitor.DestijlCommandManager Class Reference
Collaboration diagram for monitor.DestijlCommandManager:

Public Types

enum  CommandStatus {
  CommandStatus.Success, CommandStatus.Rejected, CommandStatus.InvalidAnswer, CommandStatus.Busy,
  CommandStatus.CommunicationLostWithRobot, CommandStatus.CommunicationLostWithServer
}
 

Public Member Functions

delegate void CommandReceivedEvent (string header, string data, byte[] buffer)
 
 DestijlCommandManager (CommandReceivedEvent callback)
 
bool Open (string hostname)
 
bool Open (string hostname, int port)
 
void Close ()
 
CommandStatus RobotOpenCom ()
 
CommandStatus RobotCloseCom ()
 
CommandStatus RobotPing ()
 
CommandStatus RobotReset ()
 
CommandStatus RobotStartWithWatchdog ()
 
CommandStatus RobotStartWithoutWatchdog ()
 
CommandStatus RobotMove (int distance)
 
CommandStatus RobotTurn (int angle)
 
CommandStatus RobotGetBattery ()
 
CommandStatus RobotGetVersion (out string version)
 
CommandStatus RobotPowerOff ()
 
CommandStatus CameraOpen ()
 
CommandStatus CameraClose ()
 
CommandStatus CameraAskArena ()
 
CommandStatus CameraArenaConfirm ()
 
CommandStatus CameraArenaInfirm ()
 
CommandStatus CameraComputePosition ()
 
CommandStatus CameraStopComputePosition ()
 

Public Attributes

CommandReceivedEvent commandReceivedEvent = null
 
double timeout = 100
 

Private Member Functions

 ~DestijlCommandManager ()
 
void OnCommandReceived (string msg, byte[] buffer)
 
string CreateCommand (string header, string data)
 
void SplitCommand (string cmd, out string header, out string data)
 
CommandStatus DecodeStatus (CommandManager.CommandManagerStatus localStatus, string answer)
 

Private Attributes

CommandManager commandManager = null
 
string receivedHeader = null
 
string receivedData = null
 

Detailed Description

Definition at line 46 of file DestijlCommandManager.cs.

Member Enumeration Documentation

◆ CommandStatus

Enumerator
Success 
Rejected 
InvalidAnswer 
Busy 
CommunicationLostWithRobot 
CommunicationLostWithServer 

Definition at line 58 of file DestijlCommandManager.cs.

Constructor & Destructor Documentation

◆ DestijlCommandManager()

monitor.DestijlCommandManager.DestijlCommandManager ( CommandReceivedEvent  callback)

Definition at line 68 of file DestijlCommandManager.cs.

◆ ~DestijlCommandManager()

monitor.DestijlCommandManager.~DestijlCommandManager ( )
private

Definition at line 74 of file DestijlCommandManager.cs.

Member Function Documentation

◆ CameraArenaConfirm()

CommandStatus monitor.DestijlCommandManager.CameraArenaConfirm ( )

Definition at line 367 of file DestijlCommandManager.cs.

◆ CameraArenaInfirm()

CommandStatus monitor.DestijlCommandManager.CameraArenaInfirm ( )

Definition at line 380 of file DestijlCommandManager.cs.

◆ CameraAskArena()

CommandStatus monitor.DestijlCommandManager.CameraAskArena ( )

Definition at line 354 of file DestijlCommandManager.cs.

◆ CameraClose()

CommandStatus monitor.DestijlCommandManager.CameraClose ( )

Definition at line 341 of file DestijlCommandManager.cs.

◆ CameraComputePosition()

CommandStatus monitor.DestijlCommandManager.CameraComputePosition ( )

Definition at line 393 of file DestijlCommandManager.cs.

◆ CameraOpen()

CommandStatus monitor.DestijlCommandManager.CameraOpen ( )

Definition at line 328 of file DestijlCommandManager.cs.

◆ CameraStopComputePosition()

CommandStatus monitor.DestijlCommandManager.CameraStopComputePosition ( )

Definition at line 406 of file DestijlCommandManager.cs.

◆ Close()

void monitor.DestijlCommandManager.Close ( )

Definition at line 103 of file DestijlCommandManager.cs.

◆ CommandReceivedEvent()

delegate void monitor.DestijlCommandManager.CommandReceivedEvent ( string  header,
string  data,
byte []  buffer 
)

◆ CreateCommand()

string monitor.DestijlCommandManager.CreateCommand ( string  header,
string  data 
)
private

Definition at line 108 of file DestijlCommandManager.cs.

◆ DecodeStatus()

CommandStatus monitor.DestijlCommandManager.DecodeStatus ( CommandManager.CommandManagerStatus  localStatus,
string  answer 
)
private

Definition at line 124 of file DestijlCommandManager.cs.

◆ OnCommandReceived()

void monitor.DestijlCommandManager.OnCommandReceived ( string  msg,
byte []  buffer 
)
private

Definition at line 79 of file DestijlCommandManager.cs.

◆ Open() [1/2]

bool monitor.DestijlCommandManager.Open ( string  hostname)

Definition at line 92 of file DestijlCommandManager.cs.

◆ Open() [2/2]

bool monitor.DestijlCommandManager.Open ( string  hostname,
int  port 
)

Definition at line 97 of file DestijlCommandManager.cs.

◆ RobotCloseCom()

CommandStatus monitor.DestijlCommandManager.RobotCloseCom ( )

Definition at line 157 of file DestijlCommandManager.cs.

◆ RobotGetBattery()

CommandStatus monitor.DestijlCommandManager.RobotGetBattery ( )

Definition at line 249 of file DestijlCommandManager.cs.

◆ RobotGetVersion()

CommandStatus monitor.DestijlCommandManager.RobotGetVersion ( out string  version)

Definition at line 284 of file DestijlCommandManager.cs.

◆ RobotMove()

CommandStatus monitor.DestijlCommandManager.RobotMove ( int  distance)

Definition at line 222 of file DestijlCommandManager.cs.

◆ RobotOpenCom()

CommandStatus monitor.DestijlCommandManager.RobotOpenCom ( )

Definition at line 144 of file DestijlCommandManager.cs.

◆ RobotPing()

CommandStatus monitor.DestijlCommandManager.RobotPing ( )

Definition at line 170 of file DestijlCommandManager.cs.

◆ RobotPowerOff()

CommandStatus monitor.DestijlCommandManager.RobotPowerOff ( )

Definition at line 315 of file DestijlCommandManager.cs.

◆ RobotReset()

CommandStatus monitor.DestijlCommandManager.RobotReset ( )

Definition at line 183 of file DestijlCommandManager.cs.

◆ RobotStartWithoutWatchdog()

CommandStatus monitor.DestijlCommandManager.RobotStartWithoutWatchdog ( )

Definition at line 209 of file DestijlCommandManager.cs.

◆ RobotStartWithWatchdog()

CommandStatus monitor.DestijlCommandManager.RobotStartWithWatchdog ( )

Definition at line 196 of file DestijlCommandManager.cs.

◆ RobotTurn()

CommandStatus monitor.DestijlCommandManager.RobotTurn ( int  angle)

Definition at line 235 of file DestijlCommandManager.cs.

◆ SplitCommand()

void monitor.DestijlCommandManager.SplitCommand ( string  cmd,
out string  header,
out string  data 
)
private

Definition at line 113 of file DestijlCommandManager.cs.

Member Data Documentation

◆ commandManager

CommandManager monitor.DestijlCommandManager.commandManager = null
private

Definition at line 48 of file DestijlCommandManager.cs.

◆ commandReceivedEvent

CommandReceivedEvent monitor.DestijlCommandManager.commandReceivedEvent = null

Definition at line 54 of file DestijlCommandManager.cs.

◆ receivedData

string monitor.DestijlCommandManager.receivedData = null
private

Definition at line 51 of file DestijlCommandManager.cs.

◆ receivedHeader

string monitor.DestijlCommandManager.receivedHeader = null
private

Definition at line 50 of file DestijlCommandManager.cs.

◆ timeout

double monitor.DestijlCommandManager.timeout = 100

Definition at line 56 of file DestijlCommandManager.cs.


The documentation for this class was generated from the following file: