39template <
class T, u
int16_t N>
40typename canopen_traits<T, N, true>::c_type
41canopen_traits<T, N, true>::construct(
const void* p, ::std::size_t n,
42 ::std::error_code& ec)
noexcept {
43 auto val =
typename canopen_traits<T, N, true>::c_type();
52#ifndef DOXYGEN_SHOULD_SKIP_THIS
55template bool canopen_traits<bool, 0x0001, true>::construct(
56 const void*, ::std::size_t, ::std::error_code&)
noexcept;
59template int8_t canopen_traits<int8_t, 0x0002, true>::construct(
60 const void*, ::std::size_t, ::std::error_code&)
noexcept;
63template int16_t canopen_traits<int16_t, 0x0003, true>::construct(
64 const void*, ::std::size_t, ::std::error_code&)
noexcept;
67template int32_t canopen_traits<int32_t, 0x0004, true>::construct(
68 const void*, ::std::size_t, ::std::error_code&)
noexcept;
71template uint8_t canopen_traits<uint8_t, 0x0005, true>::construct(
72 const void*, ::std::size_t, ::std::error_code&)
noexcept;
75template uint16_t canopen_traits<uint16_t, 0x0006, true>::construct(
76 const void*, ::std::size_t, ::std::error_code&)
noexcept;
79template uint32_t canopen_traits<uint32_t, 0x0007, true>::construct(
80 const void*, ::std::size_t, ::std::error_code&)
noexcept;
83template float canopen_traits<float, 0x0008, true>::construct(
84 const void*, ::std::size_t, ::std::error_code&)
noexcept;
95template double canopen_traits<double, 0x0011, true>::construct(
96 const void*, ::std::size_t, ::std::error_code&)
noexcept;
103template int64_t canopen_traits<int64_t, 0x0015, true>::construct(
104 const void*, ::std::size_t, ::std::error_code&)
noexcept;
112template uint64_t canopen_traits<uint64_t, 0x001b, true>::construct(
113 const void*, ::std::size_t, ::std::error_code&)
noexcept;
120canopen_traits<::std::string>::construct(
const void* p, ::std::size_t n,
121 ::std::error_code& ec)
noexcept {
132canopen_traits<::std::string>::destroy(
char*& val)
noexcept {
137canopen_traits<::std::string>::to_c_type(
const char* vs,
138 ::std::error_code& ec)
noexcept {
151canopen_traits<::std::vector<uint8_t>>::construct(
152 const void* p, ::std::size_t n, ::std::error_code& ec)
noexcept {
153 uint8_t* val =
nullptr;
163canopen_traits<::std::vector<uint8_t>>::destroy(uint8_t*& val)
noexcept {
168canopen_traits<::std::vector<uint8_t>>::to_c_type(
169 const uint8_t* os, ::std::size_t n, ::std::error_code& ec)
noexcept {
170 uint8_t* val =
nullptr;
182canopen_traits<::std::vector<uint8_t>>::size(
const uint8_t* val)
noexcept {
187canopen_traits<::std::basic_string<char16_t>>::construct(
188 const void* p, ::std::size_t n, ::std::error_code& ec)
noexcept {
189 char16_t* val =
nullptr;
199canopen_traits<::std::basic_string<char16_t>>::destroy(
200 char16_t*& val)
noexcept {
205canopen_traits<::std::basic_string<char16_t>>::to_c_type(
206 const char16_t* us, ::std::error_code& ec)
noexcept {
207 char16_t* val =
nullptr;
This header file is part of the C++ CANopen application library; it contains the CANopen type traits.
This is the internal header file of the C++ CANopen application library.
int get_errc(void)
Returns the last (thread-specific) native error code set by a system call or library function.
void set_errc(int errc)
Sets the current (thread-specific) native error code to errc.
This header file is part of the utilities library; it contains C++ convenience functions for creating...
SdoErrc
The SDO abort codes.
::std::error_code make_error_code(SdoErrc e) noexcept
Creates an error code corresponding to an SDO abort code.
This header file is part of the C++ CANopen application library; it contains the SDO error declaratio...
This header file is part of the CANopen library; it contains the CANopen value declarations.
int co_val_init_os(uint_least8_t **val, const uint_least8_t *os, size_t n)
Initializes an array of octets (CO_DEFTYPE_OCTET_STRING).
size_t co_val_sizeof(co_unsigned16_t type, const void *val)
Returns the size (in bytes) of a value of the specified data type.
int co_val_init_us(char16_t **val, const char16_t *us)
Initializes an array of (16-bit) Unicode characters (CO_DEFTYPE_UNICODE_STRING).
co_unsigned32_t co_val_read_sdo(co_unsigned16_t type, void *val, const void *ptr, size_t n)
Reads a value of the specified data type from an SDO buffer.
void co_val_fini(co_unsigned16_t type, void *val)
Finalizes a value of the specified data type.
int co_val_init_vs(char **val, const char *vs)
Initializes an array of visible characters (CO_DEFTYPE_VISIBLE_STRING).