Cheetah Software  1.0
ControlParameterResponse Struct Reference

#include <ControlParameterInterface.h>

+ Collaboration diagram for ControlParameterResponse:

Public Member Functions

bool isResponseTo (ControlParameterRequest &request)
 
std::string toString ()
 

Public Attributes

char name [CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH] = ""
 
u64 requestNumber = UINT64_MAX
 
u64 nParameters = 0
 
ControlParameterValue value
 
ControlParameterValueKind parameterKind
 
ControlParameterRequestKind requestKind
 

Detailed Description

Definition at line 63 of file ControlParameterInterface.h.

Member Function Documentation

bool ControlParameterResponse::isResponseTo ( ControlParameterRequest request)
inline

Definition at line 71 of file ControlParameterInterface.h.

References ControlParameterRequest::name, ControlParameterRequest::requestKind, and ControlParameterRequest::requestNumber.

71  {
72  return requestNumber == request.requestNumber &&
73  requestKind == request.requestKind &&
74  std::string(name) == std::string(request.name);
75  }
ControlParameterRequestKind requestKind
ControlParameterRequestKind requestKind
char name[CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH]
char name[CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH]
std::string ControlParameterResponse::toString ( )
inline

Definition at line 77 of file ControlParameterInterface.h.

References controlParameterRequestKindToString(), controlParameterValueKindToString(), controlParameterValueToString(), GET_ROBOT_PARAM_BY_NAME, GET_USER_PARAM_BY_NAME, SET_ROBOT_PARAM_BY_NAME, and SET_USER_PARAM_BY_NAME.

77  {
78  std::string result = "Response(" + std::to_string(requestNumber) + ") " +
80  " " +
82  " " + std::string(name) + " ";
83 
84  switch (requestKind) {
86  result += "user to: ";
88  return result;
90  result += "user is: ";
92  return result;
94  result += "robot to: ";
96  return result;
98  result += "robot is: ";
100  return result;
101  default:
102  return result + " unknown request type!";
103  }
104  }
ControlParameterRequestKind requestKind
std::string controlParameterValueKindToString(ControlParameterValueKind valueKind)
ControlParameterValueKind parameterKind
std::string controlParameterRequestKindToString(ControlParameterRequestKind request)
std::string controlParameterValueToString(ControlParameterValue v, ControlParameterValueKind kind)
char name[CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH]

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

char ControlParameterResponse::name[CONTROL_PARAMETER_MAXIMUM_NAME_LENGTH] = ""

Definition at line 64 of file ControlParameterInterface.h.

u64 ControlParameterResponse::nParameters = 0

Definition at line 66 of file ControlParameterInterface.h.

ControlParameterValueKind ControlParameterResponse::parameterKind

Definition at line 68 of file ControlParameterInterface.h.

ControlParameterRequestKind ControlParameterResponse::requestKind

Definition at line 69 of file ControlParameterInterface.h.

u64 ControlParameterResponse::requestNumber = UINT64_MAX

Definition at line 65 of file ControlParameterInterface.h.

ControlParameterValue ControlParameterResponse::value

Definition at line 67 of file ControlParameterInterface.h.


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