-
Notifications
You must be signed in to change notification settings - Fork 0
/
slros_generic_param.cpp
32 lines (29 loc) · 1.08 KB
/
slros_generic_param.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* Copyright 2015 The MathWorks, Inc. */
#include "slros_generic_param.h"
/**
* Initialize the parameter getter class.
* @param pName The name of the ROS parameter
*/
void SimulinkParameterGetterBase::initialize(const std::string& pName)
{
nodePtr = SLROSNodePtr;
paramName = pName;
hasValidValue = false;
}
/**
* Initialize the constants for the error codes.
* @param codeSuccess Error code that should be emitted if parameter is retrieved successfully
* @param codeNoParam Error code if parameter with given name does not exist on server
* @param codeTypeMismatch Error code if parameter exists on server, but has a different data type
* @param codeArrayTruncate Error code if received array was truncated
*/
void SimulinkParameterGetterBase::initialize_error_codes(
uint8_t codeSuccess, uint8_t codeNoParam, uint8_t codeTypeMismatch,
uint8_t codeArrayTruncate)
{
// Initialize the error codes
errorCodeSuccess = codeSuccess;
errorCodeNoParam = codeNoParam;
errorCodeTypeMismatch = codeTypeMismatch;
errorCodeArrayTruncate = codeArrayTruncate;
}