Types.h
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5
*
6
* ArmarX is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
9
*
10
* ArmarX is distributed in the hope that it will be useful, but
11
* WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*
18
* @package
19
* @author
20
* @date
21
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22
* GNU General Public License
23
*/
24
#pragma once
25
26
#include <vector>
27
28
typedef
struct
29
{
30
unsigned
char
id
;
31
unsigned
int
len
;
32
std::vector<unsigned char>
data
;
33
}
msg_t
;
34
35
36
typedef
enum
37
{
38
E_SUCCESS
= 0,
// No error
39
E_NOT_AVAILABLE
,
// Device, service or data is not available
40
E_NO_SENSOR
,
// No sensor connected
41
E_NOT_INITIALIZED
,
// The device is not initialized
42
E_ALREADY_RUNNING
,
// Service is already running
43
E_FEATURE_NOT_SUPPORTED
,
// The asked feature is not supported
44
E_INCONSISTENT_DATA
,
// One or more dependent parameters mismatch
45
E_TIMEOUT
,
// Timeout error
46
E_READ_ERROR
,
// Error while reading from a device
47
E_WRITE_ERROR
,
// Error while writing to a device
48
E_INSUFFICIENT_RESOURCES
,
// No memory available
49
E_CHECKSUM_ERROR
,
// Checksum error
50
E_NO_PARAM_EXPECTED
,
// No parameters expected
51
E_NOT_ENOUGH_PARAMS
,
// Not enough parameters
52
E_CMD_UNKNOWN
,
// Unknown command
53
E_CMD_FORMAT_ERROR
,
// Command format error
54
E_ACCESS_DENIED
,
// Access denied
55
E_ALREADY_OPEN
,
// The interface is already open
56
E_CMD_FAILED
,
// Command failed
57
E_CMD_ABORTED
,
// Command aborted
58
E_INVALID_HANDLE
,
// invalid handle
59
E_NOT_FOUND
,
// device not found
60
E_NOT_OPEN
,
// device not open
61
E_IO_ERROR
,
// I/O error
62
E_INVALID_PARAMETER
,
// invalid parameter
63
E_INDEX_OUT_OF_BOUNDS
,
// index out of bounds
64
E_CMD_PENDING
,
// Command was received correctly, but the execution needs more time. If the command was completely processed, another status message is returned indicating the command's result
65
E_OVERRUN
,
// Data overrun
66
E_RANGE_ERROR
,
// Range error
67
E_AXIS_BLOCKED
,
// Axis is blocked
68
E_FILE_EXISTS
// File already exists
69
}
status_t
;
70
71
72
const
char
*
status_to_str
(
status_t
status
);
73
E_NOT_FOUND
@ E_NOT_FOUND
Definition:
Types.h:59
E_CMD_UNKNOWN
@ E_CMD_UNKNOWN
Definition:
Types.h:52
E_TIMEOUT
@ E_TIMEOUT
Definition:
Types.h:45
msg_t::len
unsigned int len
Definition:
Types.h:31
E_WRITE_ERROR
@ E_WRITE_ERROR
Definition:
Types.h:47
E_NOT_ENOUGH_PARAMS
@ E_NOT_ENOUGH_PARAMS
Definition:
Types.h:51
status_t
status_t
Definition:
Types.h:36
E_NO_PARAM_EXPECTED
@ E_NO_PARAM_EXPECTED
Definition:
Types.h:50
E_IO_ERROR
@ E_IO_ERROR
Definition:
Types.h:61
status_to_str
const char * status_to_str(status_t status)
E_FEATURE_NOT_SUPPORTED
@ E_FEATURE_NOT_SUPPORTED
Definition:
Types.h:43
E_INCONSISTENT_DATA
@ E_INCONSISTENT_DATA
Definition:
Types.h:44
E_CMD_FORMAT_ERROR
@ E_CMD_FORMAT_ERROR
Definition:
Types.h:53
armarx::status
status
Definition:
FiniteStateMachine.h:259
E_INDEX_OUT_OF_BOUNDS
@ E_INDEX_OUT_OF_BOUNDS
Definition:
Types.h:63
E_ALREADY_RUNNING
@ E_ALREADY_RUNNING
Definition:
Types.h:42
E_INSUFFICIENT_RESOURCES
@ E_INSUFFICIENT_RESOURCES
Definition:
Types.h:48
E_OVERRUN
@ E_OVERRUN
Definition:
Types.h:65
E_NOT_AVAILABLE
@ E_NOT_AVAILABLE
Definition:
Types.h:39
E_CMD_FAILED
@ E_CMD_FAILED
Definition:
Types.h:56
E_ACCESS_DENIED
@ E_ACCESS_DENIED
Definition:
Types.h:54
E_NO_SENSOR
@ E_NO_SENSOR
Definition:
Types.h:40
msg_t::id
unsigned char id
Definition:
Types.h:30
E_INVALID_HANDLE
@ E_INVALID_HANDLE
Definition:
Types.h:58
E_INVALID_PARAMETER
@ E_INVALID_PARAMETER
Definition:
Types.h:62
E_CHECKSUM_ERROR
@ E_CHECKSUM_ERROR
Definition:
Types.h:49
E_NOT_INITIALIZED
@ E_NOT_INITIALIZED
Definition:
Types.h:41
E_NOT_OPEN
@ E_NOT_OPEN
Definition:
Types.h:60
E_READ_ERROR
@ E_READ_ERROR
Definition:
Types.h:46
msg_t
Definition:
Types.h:28
E_CMD_ABORTED
@ E_CMD_ABORTED
Definition:
Types.h:57
E_SUCCESS
@ E_SUCCESS
Definition:
Types.h:38
msg_t::data
std::vector< unsigned char > data
Definition:
Types.h:32
E_CMD_PENDING
@ E_CMD_PENDING
Definition:
Types.h:64
E_RANGE_ERROR
@ E_RANGE_ERROR
Definition:
Types.h:66
E_ALREADY_OPEN
@ E_ALREADY_OPEN
Definition:
Types.h:55
E_FILE_EXISTS
@ E_FILE_EXISTS
Definition:
Types.h:68
E_AXIS_BLOCKED
@ E_AXIS_BLOCKED
Definition:
Types.h:67
RobotAPI
drivers
WeissHapticSensor
Types.h
Generated on Sat Oct 12 2024 09:14:07 for armarx_documentation by
1.8.17