31 rawName &= ~(
static_cast<std::uint64_t
>(1) << 63);
32 rawName |= (
static_cast<std::uint64_t
>(value) << 63);
37 return ((
rawName >> 60) & 0x07);
44 LOG_ERROR(
"[NAME]: Industry group out of range, must be between 0 and 7");
46 rawName &= ~static_cast<std::uint64_t>(0x7000000000000000);
47 rawName |= (
static_cast<std::uint64_t
>(value & 0x07) << 60);
52 return ((
rawName >> 56) & 0x0F);
59 LOG_ERROR(
"[NAME]: Device class instance out of range, must be between 0 and 15");
61 rawName &= ~static_cast<std::uint64_t>(0xF00000000000000);
62 rawName |= (
static_cast<std::uint64_t
>(value & 0x0F) << 56);
67 return ((
rawName >> 49) & 0x7F);
74 LOG_ERROR(
"[NAME]: Device class out of range, must be between 0 and 127");
76 rawName &= ~static_cast<std::uint64_t>(0xFE000000000000);
77 rawName |= (
static_cast<std::uint64_t
>(value & 0x7F) << 49);
82 return ((
rawName >> 40) & 0xFF);
87 rawName &= ~static_cast<std::uint64_t>(0xFF0000000000);
88 rawName |= (
static_cast<std::uint64_t
>(value & 0xFF) << 40);
93 return ((
rawName >> 35) & 0x1F);
100 LOG_ERROR(
"[NAME]: Function instance out of range, must be between 0 and 31");
102 rawName &= ~static_cast<std::uint64_t>(0xF800000000);
103 rawName |= (
static_cast<std::uint64_t
>(value & 0x1F) << 35);
108 return ((
rawName >> 32) & 0x07);
115 LOG_ERROR(
"[NAME]: ECU instance out of range, must be between 0 and 7");
117 rawName &= ~static_cast<std::uint64_t>(0x700000000);
118 rawName |= (
static_cast<std::uint64_t
>(value & 0x07) << 32);
123 return ((
rawName >> 21) & 0x07FF);
130 LOG_ERROR(
"[NAME]: Manufacturer code out of range, must be between 0 and 2047");
132 rawName &= ~static_cast<std::uint64_t>(0xFFE00000);
133 rawName |= (
static_cast<std::uint64_t
>(value & 0x07FF) << 21);
143 if (value > 0x001FFFFF)
145 LOG_ERROR(
"[NAME]: Identity number out of range, must be between 0 and 2097151");
147 rawName &= ~static_cast<std::uint64_t>(0x1FFFFF);
148 rawName |=
static_cast<std::uint64_t
>(value & 0x1FFFFF);
A class that represents a control function's NAME.
A class that acts as a logging sink. The intent is that someone could make their own derived class of...
A class that represents an ISO11783 control function NAME from an address claim.
std::uint8_t get_ecu_instance() const
Gets the ecu instance encoded in the NAME.
bool get_arbitrary_address_capable() const
Returns if the ECU is capable of address arbitration.
NAME(std::uint64_t rawNAMEData=0)
Constructor for a NAME.
std::uint8_t get_function_instance() const
Gets the function instance encoded in the NAME.
void set_device_class_instance(std::uint8_t value)
Sets the device class instance (vehicle system) to be encoded in the NAME.
void set_manufacturer_code(std::uint16_t value)
Sets the manufacturer code encoded in the NAME.
void set_ecu_instance(std::uint8_t value)
Sets the ecu instance encoded in the NAME.
void set_function_instance(std::uint8_t value)
Sets the function instance encoded in the NAME.
std::uint16_t get_manufacturer_code() const
Gets the manufacturer code encoded in the NAME.
void set_function_code(std::uint8_t value)
Sets the function code encoded in the NAME.
std::uint64_t rawName
A raw, 64 bit NAME encoded with all NAMEParameters.
void set_industry_group(std::uint8_t value)
Sets the industry group encoded in the NAME.
std::uint8_t get_function_code() const
Gets the function code encoded in the NAME.
std::uint8_t get_device_class_instance() const
Returns the device class (vehicle system) encoded in the NAME.
std::uint64_t get_full_name() const
Gets the raw 64 bit NAME.
std::uint8_t get_industry_group() const
Returns the industry group encoded in the NAME.
bool operator==(const NAME &obj) const
A useful way to compare session objects to each other for equality.
void set_identity_number(std::uint32_t value)
Sets the identity number encoded in the NAME.
void set_arbitrary_address_capable(bool value)
Sets the data in the NAME that corresponds to the arbitration capability of the ECU.
std::uint8_t get_device_class() const
Returns the device class (vehicle system) encoded in the NAME.
void set_full_name(std::uint64_t value)
Sets the raw, encoded 64 bit NAME.
void set_device_class(std::uint8_t value)
Sets the device class (vehicle system) to be encoded in the NAME.
std::uint32_t get_identity_number() const
Gets the identity number encoded in the NAME.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...