ReduxLib C++ 2026.1.2
Loading...
Searching...
No Matches
CanandcolorDetails.h
1// Copyright (c) Bagholders of Redux Robotics and other contributors.
2// This is open source and can be modified and shared under the Mozilla Public License v2.0.
3
4#pragma once
5#include <cinttypes>
6#include <vector>
7#include <cstring>
8#include "redux/canand/CanandUtils.h"
9#include "redux/canand/CanandAddress.h"
10
11/**
12 * Canandcolor protocol-level definitions.
13 *
14 * This file is autogenerated by canandmessage, <b>do not hand-edit!</b>
15 */
17
18 /** Types. */
19 namespace types {
20 /** SettingReportFlags bitset definition */
22 public:
23 enum : uint8_t {
24 /** Whether the setting set/fetch was successful */
25 kSetSuccess = 1 << 0,
26
27 /** Whether the setting synch commit was successful */
29
30 };
31 };
32
33 /** AtomicAnnouncementFlags bitset definition */
35 public:
36 enum : uint8_t {
37 /** Device should enter negotiation phase */
38 kNegotiation = 1 << 0,
39
40 /** Device should initialize bus with new rate */
41 kInit = 1 << 1,
42
43 /** Device should confirm new bus rate */
44 kConfirm = 1 << 2,
45
46 /** Device should begin transmission */
47 kBeginTx = 1 << 3,
48
49 /** Device should cease all transmission */
50 kBusInterrupt = 1 << 4,
51
52 };
53 };
54
55 /** Faults bitset definition */
56 class Faults {
57 public:
58 enum : uint8_t {
59 /** The power cycle fault flag, which is set to true when the device first boots.
60 Clearing sticky faults and then checking this flag can be used to determine if the device rebooted.
61 */
62 kPowerCycle = 1 << 0,
63
64 /** The CAN ID conflict flag, which is set to true if there is a CAN id conflict.
65 In practice, you should physically inspect the device to ensure it's not flashing blue.
66 */
68
69 /** The CAN general error flag, which will raise if the device encounters a CAN fault during operation.
70 If communication with the device still functions, this will not register as an active fault for long if at all.
71 This may raise due to wiring issues, such as an intermittently shorted CAN bus.
72 */
74
75 /** The temperature range flag, which will raise if the device is not between 0-70 degrees Celsius.
76 This may be of concern if the device is near very active motors.
77 */
79
80 /** The hardware fault flag corresponding to the distance sensor IC, which will raise if a hardware issue is detected.
81 Generally will raise if the device's controller cannot read the physical sensor itself.
82 */
84
85 /** The hardware fault flag corresponding to the color sensor IC, which will raise if a hardware issue is detected.
86 Generally will raise if the device's controller cannot read the physical sensor itself.
87 */
89
90 /** The I2C bus recovery flag, which will raise when the device needs to completely restart the I2C bus.
91 This fault flag should not be active for very long; if it is stuck as an active fault, that may indicate a hardware issue.
92 */
94
95 };
96 };
97
98 /** DigoutCond bitset definition */
99 class DigoutCond {
100 public:
101 enum : uint16_t {
102 /** Slot 0 */
103 kSlot0 = 1 << 0,
104
105 /** Slot 1 */
106 kSlot1 = 1 << 1,
107
108 /** Slot 2 */
109 kSlot2 = 1 << 2,
110
111 /** Slot 3 */
112 kSlot3 = 1 << 3,
113
114 /** Slot 4 */
115 kSlot4 = 1 << 4,
116
117 /** Slot 5 */
118 kSlot5 = 1 << 5,
119
120 /** Slot 6 */
121 kSlot6 = 1 << 6,
122
123 /** Slot 7 */
124 kSlot7 = 1 << 7,
125
126 /** Slot 8 */
127 kSlot8 = 1 << 8,
128
129 /** Slot 9 */
130 kSlot9 = 1 << 9,
131
132 /** Slot 10 */
133 kSlot10 = 1 << 10,
134
135 /** Slot 11 */
136 kSlot11 = 1 << 11,
137
138 /** Slot 12 */
139 kSlot12 = 1 << 12,
140
141 /** Slot 13 */
142 kSlot13 = 1 << 13,
143
144 /** Slot 14 */
145 kSlot14 = 1 << 14,
146
147 /** Slot 15 */
148 kSlot15 = 1 << 15,
149
150 };
151 };
152
153 /** ATOMIC_BOND_BUS_RATE enum definition */
155 public:
156 enum : uint8_t {
157 /** 1 megabit/s CAN 2.0B */
159
160 /** 1 megabit/s CAN-FD */
162
163 /** 5 megabit/s CAN-FD */
165
166 /** 8 megabit/s CAN-FD */
168
169 };
170 };
171
172 /** EXTRA_FRAME_MODE enum definition */
174 public:
175 enum : uint8_t {
176 /** Do not emit extra frames beyond those specified in the frame period */
178
179 /** Transmits a frame immidiately once readings change */
181
182 };
183 };
184
185 /** DIGOUT_OUTPUT_CONFIG enum definition */
187 public:
188 enum : uint8_t {
189 /** Disable output on this pin */
191
192 /** Use digital logic pin, output 3.3v on true and 0v on false */
194
195 /** Use digital logic pin, output 0v on true and 3.3v on false */
197
198 /** Output a duty cycle on this pin. Only works on DIG-2 */
200
201 };
202 };
203
204 /** SLOT_OPCODE enum definition */
206 public:
207 enum : uint8_t {
208 /** true if ``a = b * (imm_scaling + 1) / 256 + (imm_additive)`` */
209 kEquals = 0x0,
210
211 /** true if ``a < b * (imm_scaling + 1) / 256 + (imm_additive)`` */
213
214 /** true if ``a > b * (imm_scaling + 1) / 256 + (imm_additive)`` */
216
217 /** true if ``a <= b * (imm_scaling + 1) / 256 + (imm_additive)`` */
219
220 /** true if``a >= b * (imm_scaling + 1) / 256 + (imm_additive)`` */
222
223 /** true if previous slot true for ``b * (imm_scaling + 1) / 256 + (imm_additive)`` milliseconds */
225
226 /** true if previous joined-slot-chain true for ``b * (imm_scaling + 1) / 256 + (imm_additive)`` milliseconds */
228
229 };
230 };
231
232 /** NEXT_SLOT_ACTION enum definition */
234 public:
235 enum : uint8_t {
236 /** Do not interact with the next slot */
238
239 /** Logical OR with next slot */
241
242 /** Logical XOR with next slot */
244
245 /** Logical AND with next slot */
247
248 };
249 };
250
251 /** DATA_SOURCE enum definition */
253 public:
254 enum : uint8_t {
255 /** Always reads zero; can be used to compare only to additive immidate0 */
256 kZero = 0x0,
257
258 /** Distance reading */
260
261 /** Red reading */
262 kRed = 0x2,
263
264 /** Green reading */
265 kGreen = 0x3,
266
267 /** Blue reading */
268 kBlue = 0x4,
269
270 /** Hue reading */
271 kHue = 0x5,
272
273 /** Saturation reading */
275
276 /** Value reading */
277 kValue = 0x7,
278
279 };
280 };
281
282 /** COLOR_INTEGRATION_PERIOD enum definition */
284 public:
285 enum : uint8_t {
286 /** 400 ms - 20 bit resolution */
288
289 /** 200 ms - 19 bit resolution */
291
292 /** 100 ms - 18 bit resolution */
294
295 /** 50 ms - 17 bit resolution */
297
298 /** 25 ms - 16 bit resolution */
300
301 };
302 };
303
304 /** DISTANCE_INTEGRATION_PERIOD enum definition */
306 public:
307 enum : uint8_t {
308 /** 5 millisecond period */
310
311 /** 7.5 millisecond period */
313
314 /** 10 millisecond period */
316
317 /** 12.5 millisecond period */
319
320 /** 15 millisecond period */
322
323 /** 17.5 millisecond period */
325
326 /** 20 millisecond period */
328
329 /** 40 millisecond period */
331
332 };
333 };
334
335 /** SETTING_COMMAND enum definition */
337 public:
338 enum : uint8_t {
339 /** Fetch all settings from device via a series of :ref:`report setting<msg_report_setting>` messages of all indexes */
341
342 /** Reset all resettanble settings to factory default, and broadcast all setting values via
343 :ref:`report setting<msg_report_setting>` messages.
344 */
346
347 /** Requests to fetch a single setting from device, with its value reported via the
348 :ref:`report setting<msg_report_setting>` message.
349
350 This requires the use of the second byte to specify the setting index to fetch. */
352
353 /** Clear all digout1 slots */
355
356 /** Clear all digout2 slots */
358
359 /** Fetch all digout1 slots and settings */
361
362 /** Fetch all digout2 slots and settings */
364
365 };
366 };
367
368 /** setting_flags definition */
370 public:
371 /** Whether the setting should be set ephemeral */
373
374 /** Whether the setting should be held until the next synch barrier */
376
377 /** Synch message count */
379
380 /**
381 * Decodes a struct.
382 *
383 * @param data intfield to decode
384 * @return a decoded struct
385 */
386 static constexpr SettingFlags decode(uint64_t data) {
387 return SettingFlags {
389 .synch_hold = redux::canand::utils::extractBool(data, 1),
390 .synch_msg_count = redux::canand::utils::extractU8(data, 4, 4),
391 };
392 }
393
394 /**
395 * Encodes a struct.
396 *
397 * @return an encoded struct.
398 */
399 constexpr uint64_t encode() {
400 return (
401 0 |
402 redux::canand::utils::packBool(this->ephemeral, 0) |
403 redux::canand::utils::packBool(this->synch_hold, 1) |
404 redux::canand::utils::packUInt(this->synch_msg_count, 4, 4)
405 );
406 }
407
408
409 };
410
411 /** firmware_version definition */
413 public:
414 /** Firmware version patch number */
416
417 /** Firmware version minor number */
419
420 /** Firmware version year */
422
423 /**
424 * Decodes a struct.
425 *
426 * @param data intfield to decode
427 * @return a decoded struct
428 */
429 static constexpr FirmwareVersion decode(uint64_t data) {
430 return FirmwareVersion {
432 .firmware_minor = redux::canand::utils::extractU8(data, 8, 8),
433 .firmware_year = redux::canand::utils::extractU16(data, 16, 16),
434 };
435 }
436
437 /**
438 * Encodes a struct.
439 *
440 * @return an encoded struct.
441 */
442 constexpr uint64_t encode() {
443 return (
444 0 |
445 redux::canand::utils::packUInt(this->firmware_patch, 8, 0) |
446 redux::canand::utils::packUInt(this->firmware_minor, 8, 8) |
447 redux::canand::utils::packUInt(this->firmware_year, 16, 16)
448 );
449 }
450
451
452 };
453
454 /** digout_control_config definition */
456 public:
457 /** Enable digout pad */
459
460 /** The data source to use in PWM mode. */
462
463 /**
464 * Decodes a struct.
465 *
466 * @param data intfield to decode
467 * @return a decoded struct
468 */
469 static constexpr DigoutControlConfig decode(uint64_t data) {
470 return DigoutControlConfig {
472 .pwm_data_source = redux::canand::utils::extractU8(data, 4, 8),
473 };
474 }
475
476 /**
477 * Encodes a struct.
478 *
479 * @return an encoded struct.
480 */
481 constexpr uint64_t encode() {
482 return (
483 0 |
484 redux::canand::utils::packUInt(this->output_config, 8, 0) |
485 redux::canand::utils::packUInt(this->pwm_data_source, 4, 8)
486 );
487 }
488
489
490 };
491
492 /** digout_message_trigger definition */
494 public:
495 /** Send digout message on positive edge (false->true) */
497
498 /** Send digout message on negative edge (true->false) */
500
501 /**
502 * Decodes a struct.
503 *
504 * @param data intfield to decode
505 * @return a decoded struct
506 */
507 static constexpr DigoutMessageTrigger decode(uint64_t data) {
508 return DigoutMessageTrigger {
510 .negative_edge = redux::canand::utils::extractBool(data, 1),
511 };
512 }
513
514 /**
515 * Encodes a struct.
516 *
517 * @return an encoded struct.
518 */
519 constexpr uint64_t encode() {
520 return (
521 0 |
522 redux::canand::utils::packBool(this->positive_edge, 0) |
523 redux::canand::utils::packBool(this->negative_edge, 1)
524 );
525 }
526
527
528 };
529
530 /** digout_slot definition */
531 struct DigoutSlot {
532 public:
533 /** Enable the digout slot */
535
536 /** How the digout slot interacts with the next slot */
538
539 /** Invert the digout slot's boolean value */
541
542 /** Opcode */
543 uint8_t opcode;
544
545 /** Additive immidiate */
547
548 /** Scaling immidiate */
550
551 /** First ``LHS`` data source */
553
554 /** Second ``RHS`` data source */
556
557 /**
558 * Decodes a struct.
559 *
560 * @param data intfield to decode
561 * @return a decoded struct
562 */
563 static constexpr DigoutSlot decode(uint64_t data) {
564 return DigoutSlot {
566 .next_slot_action = redux::canand::utils::extractU8(data, 2, 1),
567 .invert_value = redux::canand::utils::extractBool(data, 3),
568 .opcode = redux::canand::utils::extractU8(data, 7, 4),
569 .immidiate_additive = redux::canand::utils::extractI32(data, 21, 11),
570 .immidiate_scaling = redux::canand::utils::extractU8(data, 8, 32),
571 .data_source_a = redux::canand::utils::extractU8(data, 4, 40),
572 .data_source_b = redux::canand::utils::extractU8(data, 4, 44),
573 };
574 }
575
576 /**
577 * Encodes a struct.
578 *
579 * @return an encoded struct.
580 */
581 constexpr uint64_t encode() {
582 return (
583 0 |
584 redux::canand::utils::packBool(this->slot_enabled, 0) |
585 redux::canand::utils::packUInt(this->next_slot_action, 2, 1) |
586 redux::canand::utils::packBool(this->invert_value, 3) |
587 redux::canand::utils::packUInt(this->opcode, 7, 4) |
588 redux::canand::utils::packInt(this->immidiate_additive, 21, 11) |
589 redux::canand::utils::packUInt(this->immidiate_scaling, 8, 32) |
590 redux::canand::utils::packUInt(this->data_source_a, 4, 40) |
591 redux::canand::utils::packUInt(this->data_source_b, 4, 44)
592 );
593 }
594
595
596 };
597
598 }
599
600 /** Messages. */
601 namespace msg {
602 enum : uint8_t {
603 /** setting control command */
605
606 /** update setting on device */
608
609 /** setting value report from device */
611
612 /** Clear device sticky faults */
614
615 /** Status frame */
616 kStatus = 0x6,
617
618 /** Party mode */
620
621 /** Device enumerate response */
623
624 /** Distance frame */
626
627 /** Color frame */
629
630 /** Digital output frame */
632
633 /** Clear sticky digout state which is broadcast over CAN */
635
636 };
637 /** setting control command struct */
639 public:
640 /** Setting command index */
642
643 /** setting index to fetch */
645
646 /**
647 * Decodes a struct.
648 *
649 * @param data intfield to decode
650 * @return a decoded struct
651 */
652 static constexpr SettingCommand decode(uint64_t data) {
653 return SettingCommand {
655 .setting_index = redux::canand::utils::extractU8(data, 8, 8),
656 };
657 }
658
659 /**
660 * Encodes a struct.
661 *
662 * @return an encoded struct.
663 */
664 constexpr uint64_t encode() {
665 return (
666 0 |
667 redux::canand::utils::packUInt(this->control_flag, 8, 0) |
668 redux::canand::utils::packUInt(this->setting_index, 8, 8)
669 );
670 }
671
672
673 /** Minimum acceptable data length code for this message */
674 static const uint32_t DLC_MIN = 1;
675
676 /** Maximum acceptable data length code for this message */
677 static const uint32_t DLC_MAX = 8;
678
679 /**
680 * Sends the message struct to a CanandAddress.
681 * @param addr the address to send to
682 * @return the return value of SendCANMessage
683 */
685 uint64_t data = this->encode();
686 return addr.SendCANMessage(msg::kSettingCommand, (uint8_t*) &data, 8);
687 }
688
689 };
690
691 /** update setting on device struct */
692 struct SetSetting {
693 public:
694 /** Setting index to write to */
695 uint8_t address;
696
697 /** 6-byte setting value */
698 uint64_t value;
699
700 /** Setting flags */
702
703 /**
704 * Decodes a struct.
705 *
706 * @param data intfield to decode
707 * @return a decoded struct
708 */
709 static constexpr SetSetting decode(uint64_t data) {
710 return SetSetting {
712 .value = redux::canand::utils::extractU64(data, 48, 8),
713 .flags = types::SettingFlags::decode(data >> 56),
714 };
715 }
716
717 /**
718 * Encodes a struct.
719 *
720 * @return an encoded struct.
721 */
722 constexpr uint64_t encode() {
723 return (
724 0 |
725 redux::canand::utils::packUInt(this->address, 8, 0) |
726 redux::canand::utils::packUInt(this->value, 48, 8) |
727 (this->flags.encode() << 56)
728 );
729 }
730
731
732 /** Minimum acceptable data length code for this message */
733 static const uint32_t DLC_MIN = 8;
734
735 /** Maximum acceptable data length code for this message */
736 static const uint32_t DLC_MAX = 8;
737
738 /**
739 * Sends the message struct to a CanandAddress.
740 * @param addr the address to send to
741 * @return the return value of SendCANMessage
742 */
744 uint64_t data = this->encode();
745 return addr.SendCANMessage(msg::kSetSetting, (uint8_t*) &data, 8);
746 }
747
748 };
749
750 /** setting value report from device struct */
752 public:
753 /** Setting index to write to */
754 uint8_t address;
755
756 /** 6-byte setting value */
757 uint64_t value;
758
759 /** Setting receive status */
760 uint8_t flags;
761
762 /**
763 * Decodes a struct.
764 *
765 * @param data intfield to decode
766 * @return a decoded struct
767 */
768 static constexpr ReportSetting decode(uint64_t data) {
769 return ReportSetting {
771 .value = redux::canand::utils::extractU64(data, 48, 8),
772 .flags = redux::canand::utils::extractU8(data, 8, 56),
773 };
774 }
775
776 /**
777 * Encodes a struct.
778 *
779 * @return an encoded struct.
780 */
781 constexpr uint64_t encode() {
782 return (
783 0 |
784 redux::canand::utils::packUInt(this->address, 8, 0) |
785 redux::canand::utils::packUInt(this->value, 48, 8) |
786 redux::canand::utils::packUInt(this->flags, 8, 56)
787 );
788 }
789
790
791 /** Minimum acceptable data length code for this message */
792 static const uint32_t DLC_MIN = 8;
793
794 /** Maximum acceptable data length code for this message */
795 static const uint32_t DLC_MAX = 8;
796
797 /**
798 * Sends the message struct to a CanandAddress.
799 * @param addr the address to send to
800 * @return the return value of SendCANMessage
801 */
803 uint64_t data = this->encode();
804 return addr.SendCANMessage(msg::kReportSetting, (uint8_t*) &data, 8);
805 }
806
807 };
808
809 /** Clear device sticky faults struct */
811 public:
812
813 /**
814 * Decodes a struct.
815 *
816 * @param data intfield to decode
817 * @return a decoded struct
818 */
819 static constexpr ClearStickyFaults decode(uint64_t data) {
820 return ClearStickyFaults {
821
822 };
823 }
824
825 /**
826 * Encodes a struct.
827 *
828 * @return an encoded struct.
829 */
830 constexpr uint64_t encode() {
831 return (
832 0
833 );
834 }
835
836
837 /** Minimum acceptable data length code for this message */
838 static const uint32_t DLC_MIN = 0;
839
840 /** Maximum acceptable data length code for this message */
841 static const uint32_t DLC_MAX = 8;
842
843 /**
844 * Sends the message struct to a CanandAddress.
845 * @param addr the address to send to
846 * @return the return value of SendCANMessage
847 */
849 uint64_t data = this->encode();
850 return addr.SendCANMessage(msg::kClearStickyFaults, (uint8_t*) &data, 8);
851 }
852
853 };
854
855 /** Status frame struct */
856 struct Status {
857 public:
858 /** 8-bit active faults bitfield */
859 uint8_t faults;
860
861 /** 8-bit sticky faults bitfield */
863
864 /** 16-bit signed temperature byte in 1/256ths of a Celsius */
865 int16_t temperature;
866
867 /**
868 * Decodes a struct.
869 *
870 * @param data intfield to decode
871 * @return a decoded struct
872 */
873 static constexpr Status decode(uint64_t data) {
874 return Status {
876 .sticky_faults = redux::canand::utils::extractU8(data, 8, 8),
877 .temperature = redux::canand::utils::extractI16(data, 16, 16),
878 };
879 }
880
881 /**
882 * Encodes a struct.
883 *
884 * @return an encoded struct.
885 */
886 constexpr uint64_t encode() {
887 return (
888 0 |
889 redux::canand::utils::packUInt(this->faults, 8, 0) |
890 redux::canand::utils::packUInt(this->sticky_faults, 8, 8) |
891 redux::canand::utils::packInt(this->temperature, 16, 16)
892 );
893 }
894
895
896 /** Minimum acceptable data length code for this message */
897 static const uint32_t DLC_MIN = 8;
898
899 /** Maximum acceptable data length code for this message */
900 static const uint32_t DLC_MAX = 8;
901
902 /**
903 * Sends the message struct to a CanandAddress.
904 * @param addr the address to send to
905 * @return the return value of SendCANMessage
906 */
908 uint64_t data = this->encode();
909 return addr.SendCANMessage(msg::kStatus, (uint8_t*) &data, 8);
910 }
911
912 };
913
914 /** Party mode struct */
915 struct PartyMode {
916 public:
917 /** Party level. 0 disables the strobe, whereas 1 enables it. */
918 uint8_t party_level;
919
920 /**
921 * Decodes a struct.
922 *
923 * @param data intfield to decode
924 * @return a decoded struct
925 */
926 static constexpr PartyMode decode(uint64_t data) {
927 return PartyMode {
929 };
930 }
931
932 /**
933 * Encodes a struct.
934 *
935 * @return an encoded struct.
936 */
937 constexpr uint64_t encode() {
938 return (
939 0 |
940 redux::canand::utils::packUInt(this->party_level, 8, 0)
941 );
942 }
943
944
945 /** Minimum acceptable data length code for this message */
946 static const uint32_t DLC_MIN = 1;
947
948 /** Maximum acceptable data length code for this message */
949 static const uint32_t DLC_MAX = 8;
950
951 /**
952 * Sends the message struct to a CanandAddress.
953 * @param addr the address to send to
954 * @return the return value of SendCANMessage
955 */
957 uint64_t data = this->encode();
958 return addr.SendCANMessage(msg::kPartyMode, (uint8_t*) &data, 8);
959 }
960
961 };
962
963 /** Device enumerate response struct */
964 struct Enumerate {
965 public:
966 /** Device-unique serial number */
967 uint64_t serial;
968
969 /** Device is in bootloader. */
971
972 /**
973 * Decodes a struct.
974 *
975 * @param data intfield to decode
976 * @return a decoded struct
977 */
978 static constexpr Enumerate decode(uint64_t data) {
979 return Enumerate {
981 .is_bootloader = redux::canand::utils::extractBool(data, 48),
982 };
983 }
984
985 /**
986 * Encodes a struct.
987 *
988 * @return an encoded struct.
989 */
990 constexpr uint64_t encode() {
991 return (
992 0 |
993 redux::canand::utils::packUInt(this->serial, 48, 0) |
994 redux::canand::utils::packBool(this->is_bootloader, 48)
995 );
996 }
997
998
999 /** Minimum acceptable data length code for this message */
1000 static const uint32_t DLC_MIN = 8;
1001
1002 /** Maximum acceptable data length code for this message */
1003 static const uint32_t DLC_MAX = 8;
1004
1005 /**
1006 * Sends the message struct to a CanandAddress.
1007 * @param addr the address to send to
1008 * @return the return value of SendCANMessage
1009 */
1011 uint64_t data = this->encode();
1012 return addr.SendCANMessage(msg::kEnumerate, (uint8_t*) &data, 8);
1013 }
1014
1015 };
1016
1017 /** Distance frame struct */
1019 public:
1020 /** 16-bit distance value. Actual correspondance to real-world units is config and surface-dependent. */
1021 uint16_t distance;
1022
1023 /**
1024 * Decodes a struct.
1025 *
1026 * @param data intfield to decode
1027 * @return a decoded struct
1028 */
1029 static constexpr DistanceOutput decode(uint64_t data) {
1030 return DistanceOutput {
1032 };
1033 }
1034
1035 /**
1036 * Encodes a struct.
1037 *
1038 * @return an encoded struct.
1039 */
1040 constexpr uint64_t encode() {
1041 return (
1042 0 |
1043 redux::canand::utils::packUInt(this->distance, 16, 0)
1044 );
1045 }
1046
1047
1048 /** Minimum acceptable data length code for this message */
1049 static const uint32_t DLC_MIN = 2;
1050
1051 /** Maximum acceptable data length code for this message */
1052 static const uint32_t DLC_MAX = 2;
1053
1054 /**
1055 * Sends the message struct to a CanandAddress.
1056 * @param addr the address to send to
1057 * @return the return value of SendCANMessage
1058 */
1060 uint64_t data = this->encode();
1061 return addr.SendCANMessage(msg::kDistanceOutput, (uint8_t*) &data, 2);
1062 }
1063
1064 };
1065
1066 /** Color frame struct */
1068 public:
1069 /** Red reading magnitude */
1070 uint32_t red;
1071
1072 /** Green reading magnitude */
1073 uint32_t green;
1074
1075 /** Blue reading magnitude */
1076 uint32_t blue;
1077
1078 /** Color integration period */
1079 uint8_t period;
1080
1081 /**
1082 * Decodes a struct.
1083 *
1084 * @param data intfield to decode
1085 * @return a decoded struct
1086 */
1087 static constexpr ColorOutput decode(uint64_t data) {
1088 return ColorOutput {
1089 .red = redux::canand::utils::extractU32(data, 20, 0),
1090 .green = redux::canand::utils::extractU32(data, 20, 20),
1091 .blue = redux::canand::utils::extractU32(data, 20, 40),
1092 .period = redux::canand::utils::extractU8(data, 4, 60),
1093 };
1094 }
1095
1096 /**
1097 * Encodes a struct.
1098 *
1099 * @return an encoded struct.
1100 */
1101 constexpr uint64_t encode() {
1102 return (
1103 0 |
1104 redux::canand::utils::packUInt(this->red, 20, 0) |
1105 redux::canand::utils::packUInt(this->green, 20, 20) |
1106 redux::canand::utils::packUInt(this->blue, 20, 40) |
1107 redux::canand::utils::packUInt(this->period, 4, 60)
1108 );
1109 }
1110
1111
1112 /** Minimum acceptable data length code for this message */
1113 static const uint32_t DLC_MIN = 8;
1114
1115 /** Maximum acceptable data length code for this message */
1116 static const uint32_t DLC_MAX = 8;
1117
1118 /**
1119 * Sends the message struct to a CanandAddress.
1120 * @param addr the address to send to
1121 * @return the return value of SendCANMessage
1122 */
1124 uint64_t data = this->encode();
1125 return addr.SendCANMessage(msg::kColorOutput, (uint8_t*) &data, 8);
1126 }
1127
1128 };
1129
1130 /** Digital output frame struct */
1132 public:
1133 /** Digital output state for DIGOUT1 */
1135
1136 /** Digital output state for DIGOUT2 */
1138
1139 /** Sticky digital output state for DIGOUT1 */
1141
1142 /** Sticky digital output state for DIGOUT1 */
1144
1145 /** DIGOUT1 condition slot flags. A value of 1 for bit N means that condition slot is true. Bits are indexed little-endian. */
1147
1148 /** DIGOUT2 condition slot flags. A value of 1 for bit N means that condition slot is true. Bits are indexed little-endian. */
1150
1151 /**
1152 * Decodes a struct.
1153 *
1154 * @param data intfield to decode
1155 * @return a decoded struct
1156 */
1157 static constexpr DigitalOutput decode(uint64_t data) {
1158 return DigitalOutput {
1160 .digout2_state = redux::canand::utils::extractBool(data, 1),
1161 .digout1_sticky = redux::canand::utils::extractBool(data, 2),
1162 .digout2_sticky = redux::canand::utils::extractBool(data, 3),
1163 .digout1_cond = redux::canand::utils::extractU16(data, 16, 8),
1164 .digout2_cond = redux::canand::utils::extractU16(data, 16, 24),
1165 };
1166 }
1167
1168 /**
1169 * Encodes a struct.
1170 *
1171 * @return an encoded struct.
1172 */
1173 constexpr uint64_t encode() {
1174 return (
1175 0 |
1176 redux::canand::utils::packBool(this->digout1_state, 0) |
1177 redux::canand::utils::packBool(this->digout2_state, 1) |
1178 redux::canand::utils::packBool(this->digout1_sticky, 2) |
1179 redux::canand::utils::packBool(this->digout2_sticky, 3) |
1180 redux::canand::utils::packUInt(this->digout1_cond, 16, 8) |
1181 redux::canand::utils::packUInt(this->digout2_cond, 16, 24)
1182 );
1183 }
1184
1185
1186 /** Minimum acceptable data length code for this message */
1187 static const uint32_t DLC_MIN = 5;
1188
1189 /** Maximum acceptable data length code for this message */
1190 static const uint32_t DLC_MAX = 5;
1191
1192 /**
1193 * Sends the message struct to a CanandAddress.
1194 * @param addr the address to send to
1195 * @return the return value of SendCANMessage
1196 */
1198 uint64_t data = this->encode();
1199 return addr.SendCANMessage(msg::kDigitalOutput, (uint8_t*) &data, 5);
1200 }
1201
1202 };
1203
1204 /** Clear sticky digout state which is broadcast over CAN struct */
1206 public:
1207
1208 /**
1209 * Decodes a struct.
1210 *
1211 * @param data intfield to decode
1212 * @return a decoded struct
1213 */
1214 static constexpr ClearStickyDigout decode(uint64_t data) {
1215 return ClearStickyDigout {
1216
1217 };
1218 }
1219
1220 /**
1221 * Encodes a struct.
1222 *
1223 * @return an encoded struct.
1224 */
1225 constexpr uint64_t encode() {
1226 return (
1227 0
1228 );
1229 }
1230
1231
1232 /** Minimum acceptable data length code for this message */
1233 static const uint32_t DLC_MIN = 0;
1234
1235 /** Maximum acceptable data length code for this message */
1236 static const uint32_t DLC_MAX = 0;
1237
1238 /**
1239 * Sends the message struct to a CanandAddress.
1240 * @param addr the address to send to
1241 * @return the return value of SendCANMessage
1242 */
1244 uint64_t data = this->encode();
1245 return addr.SendCANMessage(msg::kClearStickyDigout, (uint8_t*) &data, 0);
1246 }
1247
1248 };
1249
1250 }
1251
1252 /** Settings. */
1253 namespace setting {
1254 enum : uint8_t {
1255 /** Status frame period (ms) */
1257
1258 /** Serial number */
1260
1261 /** Firmware version */
1263
1264 /** Device-specific type identifier */
1266
1267 /** User-writable scratch bytes 1 */
1269
1270 /** User-writable scratch bytes 2 */
1272
1273 /** Distance frame period (ms) */
1275
1276 /** Color frame period (ms) */
1278
1279 /** Digout frame period (ms) */
1281
1282 /** Distance extra frame mode */
1284
1285 /** Color extra frame frame mode */
1287
1288 /** Lamp LED brightness */
1290
1291 /** Color integration period */
1293
1294 /** Distance integration period */
1296
1297 /** Digital output 1 control config */
1299
1300 /** Digital output 2 control config */
1302
1303 /** Digital output 1 send message on change */
1305
1306 /** Digital output 2 send message on change */
1308
1309 /** Digout1 config slot 0 */
1311
1312 /** Digout1 config slot 1 */
1314
1315 /** Digout1 config slot 2 */
1317
1318 /** Digout1 config slot 3 */
1320
1321 /** Digout1 config slot 4 */
1323
1324 /** Digout1 config slot 5 */
1326
1327 /** Digout1 config slot 6 */
1329
1330 /** Digout1 config slot 7 */
1332
1333 /** Digout1 config slot 8 */
1335
1336 /** Digout1 config slot 9 */
1338
1339 /** Digout1 config slot 10 */
1341
1342 /** Digout1 config slot 11 */
1344
1345 /** Digout1 config slot 12 */
1347
1348 /** Digout1 config slot 13 */
1350
1351 /** Digout1 config slot 14 */
1353
1354 /** Digout1 config slot 15 */
1356
1357 /** Digout2 config slot 0 */
1359
1360 /** Digout2 config slot 1 */
1362
1363 /** Digout2 config slot 2 */
1365
1366 /** Digout2 config slot 3 */
1368
1369 /** Digout2 config slot 4 */
1371
1372 /** Digout2 config slot 5 */
1374
1375 /** Digout2 config slot 6 */
1377
1378 /** Digout2 config slot 7 */
1380
1381 /** Digout2 config slot 8 */
1383
1384 /** Digout2 config slot 9 */
1386
1387 /** Digout2 config slot 10 */
1389
1390 /** Digout2 config slot 11 */
1392
1393 /** Digout2 config slot 12 */
1395
1396 /** Digout2 config slot 13 */
1398
1399 /** Digout2 config slot 14 */
1401
1402 /** Digout2 config slot 15 */
1404
1405 };
1406 /**
1407 * Construct setting STATUS_FRAME_PERIOD
1408 * @param data the data to pack into a setting bitfield
1409 * @return 48-bit data field of settings in the wire format
1410 */
1411 inline uint64_t constructStatusFramePeriod(uint16_t data) {
1412 return redux::canand::utils::packUInt(data, 16, 0);
1413 }
1414
1415 /**
1416 * Unpack setting STATUS_FRAME_PERIOD from the wire format.
1417 * @param data the 48-bit data field to extract a setting struct from.
1418 * @return a setting struct
1419 */
1420 inline uint16_t extractStatusFramePeriod(uint64_t data) {
1421 return redux::canand::utils::extractU16(data, 16, 0);
1422 }
1423
1424 /**
1425 * Construct setting SERIAL_NUMBER
1426 * @param data the data to pack into a setting bitfield
1427 * @return 48-bit data field of settings in the wire format
1428 */
1429 inline uint64_t constructSerialNumber(uint64_t data) {
1430 return redux::canand::utils::packUInt(data, 48, 0);
1431 }
1432
1433 /**
1434 * Unpack setting SERIAL_NUMBER from the wire format.
1435 * @param data the 48-bit data field to extract a setting struct from.
1436 * @return a setting struct
1437 */
1438 inline uint64_t extractSerialNumber(uint64_t data) {
1439 return redux::canand::utils::extractU64(data, 48, 0);
1440 }
1441
1442 /**
1443 * Construct setting FIRMWARE_VERSION
1444 * @param data the data to pack into a setting bitfield
1445 * @return 48-bit data field of settings in the wire format
1446 */
1448 return (data.encode() << 0);
1449 }
1450
1451 /**
1452 * Unpack setting FIRMWARE_VERSION from the wire format.
1453 * @param data the 48-bit data field to extract a setting struct from.
1454 * @return a setting struct
1455 */
1457 return types::FirmwareVersion::decode(data >> 0);
1458 }
1459
1460 /**
1461 * Construct setting DEVICE_TYPE
1462 * @param data the data to pack into a setting bitfield
1463 * @return 48-bit data field of settings in the wire format
1464 */
1465 inline uint64_t constructDeviceType(uint16_t data) {
1466 return redux::canand::utils::packUInt(data, 16, 0);
1467 }
1468
1469 /**
1470 * Unpack setting DEVICE_TYPE from the wire format.
1471 * @param data the 48-bit data field to extract a setting struct from.
1472 * @return a setting struct
1473 */
1474 inline uint16_t extractDeviceType(uint64_t data) {
1475 return redux::canand::utils::extractU16(data, 16, 0);
1476 }
1477
1478 /**
1479 * Construct setting SCRATCH_0
1480 * @param data the data to pack into a setting bitfield
1481 * @return 48-bit data field of settings in the wire format
1482 */
1483 inline uint64_t constructScratch0(uint64_t data) {
1484 return redux::canand::utils::packUInt(data, 48, 0);
1485 }
1486
1487 /**
1488 * Unpack setting SCRATCH_0 from the wire format.
1489 * @param data the 48-bit data field to extract a setting struct from.
1490 * @return a setting struct
1491 */
1492 inline uint64_t extractScratch0(uint64_t data) {
1493 return redux::canand::utils::extractU64(data, 48, 0);
1494 }
1495
1496 /**
1497 * Construct setting SCRATCH_1
1498 * @param data the data to pack into a setting bitfield
1499 * @return 48-bit data field of settings in the wire format
1500 */
1501 inline uint64_t constructScratch1(uint64_t data) {
1502 return redux::canand::utils::packUInt(data, 48, 0);
1503 }
1504
1505 /**
1506 * Unpack setting SCRATCH_1 from the wire format.
1507 * @param data the 48-bit data field to extract a setting struct from.
1508 * @return a setting struct
1509 */
1510 inline uint64_t extractScratch1(uint64_t data) {
1511 return redux::canand::utils::extractU64(data, 48, 0);
1512 }
1513
1514 /**
1515 * Construct setting DISTANCE_FRAME_PERIOD
1516 * @param data the data to pack into a setting bitfield
1517 * @return 48-bit data field of settings in the wire format
1518 */
1519 inline uint64_t constructDistanceFramePeriod(uint16_t data) {
1520 return redux::canand::utils::packUInt(data, 16, 0);
1521 }
1522
1523 /**
1524 * Unpack setting DISTANCE_FRAME_PERIOD from the wire format.
1525 * @param data the 48-bit data field to extract a setting struct from.
1526 * @return a setting struct
1527 */
1528 inline uint16_t extractDistanceFramePeriod(uint64_t data) {
1529 return redux::canand::utils::extractU16(data, 16, 0);
1530 }
1531
1532 /**
1533 * Construct setting COLOR_FRAME_PERIOD
1534 * @param data the data to pack into a setting bitfield
1535 * @return 48-bit data field of settings in the wire format
1536 */
1537 inline uint64_t constructColorFramePeriod(uint16_t data) {
1538 return redux::canand::utils::packUInt(data, 16, 0);
1539 }
1540
1541 /**
1542 * Unpack setting COLOR_FRAME_PERIOD from the wire format.
1543 * @param data the 48-bit data field to extract a setting struct from.
1544 * @return a setting struct
1545 */
1546 inline uint16_t extractColorFramePeriod(uint64_t data) {
1547 return redux::canand::utils::extractU16(data, 16, 0);
1548 }
1549
1550 /**
1551 * Construct setting DIGOUT_FRAME_PERIOD
1552 * @param data the data to pack into a setting bitfield
1553 * @return 48-bit data field of settings in the wire format
1554 */
1555 inline uint64_t constructDigoutFramePeriod(uint16_t data) {
1556 return redux::canand::utils::packUInt(data, 16, 0);
1557 }
1558
1559 /**
1560 * Unpack setting DIGOUT_FRAME_PERIOD from the wire format.
1561 * @param data the 48-bit data field to extract a setting struct from.
1562 * @return a setting struct
1563 */
1564 inline uint16_t extractDigoutFramePeriod(uint64_t data) {
1565 return redux::canand::utils::extractU16(data, 16, 0);
1566 }
1567
1568 /**
1569 * Construct setting DISTANCE_EXTRA_FRAME_MODE
1570 * @param data the data to pack into a setting bitfield
1571 * @return 48-bit data field of settings in the wire format
1572 */
1573 inline uint64_t constructDistanceExtraFrameMode(uint8_t data) {
1574 return redux::canand::utils::packUInt(data, 8, 0);
1575 }
1576
1577 /**
1578 * Unpack setting DISTANCE_EXTRA_FRAME_MODE from the wire format.
1579 * @param data the 48-bit data field to extract a setting struct from.
1580 * @return a setting struct
1581 */
1582 inline uint8_t extractDistanceExtraFrameMode(uint64_t data) {
1583 return redux::canand::utils::extractU8(data, 8, 0);
1584 }
1585
1586 /**
1587 * Construct setting COLOR_EXTRA_FRAME_MODE
1588 * @param data the data to pack into a setting bitfield
1589 * @return 48-bit data field of settings in the wire format
1590 */
1591 inline uint64_t constructColorExtraFrameMode(uint8_t data) {
1592 return redux::canand::utils::packUInt(data, 8, 0);
1593 }
1594
1595 /**
1596 * Unpack setting COLOR_EXTRA_FRAME_MODE from the wire format.
1597 * @param data the 48-bit data field to extract a setting struct from.
1598 * @return a setting struct
1599 */
1600 inline uint8_t extractColorExtraFrameMode(uint64_t data) {
1601 return redux::canand::utils::extractU8(data, 8, 0);
1602 }
1603
1604 /**
1605 * Construct setting LAMP_BRIGHTNESS
1606 * @param data the data to pack into a setting bitfield
1607 * @return 48-bit data field of settings in the wire format
1608 */
1609 inline uint64_t constructLampBrightness(uint16_t data) {
1610 return redux::canand::utils::packUInt(data, 16, 0);
1611 }
1612
1613 /**
1614 * Unpack setting LAMP_BRIGHTNESS from the wire format.
1615 * @param data the 48-bit data field to extract a setting struct from.
1616 * @return a setting struct
1617 */
1618 inline uint16_t extractLampBrightness(uint64_t data) {
1619 return redux::canand::utils::extractU16(data, 16, 0);
1620 }
1621
1622 /**
1623 * Construct setting COLOR_INTEGRATION_PERIOD
1624 * @param data the data to pack into a setting bitfield
1625 * @return 48-bit data field of settings in the wire format
1626 */
1627 inline uint64_t constructColorIntegrationPeriod(uint8_t data) {
1628 return redux::canand::utils::packUInt(data, 4, 0);
1629 }
1630
1631 /**
1632 * Unpack setting COLOR_INTEGRATION_PERIOD from the wire format.
1633 * @param data the 48-bit data field to extract a setting struct from.
1634 * @return a setting struct
1635 */
1636 inline uint8_t extractColorIntegrationPeriod(uint64_t data) {
1637 return redux::canand::utils::extractU8(data, 4, 0);
1638 }
1639
1640 /**
1641 * Construct setting DISTANCE_INTEGRATION_PERIOD
1642 * @param data the data to pack into a setting bitfield
1643 * @return 48-bit data field of settings in the wire format
1644 */
1645 inline uint64_t constructDistanceIntegrationPeriod(uint8_t data) {
1646 return redux::canand::utils::packUInt(data, 4, 0);
1647 }
1648
1649 /**
1650 * Unpack setting DISTANCE_INTEGRATION_PERIOD from the wire format.
1651 * @param data the 48-bit data field to extract a setting struct from.
1652 * @return a setting struct
1653 */
1654 inline uint8_t extractDistanceIntegrationPeriod(uint64_t data) {
1655 return redux::canand::utils::extractU8(data, 4, 0);
1656 }
1657
1658 /**
1659 * Construct setting DIGOUT1_OUTPUT_CONFIG
1660 * @param data the data to pack into a setting bitfield
1661 * @return 48-bit data field of settings in the wire format
1662 */
1664 return (data.encode() << 0);
1665 }
1666
1667 /**
1668 * Unpack setting DIGOUT1_OUTPUT_CONFIG from the wire format.
1669 * @param data the 48-bit data field to extract a setting struct from.
1670 * @return a setting struct
1671 */
1675
1676 /**
1677 * Construct setting DIGOUT2_OUTPUT_CONFIG
1678 * @param data the data to pack into a setting bitfield
1679 * @return 48-bit data field of settings in the wire format
1680 */
1682 return (data.encode() << 0);
1683 }
1684
1685 /**
1686 * Unpack setting DIGOUT2_OUTPUT_CONFIG from the wire format.
1687 * @param data the 48-bit data field to extract a setting struct from.
1688 * @return a setting struct
1689 */
1693
1694 /**
1695 * Construct setting DIGOUT1_MESSAGE_ON_CHANGE
1696 * @param data the data to pack into a setting bitfield
1697 * @return 48-bit data field of settings in the wire format
1698 */
1700 return (data.encode() << 0);
1701 }
1702
1703 /**
1704 * Unpack setting DIGOUT1_MESSAGE_ON_CHANGE from the wire format.
1705 * @param data the 48-bit data field to extract a setting struct from.
1706 * @return a setting struct
1707 */
1711
1712 /**
1713 * Construct setting DIGOUT2_MESSAGE_ON_CHANGE
1714 * @param data the data to pack into a setting bitfield
1715 * @return 48-bit data field of settings in the wire format
1716 */
1718 return (data.encode() << 0);
1719 }
1720
1721 /**
1722 * Unpack setting DIGOUT2_MESSAGE_ON_CHANGE from the wire format.
1723 * @param data the 48-bit data field to extract a setting struct from.
1724 * @return a setting struct
1725 */
1729
1730 /**
1731 * Construct setting DIGOUT1_CONFIG_0
1732 * @param data the data to pack into a setting bitfield
1733 * @return 48-bit data field of settings in the wire format
1734 */
1736 return (data.encode() << 0);
1737 }
1738
1739 /**
1740 * Unpack setting DIGOUT1_CONFIG_0 from the wire format.
1741 * @param data the 48-bit data field to extract a setting struct from.
1742 * @return a setting struct
1743 */
1745 return types::DigoutSlot::decode(data >> 0);
1746 }
1747
1748 /**
1749 * Construct setting DIGOUT1_CONFIG_1
1750 * @param data the data to pack into a setting bitfield
1751 * @return 48-bit data field of settings in the wire format
1752 */
1754 return (data.encode() << 0);
1755 }
1756
1757 /**
1758 * Unpack setting DIGOUT1_CONFIG_1 from the wire format.
1759 * @param data the 48-bit data field to extract a setting struct from.
1760 * @return a setting struct
1761 */
1763 return types::DigoutSlot::decode(data >> 0);
1764 }
1765
1766 /**
1767 * Construct setting DIGOUT1_CONFIG_2
1768 * @param data the data to pack into a setting bitfield
1769 * @return 48-bit data field of settings in the wire format
1770 */
1772 return (data.encode() << 0);
1773 }
1774
1775 /**
1776 * Unpack setting DIGOUT1_CONFIG_2 from the wire format.
1777 * @param data the 48-bit data field to extract a setting struct from.
1778 * @return a setting struct
1779 */
1781 return types::DigoutSlot::decode(data >> 0);
1782 }
1783
1784 /**
1785 * Construct setting DIGOUT1_CONFIG_3
1786 * @param data the data to pack into a setting bitfield
1787 * @return 48-bit data field of settings in the wire format
1788 */
1790 return (data.encode() << 0);
1791 }
1792
1793 /**
1794 * Unpack setting DIGOUT1_CONFIG_3 from the wire format.
1795 * @param data the 48-bit data field to extract a setting struct from.
1796 * @return a setting struct
1797 */
1799 return types::DigoutSlot::decode(data >> 0);
1800 }
1801
1802 /**
1803 * Construct setting DIGOUT1_CONFIG_4
1804 * @param data the data to pack into a setting bitfield
1805 * @return 48-bit data field of settings in the wire format
1806 */
1808 return (data.encode() << 0);
1809 }
1810
1811 /**
1812 * Unpack setting DIGOUT1_CONFIG_4 from the wire format.
1813 * @param data the 48-bit data field to extract a setting struct from.
1814 * @return a setting struct
1815 */
1817 return types::DigoutSlot::decode(data >> 0);
1818 }
1819
1820 /**
1821 * Construct setting DIGOUT1_CONFIG_5
1822 * @param data the data to pack into a setting bitfield
1823 * @return 48-bit data field of settings in the wire format
1824 */
1826 return (data.encode() << 0);
1827 }
1828
1829 /**
1830 * Unpack setting DIGOUT1_CONFIG_5 from the wire format.
1831 * @param data the 48-bit data field to extract a setting struct from.
1832 * @return a setting struct
1833 */
1835 return types::DigoutSlot::decode(data >> 0);
1836 }
1837
1838 /**
1839 * Construct setting DIGOUT1_CONFIG_6
1840 * @param data the data to pack into a setting bitfield
1841 * @return 48-bit data field of settings in the wire format
1842 */
1844 return (data.encode() << 0);
1845 }
1846
1847 /**
1848 * Unpack setting DIGOUT1_CONFIG_6 from the wire format.
1849 * @param data the 48-bit data field to extract a setting struct from.
1850 * @return a setting struct
1851 */
1853 return types::DigoutSlot::decode(data >> 0);
1854 }
1855
1856 /**
1857 * Construct setting DIGOUT1_CONFIG_7
1858 * @param data the data to pack into a setting bitfield
1859 * @return 48-bit data field of settings in the wire format
1860 */
1862 return (data.encode() << 0);
1863 }
1864
1865 /**
1866 * Unpack setting DIGOUT1_CONFIG_7 from the wire format.
1867 * @param data the 48-bit data field to extract a setting struct from.
1868 * @return a setting struct
1869 */
1871 return types::DigoutSlot::decode(data >> 0);
1872 }
1873
1874 /**
1875 * Construct setting DIGOUT1_CONFIG_8
1876 * @param data the data to pack into a setting bitfield
1877 * @return 48-bit data field of settings in the wire format
1878 */
1880 return (data.encode() << 0);
1881 }
1882
1883 /**
1884 * Unpack setting DIGOUT1_CONFIG_8 from the wire format.
1885 * @param data the 48-bit data field to extract a setting struct from.
1886 * @return a setting struct
1887 */
1889 return types::DigoutSlot::decode(data >> 0);
1890 }
1891
1892 /**
1893 * Construct setting DIGOUT1_CONFIG_9
1894 * @param data the data to pack into a setting bitfield
1895 * @return 48-bit data field of settings in the wire format
1896 */
1898 return (data.encode() << 0);
1899 }
1900
1901 /**
1902 * Unpack setting DIGOUT1_CONFIG_9 from the wire format.
1903 * @param data the 48-bit data field to extract a setting struct from.
1904 * @return a setting struct
1905 */
1907 return types::DigoutSlot::decode(data >> 0);
1908 }
1909
1910 /**
1911 * Construct setting DIGOUT1_CONFIG_10
1912 * @param data the data to pack into a setting bitfield
1913 * @return 48-bit data field of settings in the wire format
1914 */
1916 return (data.encode() << 0);
1917 }
1918
1919 /**
1920 * Unpack setting DIGOUT1_CONFIG_10 from the wire format.
1921 * @param data the 48-bit data field to extract a setting struct from.
1922 * @return a setting struct
1923 */
1925 return types::DigoutSlot::decode(data >> 0);
1926 }
1927
1928 /**
1929 * Construct setting DIGOUT1_CONFIG_11
1930 * @param data the data to pack into a setting bitfield
1931 * @return 48-bit data field of settings in the wire format
1932 */
1934 return (data.encode() << 0);
1935 }
1936
1937 /**
1938 * Unpack setting DIGOUT1_CONFIG_11 from the wire format.
1939 * @param data the 48-bit data field to extract a setting struct from.
1940 * @return a setting struct
1941 */
1943 return types::DigoutSlot::decode(data >> 0);
1944 }
1945
1946 /**
1947 * Construct setting DIGOUT1_CONFIG_12
1948 * @param data the data to pack into a setting bitfield
1949 * @return 48-bit data field of settings in the wire format
1950 */
1952 return (data.encode() << 0);
1953 }
1954
1955 /**
1956 * Unpack setting DIGOUT1_CONFIG_12 from the wire format.
1957 * @param data the 48-bit data field to extract a setting struct from.
1958 * @return a setting struct
1959 */
1961 return types::DigoutSlot::decode(data >> 0);
1962 }
1963
1964 /**
1965 * Construct setting DIGOUT1_CONFIG_13
1966 * @param data the data to pack into a setting bitfield
1967 * @return 48-bit data field of settings in the wire format
1968 */
1970 return (data.encode() << 0);
1971 }
1972
1973 /**
1974 * Unpack setting DIGOUT1_CONFIG_13 from the wire format.
1975 * @param data the 48-bit data field to extract a setting struct from.
1976 * @return a setting struct
1977 */
1979 return types::DigoutSlot::decode(data >> 0);
1980 }
1981
1982 /**
1983 * Construct setting DIGOUT1_CONFIG_14
1984 * @param data the data to pack into a setting bitfield
1985 * @return 48-bit data field of settings in the wire format
1986 */
1988 return (data.encode() << 0);
1989 }
1990
1991 /**
1992 * Unpack setting DIGOUT1_CONFIG_14 from the wire format.
1993 * @param data the 48-bit data field to extract a setting struct from.
1994 * @return a setting struct
1995 */
1997 return types::DigoutSlot::decode(data >> 0);
1998 }
1999
2000 /**
2001 * Construct setting DIGOUT1_CONFIG_15
2002 * @param data the data to pack into a setting bitfield
2003 * @return 48-bit data field of settings in the wire format
2004 */
2006 return (data.encode() << 0);
2007 }
2008
2009 /**
2010 * Unpack setting DIGOUT1_CONFIG_15 from the wire format.
2011 * @param data the 48-bit data field to extract a setting struct from.
2012 * @return a setting struct
2013 */
2015 return types::DigoutSlot::decode(data >> 0);
2016 }
2017
2018 /**
2019 * Construct setting DIGOUT2_CONFIG_0
2020 * @param data the data to pack into a setting bitfield
2021 * @return 48-bit data field of settings in the wire format
2022 */
2024 return (data.encode() << 0);
2025 }
2026
2027 /**
2028 * Unpack setting DIGOUT2_CONFIG_0 from the wire format.
2029 * @param data the 48-bit data field to extract a setting struct from.
2030 * @return a setting struct
2031 */
2033 return types::DigoutSlot::decode(data >> 0);
2034 }
2035
2036 /**
2037 * Construct setting DIGOUT2_CONFIG_1
2038 * @param data the data to pack into a setting bitfield
2039 * @return 48-bit data field of settings in the wire format
2040 */
2042 return (data.encode() << 0);
2043 }
2044
2045 /**
2046 * Unpack setting DIGOUT2_CONFIG_1 from the wire format.
2047 * @param data the 48-bit data field to extract a setting struct from.
2048 * @return a setting struct
2049 */
2051 return types::DigoutSlot::decode(data >> 0);
2052 }
2053
2054 /**
2055 * Construct setting DIGOUT2_CONFIG_2
2056 * @param data the data to pack into a setting bitfield
2057 * @return 48-bit data field of settings in the wire format
2058 */
2060 return (data.encode() << 0);
2061 }
2062
2063 /**
2064 * Unpack setting DIGOUT2_CONFIG_2 from the wire format.
2065 * @param data the 48-bit data field to extract a setting struct from.
2066 * @return a setting struct
2067 */
2069 return types::DigoutSlot::decode(data >> 0);
2070 }
2071
2072 /**
2073 * Construct setting DIGOUT2_CONFIG_3
2074 * @param data the data to pack into a setting bitfield
2075 * @return 48-bit data field of settings in the wire format
2076 */
2078 return (data.encode() << 0);
2079 }
2080
2081 /**
2082 * Unpack setting DIGOUT2_CONFIG_3 from the wire format.
2083 * @param data the 48-bit data field to extract a setting struct from.
2084 * @return a setting struct
2085 */
2087 return types::DigoutSlot::decode(data >> 0);
2088 }
2089
2090 /**
2091 * Construct setting DIGOUT2_CONFIG_4
2092 * @param data the data to pack into a setting bitfield
2093 * @return 48-bit data field of settings in the wire format
2094 */
2096 return (data.encode() << 0);
2097 }
2098
2099 /**
2100 * Unpack setting DIGOUT2_CONFIG_4 from the wire format.
2101 * @param data the 48-bit data field to extract a setting struct from.
2102 * @return a setting struct
2103 */
2105 return types::DigoutSlot::decode(data >> 0);
2106 }
2107
2108 /**
2109 * Construct setting DIGOUT2_CONFIG_5
2110 * @param data the data to pack into a setting bitfield
2111 * @return 48-bit data field of settings in the wire format
2112 */
2114 return (data.encode() << 0);
2115 }
2116
2117 /**
2118 * Unpack setting DIGOUT2_CONFIG_5 from the wire format.
2119 * @param data the 48-bit data field to extract a setting struct from.
2120 * @return a setting struct
2121 */
2123 return types::DigoutSlot::decode(data >> 0);
2124 }
2125
2126 /**
2127 * Construct setting DIGOUT2_CONFIG_6
2128 * @param data the data to pack into a setting bitfield
2129 * @return 48-bit data field of settings in the wire format
2130 */
2132 return (data.encode() << 0);
2133 }
2134
2135 /**
2136 * Unpack setting DIGOUT2_CONFIG_6 from the wire format.
2137 * @param data the 48-bit data field to extract a setting struct from.
2138 * @return a setting struct
2139 */
2141 return types::DigoutSlot::decode(data >> 0);
2142 }
2143
2144 /**
2145 * Construct setting DIGOUT2_CONFIG_7
2146 * @param data the data to pack into a setting bitfield
2147 * @return 48-bit data field of settings in the wire format
2148 */
2150 return (data.encode() << 0);
2151 }
2152
2153 /**
2154 * Unpack setting DIGOUT2_CONFIG_7 from the wire format.
2155 * @param data the 48-bit data field to extract a setting struct from.
2156 * @return a setting struct
2157 */
2159 return types::DigoutSlot::decode(data >> 0);
2160 }
2161
2162 /**
2163 * Construct setting DIGOUT2_CONFIG_8
2164 * @param data the data to pack into a setting bitfield
2165 * @return 48-bit data field of settings in the wire format
2166 */
2168 return (data.encode() << 0);
2169 }
2170
2171 /**
2172 * Unpack setting DIGOUT2_CONFIG_8 from the wire format.
2173 * @param data the 48-bit data field to extract a setting struct from.
2174 * @return a setting struct
2175 */
2177 return types::DigoutSlot::decode(data >> 0);
2178 }
2179
2180 /**
2181 * Construct setting DIGOUT2_CONFIG_9
2182 * @param data the data to pack into a setting bitfield
2183 * @return 48-bit data field of settings in the wire format
2184 */
2186 return (data.encode() << 0);
2187 }
2188
2189 /**
2190 * Unpack setting DIGOUT2_CONFIG_9 from the wire format.
2191 * @param data the 48-bit data field to extract a setting struct from.
2192 * @return a setting struct
2193 */
2195 return types::DigoutSlot::decode(data >> 0);
2196 }
2197
2198 /**
2199 * Construct setting DIGOUT2_CONFIG_10
2200 * @param data the data to pack into a setting bitfield
2201 * @return 48-bit data field of settings in the wire format
2202 */
2204 return (data.encode() << 0);
2205 }
2206
2207 /**
2208 * Unpack setting DIGOUT2_CONFIG_10 from the wire format.
2209 * @param data the 48-bit data field to extract a setting struct from.
2210 * @return a setting struct
2211 */
2213 return types::DigoutSlot::decode(data >> 0);
2214 }
2215
2216 /**
2217 * Construct setting DIGOUT2_CONFIG_11
2218 * @param data the data to pack into a setting bitfield
2219 * @return 48-bit data field of settings in the wire format
2220 */
2222 return (data.encode() << 0);
2223 }
2224
2225 /**
2226 * Unpack setting DIGOUT2_CONFIG_11 from the wire format.
2227 * @param data the 48-bit data field to extract a setting struct from.
2228 * @return a setting struct
2229 */
2231 return types::DigoutSlot::decode(data >> 0);
2232 }
2233
2234 /**
2235 * Construct setting DIGOUT2_CONFIG_12
2236 * @param data the data to pack into a setting bitfield
2237 * @return 48-bit data field of settings in the wire format
2238 */
2240 return (data.encode() << 0);
2241 }
2242
2243 /**
2244 * Unpack setting DIGOUT2_CONFIG_12 from the wire format.
2245 * @param data the 48-bit data field to extract a setting struct from.
2246 * @return a setting struct
2247 */
2249 return types::DigoutSlot::decode(data >> 0);
2250 }
2251
2252 /**
2253 * Construct setting DIGOUT2_CONFIG_13
2254 * @param data the data to pack into a setting bitfield
2255 * @return 48-bit data field of settings in the wire format
2256 */
2258 return (data.encode() << 0);
2259 }
2260
2261 /**
2262 * Unpack setting DIGOUT2_CONFIG_13 from the wire format.
2263 * @param data the 48-bit data field to extract a setting struct from.
2264 * @return a setting struct
2265 */
2267 return types::DigoutSlot::decode(data >> 0);
2268 }
2269
2270 /**
2271 * Construct setting DIGOUT2_CONFIG_14
2272 * @param data the data to pack into a setting bitfield
2273 * @return 48-bit data field of settings in the wire format
2274 */
2276 return (data.encode() << 0);
2277 }
2278
2279 /**
2280 * Unpack setting DIGOUT2_CONFIG_14 from the wire format.
2281 * @param data the 48-bit data field to extract a setting struct from.
2282 * @return a setting struct
2283 */
2285 return types::DigoutSlot::decode(data >> 0);
2286 }
2287
2288 /**
2289 * Construct setting DIGOUT2_CONFIG_15
2290 * @param data the data to pack into a setting bitfield
2291 * @return 48-bit data field of settings in the wire format
2292 */
2294 return (data.encode() << 0);
2295 }
2296
2297 /**
2298 * Unpack setting DIGOUT2_CONFIG_15 from the wire format.
2299 * @param data the 48-bit data field to extract a setting struct from.
2300 * @return a setting struct
2301 */
2303 return types::DigoutSlot::decode(data >> 0);
2304 }
2305
2306
2307 /**
2308 * Settings that are required for the vdep to flag all values as received.
2309 */
2327
2328 }
2329}
Definition CanandAddress.h:62
bool SendCANMessage(uint16_t apiIndex, uint8_t *data, uint8_t length)
@ kPeriod400MsResolution20Bit
Definition CanandcolorDetails.h:287
@ kPeriod200MsResolution19Bit
Definition CanandcolorDetails.h:290
@ kPeriod100MsResolution18Bit
Definition CanandcolorDetails.h:293
@ kValue
Definition CanandcolorDetails.h:277
@ kRed
Definition CanandcolorDetails.h:262
@ kBlue
Definition CanandcolorDetails.h:268
@ kZero
Definition CanandcolorDetails.h:256
@ kHue
Definition CanandcolorDetails.h:271
@ kDistance
Definition CanandcolorDetails.h:259
@ kGreen
Definition CanandcolorDetails.h:265
@ kSaturation
Definition CanandcolorDetails.h:274
@ kSlot15
Definition CanandcolorDetails.h:148
@ kSlot6
Definition CanandcolorDetails.h:121
@ kSlot8
Definition CanandcolorDetails.h:127
@ kSlot12
Definition CanandcolorDetails.h:139
@ kSlot7
Definition CanandcolorDetails.h:124
@ kSlot11
Definition CanandcolorDetails.h:136
@ kSlot1
Definition CanandcolorDetails.h:106
@ kSlot0
Definition CanandcolorDetails.h:103
@ kSlot2
Definition CanandcolorDetails.h:109
@ kSlot13
Definition CanandcolorDetails.h:142
@ kSlot9
Definition CanandcolorDetails.h:130
@ kSlot5
Definition CanandcolorDetails.h:118
@ kSlot10
Definition CanandcolorDetails.h:133
@ kSlot14
Definition CanandcolorDetails.h:145
@ kSlot3
Definition CanandcolorDetails.h:112
@ kSlot4
Definition CanandcolorDetails.h:115
@ kDigoutLogicActiveLow
Definition CanandcolorDetails.h:196
@ kDigoutLogicActiveHigh
Definition CanandcolorDetails.h:193
@ kEarlyTransmitOnChange
Definition CanandcolorDetails.h:180
Definition CanandcolorDetails.h:56
@ kHardwareFaultDistance
Definition CanandcolorDetails.h:83
@ kCanGeneralError
Definition CanandcolorDetails.h:73
@ kOutOfTemperatureRange
Definition CanandcolorDetails.h:78
@ kI2cBusRecovery
Definition CanandcolorDetails.h:93
@ kPowerCycle
Definition CanandcolorDetails.h:62
@ kHardwareFaultColor
Definition CanandcolorDetails.h:88
@ kCanIdConflict
Definition CanandcolorDetails.h:67
@ kXorWithNextSlot
Definition CanandcolorDetails.h:243
@ kAndWithNextSlot
Definition CanandcolorDetails.h:246
@ kTerminateChain
Definition CanandcolorDetails.h:237
@ kOrWithNextSlot
Definition CanandcolorDetails.h:240
@ kFetchDigout2
Definition CanandcolorDetails.h:363
@ kFetchDigout1
Definition CanandcolorDetails.h:360
@ kResetFactoryDefault
Definition CanandcolorDetails.h:345
@ kFetchSettingValue
Definition CanandcolorDetails.h:351
@ kFetchSettings
Definition CanandcolorDetails.h:340
@ kClearDigout1
Definition CanandcolorDetails.h:354
@ kClearDigout2
Definition CanandcolorDetails.h:357
@ kPrevSlotTrue
Definition CanandcolorDetails.h:224
@ kGreaterThan
Definition CanandcolorDetails.h:215
@ kEquals
Definition CanandcolorDetails.h:209
@ kLessThan
Definition CanandcolorDetails.h:212
@ kPrevClauseTrue
Definition CanandcolorDetails.h:227
@ kLessThanOrEquals
Definition CanandcolorDetails.h:218
@ kGreaterThanOrEquals
Definition CanandcolorDetails.h:221
constexpr uint64_t packInt(int64_t data, uint8_t width, uint8_t offset)
Definition CanandUtils.h:299
constexpr uint8_t extractU8(uint64_t data, uint8_t width, uint8_t offset)
Definition CanandUtils.h:133
constexpr int32_t extractI32(uint64_t data, uint8_t width, uint8_t offset)
Definition CanandUtils.h:212
constexpr bool extractBool(uint64_t data, uint8_t offset)
Definition CanandUtils.h:276
constexpr uint64_t extractU64(uint64_t data, uint8_t width, uint8_t offset)
Definition CanandUtils.h:169
constexpr int16_t extractI16(uint64_t data, uint8_t width, uint8_t offset)
Definition CanandUtils.h:197
constexpr uint16_t extractU16(uint64_t data, uint8_t width, uint8_t offset)
Definition CanandUtils.h:145
constexpr uint64_t packUInt(uint64_t data, uint8_t width, uint8_t offset)
Definition CanandUtils.h:287
constexpr uint32_t extractU32(uint64_t data, uint8_t width, uint8_t offset)
Definition CanandUtils.h:157
constexpr uint64_t packBool(bool data, uint8_t offset)
Definition CanandUtils.h:340
@ kSetSetting
Definition CanandcolorDetails.h:607
@ kPartyMode
Definition CanandcolorDetails.h:619
@ kClearStickyFaults
Definition CanandcolorDetails.h:613
@ kStatus
Definition CanandcolorDetails.h:616
@ kColorOutput
Definition CanandcolorDetails.h:628
@ kClearStickyDigout
Definition CanandcolorDetails.h:634
@ kDigitalOutput
Definition CanandcolorDetails.h:631
@ kEnumerate
Definition CanandcolorDetails.h:622
@ kDistanceOutput
Definition CanandcolorDetails.h:625
@ kReportSetting
Definition CanandcolorDetails.h:610
@ kSettingCommand
Definition CanandcolorDetails.h:604
uint64_t constructStatusFramePeriod(uint16_t data)
Definition CanandcolorDetails.h:1411
uint64_t constructDigout2MessageOnChange(types::DigoutMessageTrigger data)
Definition CanandcolorDetails.h:1717
uint64_t constructDistanceIntegrationPeriod(uint8_t data)
Definition CanandcolorDetails.h:1645
types::DigoutSlot extractDigout2Config4(uint64_t data)
Definition CanandcolorDetails.h:2104
types::DigoutSlot extractDigout1Config8(uint64_t data)
Definition CanandcolorDetails.h:1888
uint8_t extractDistanceIntegrationPeriod(uint64_t data)
Definition CanandcolorDetails.h:1654
uint16_t extractLampBrightness(uint64_t data)
Definition CanandcolorDetails.h:1618
types::DigoutSlot extractDigout2Config7(uint64_t data)
Definition CanandcolorDetails.h:2158
uint64_t constructColorIntegrationPeriod(uint8_t data)
Definition CanandcolorDetails.h:1627
types::DigoutSlot extractDigout1Config6(uint64_t data)
Definition CanandcolorDetails.h:1852
uint64_t constructDigout2Config6(types::DigoutSlot data)
Definition CanandcolorDetails.h:2131
uint64_t constructDigout2Config5(types::DigoutSlot data)
Definition CanandcolorDetails.h:2113
uint64_t constructDigout1Config9(types::DigoutSlot data)
Definition CanandcolorDetails.h:1897
uint64_t constructDigoutFramePeriod(uint16_t data)
Definition CanandcolorDetails.h:1555
types::DigoutSlot extractDigout2Config9(uint64_t data)
Definition CanandcolorDetails.h:2194
types::DigoutSlot extractDigout2Config11(uint64_t data)
Definition CanandcolorDetails.h:2230
uint64_t constructDigout2Config14(types::DigoutSlot data)
Definition CanandcolorDetails.h:2275
types::DigoutSlot extractDigout2Config13(uint64_t data)
Definition CanandcolorDetails.h:2266
uint64_t extractScratch1(uint64_t data)
Definition CanandcolorDetails.h:1510
uint64_t constructDigout1Config1(types::DigoutSlot data)
Definition CanandcolorDetails.h:1753
uint64_t constructDigout1Config14(types::DigoutSlot data)
Definition CanandcolorDetails.h:1987
uint64_t constructDigout1MessageOnChange(types::DigoutMessageTrigger data)
Definition CanandcolorDetails.h:1699
types::DigoutSlot extractDigout2Config0(uint64_t data)
Definition CanandcolorDetails.h:2032
types::DigoutSlot extractDigout1Config14(uint64_t data)
Definition CanandcolorDetails.h:1996
uint64_t constructDigout1Config10(types::DigoutSlot data)
Definition CanandcolorDetails.h:1915
uint64_t constructDigout2Config1(types::DigoutSlot data)
Definition CanandcolorDetails.h:2041
types::DigoutControlConfig extractDigout2OutputConfig(uint64_t data)
Definition CanandcolorDetails.h:1690
types::DigoutSlot extractDigout1Config1(uint64_t data)
Definition CanandcolorDetails.h:1762
uint64_t constructDigout2Config4(types::DigoutSlot data)
Definition CanandcolorDetails.h:2095
uint64_t extractSerialNumber(uint64_t data)
Definition CanandcolorDetails.h:1438
uint64_t constructDigout2Config10(types::DigoutSlot data)
Definition CanandcolorDetails.h:2203
uint64_t constructDeviceType(uint16_t data)
Definition CanandcolorDetails.h:1465
types::DigoutMessageTrigger extractDigout1MessageOnChange(uint64_t data)
Definition CanandcolorDetails.h:1708
uint64_t constructDigout2Config11(types::DigoutSlot data)
Definition CanandcolorDetails.h:2221
uint64_t constructScratch0(uint64_t data)
Definition CanandcolorDetails.h:1483
uint64_t constructDigout1Config5(types::DigoutSlot data)
Definition CanandcolorDetails.h:1825
types::DigoutSlot extractDigout2Config2(uint64_t data)
Definition CanandcolorDetails.h:2068
types::DigoutSlot extractDigout1Config7(uint64_t data)
Definition CanandcolorDetails.h:1870
uint64_t constructDistanceExtraFrameMode(uint8_t data)
Definition CanandcolorDetails.h:1573
types::DigoutSlot extractDigout1Config4(uint64_t data)
Definition CanandcolorDetails.h:1816
uint64_t constructDigout2Config9(types::DigoutSlot data)
Definition CanandcolorDetails.h:2185
types::DigoutSlot extractDigout1Config10(uint64_t data)
Definition CanandcolorDetails.h:1924
uint16_t extractDeviceType(uint64_t data)
Definition CanandcolorDetails.h:1474
types::DigoutSlot extractDigout2Config8(uint64_t data)
Definition CanandcolorDetails.h:2176
uint8_t extractColorIntegrationPeriod(uint64_t data)
Definition CanandcolorDetails.h:1636
types::DigoutSlot extractDigout1Config9(uint64_t data)
Definition CanandcolorDetails.h:1906
uint64_t constructDigout1Config0(types::DigoutSlot data)
Definition CanandcolorDetails.h:1735
uint64_t constructDigout1Config8(types::DigoutSlot data)
Definition CanandcolorDetails.h:1879
types::DigoutSlot extractDigout1Config3(uint64_t data)
Definition CanandcolorDetails.h:1798
uint64_t constructDigout1Config7(types::DigoutSlot data)
Definition CanandcolorDetails.h:1861
uint64_t constructDigout2OutputConfig(types::DigoutControlConfig data)
Definition CanandcolorDetails.h:1681
types::DigoutSlot extractDigout1Config15(uint64_t data)
Definition CanandcolorDetails.h:2014
uint64_t constructDigout2Config2(types::DigoutSlot data)
Definition CanandcolorDetails.h:2059
uint64_t constructDigout1Config4(types::DigoutSlot data)
Definition CanandcolorDetails.h:1807
uint8_t extractColorExtraFrameMode(uint64_t data)
Definition CanandcolorDetails.h:1600
uint64_t constructDigout2Config13(types::DigoutSlot data)
Definition CanandcolorDetails.h:2257
uint64_t constructDigout1Config2(types::DigoutSlot data)
Definition CanandcolorDetails.h:1771
uint64_t constructDigout1OutputConfig(types::DigoutControlConfig data)
Definition CanandcolorDetails.h:1663
uint64_t constructDigout2Config0(types::DigoutSlot data)
Definition CanandcolorDetails.h:2023
types::FirmwareVersion extractFirmwareVersion(uint64_t data)
Definition CanandcolorDetails.h:1456
types::DigoutMessageTrigger extractDigout2MessageOnChange(uint64_t data)
Definition CanandcolorDetails.h:1726
types::DigoutSlot extractDigout1Config13(uint64_t data)
Definition CanandcolorDetails.h:1978
uint16_t extractColorFramePeriod(uint64_t data)
Definition CanandcolorDetails.h:1546
uint64_t constructDigout1Config12(types::DigoutSlot data)
Definition CanandcolorDetails.h:1951
types::DigoutSlot extractDigout1Config5(uint64_t data)
Definition CanandcolorDetails.h:1834
uint64_t constructDigout1Config13(types::DigoutSlot data)
Definition CanandcolorDetails.h:1969
const std::vector< uint8_t > VDEP_SETTINGS
Definition CanandcolorDetails.h:2310
uint64_t constructColorFramePeriod(uint16_t data)
Definition CanandcolorDetails.h:1537
uint64_t constructColorExtraFrameMode(uint8_t data)
Definition CanandcolorDetails.h:1591
uint64_t constructDistanceFramePeriod(uint16_t data)
Definition CanandcolorDetails.h:1519
types::DigoutSlot extractDigout2Config12(uint64_t data)
Definition CanandcolorDetails.h:2248
types::DigoutSlot extractDigout2Config15(uint64_t data)
Definition CanandcolorDetails.h:2302
uint64_t constructDigout1Config11(types::DigoutSlot data)
Definition CanandcolorDetails.h:1933
uint8_t extractDistanceExtraFrameMode(uint64_t data)
Definition CanandcolorDetails.h:1582
@ kDigout1Config4
Definition CanandcolorDetails.h:1322
@ kDigout1Config6
Definition CanandcolorDetails.h:1328
@ kDigout1OutputConfig
Definition CanandcolorDetails.h:1298
@ kColorIntegrationPeriod
Definition CanandcolorDetails.h:1292
@ kDigout2Config15
Definition CanandcolorDetails.h:1403
@ kDigout1MessageOnChange
Definition CanandcolorDetails.h:1304
@ kDigout1Config1
Definition CanandcolorDetails.h:1313
@ kDigout2Config5
Definition CanandcolorDetails.h:1373
@ kDigout2Config13
Definition CanandcolorDetails.h:1397
@ kDigout1Config13
Definition CanandcolorDetails.h:1349
@ kDeviceType
Definition CanandcolorDetails.h:1265
@ kDigout1Config8
Definition CanandcolorDetails.h:1334
@ kDigout1Config10
Definition CanandcolorDetails.h:1340
@ kDigout1Config14
Definition CanandcolorDetails.h:1352
@ kColorExtraFrameMode
Definition CanandcolorDetails.h:1286
@ kDistanceExtraFrameMode
Definition CanandcolorDetails.h:1283
@ kDigout2Config0
Definition CanandcolorDetails.h:1358
@ kDigout1Config2
Definition CanandcolorDetails.h:1316
@ kDigout1Config7
Definition CanandcolorDetails.h:1331
@ kScratch0
Definition CanandcolorDetails.h:1268
@ kDigout2Config6
Definition CanandcolorDetails.h:1376
@ kColorFramePeriod
Definition CanandcolorDetails.h:1277
@ kDigout2Config12
Definition CanandcolorDetails.h:1394
@ kScratch1
Definition CanandcolorDetails.h:1271
@ kDigout1Config0
Definition CanandcolorDetails.h:1310
@ kDistanceIntegrationPeriod
Definition CanandcolorDetails.h:1295
@ kDigout2Config3
Definition CanandcolorDetails.h:1367
@ kDigout2Config7
Definition CanandcolorDetails.h:1379
@ kDigout1Config3
Definition CanandcolorDetails.h:1319
@ kDigout2Config9
Definition CanandcolorDetails.h:1385
@ kDigout1Config15
Definition CanandcolorDetails.h:1355
@ kDigout2Config8
Definition CanandcolorDetails.h:1382
@ kDigout2Config1
Definition CanandcolorDetails.h:1361
@ kStatusFramePeriod
Definition CanandcolorDetails.h:1256
@ kDigout2Config4
Definition CanandcolorDetails.h:1370
@ kDigout2OutputConfig
Definition CanandcolorDetails.h:1301
@ kDistanceFramePeriod
Definition CanandcolorDetails.h:1274
@ kDigout2Config2
Definition CanandcolorDetails.h:1364
@ kDigout1Config12
Definition CanandcolorDetails.h:1346
@ kDigoutFramePeriod
Definition CanandcolorDetails.h:1280
@ kDigout2Config11
Definition CanandcolorDetails.h:1391
@ kDigout1Config5
Definition CanandcolorDetails.h:1325
@ kFirmwareVersion
Definition CanandcolorDetails.h:1262
@ kSerialNumber
Definition CanandcolorDetails.h:1259
@ kDigout2Config14
Definition CanandcolorDetails.h:1400
@ kDigout1Config11
Definition CanandcolorDetails.h:1343
@ kDigout2MessageOnChange
Definition CanandcolorDetails.h:1307
@ kDigout2Config10
Definition CanandcolorDetails.h:1388
@ kDigout1Config9
Definition CanandcolorDetails.h:1337
@ kLampBrightness
Definition CanandcolorDetails.h:1289
uint64_t extractScratch0(uint64_t data)
Definition CanandcolorDetails.h:1492
types::DigoutSlot extractDigout1Config0(uint64_t data)
Definition CanandcolorDetails.h:1744
uint64_t constructDigout1Config6(types::DigoutSlot data)
Definition CanandcolorDetails.h:1843
uint64_t constructDigout2Config7(types::DigoutSlot data)
Definition CanandcolorDetails.h:2149
types::DigoutControlConfig extractDigout1OutputConfig(uint64_t data)
Definition CanandcolorDetails.h:1672
uint64_t constructSerialNumber(uint64_t data)
Definition CanandcolorDetails.h:1429
types::DigoutSlot extractDigout2Config5(uint64_t data)
Definition CanandcolorDetails.h:2122
uint16_t extractDigoutFramePeriod(uint64_t data)
Definition CanandcolorDetails.h:1564
types::DigoutSlot extractDigout1Config12(uint64_t data)
Definition CanandcolorDetails.h:1960
types::DigoutSlot extractDigout2Config6(uint64_t data)
Definition CanandcolorDetails.h:2140
uint16_t extractDistanceFramePeriod(uint64_t data)
Definition CanandcolorDetails.h:1528
types::DigoutSlot extractDigout2Config10(uint64_t data)
Definition CanandcolorDetails.h:2212
types::DigoutSlot extractDigout2Config3(uint64_t data)
Definition CanandcolorDetails.h:2086
types::DigoutSlot extractDigout2Config1(uint64_t data)
Definition CanandcolorDetails.h:2050
uint64_t constructDigout1Config15(types::DigoutSlot data)
Definition CanandcolorDetails.h:2005
uint64_t constructDigout1Config3(types::DigoutSlot data)
Definition CanandcolorDetails.h:1789
uint64_t constructDigout2Config3(types::DigoutSlot data)
Definition CanandcolorDetails.h:2077
uint16_t extractStatusFramePeriod(uint64_t data)
Definition CanandcolorDetails.h:1420
types::DigoutSlot extractDigout1Config11(uint64_t data)
Definition CanandcolorDetails.h:1942
uint64_t constructLampBrightness(uint16_t data)
Definition CanandcolorDetails.h:1609
types::DigoutSlot extractDigout2Config14(uint64_t data)
Definition CanandcolorDetails.h:2284
types::DigoutSlot extractDigout1Config2(uint64_t data)
Definition CanandcolorDetails.h:1780
uint64_t constructDigout2Config8(types::DigoutSlot data)
Definition CanandcolorDetails.h:2167
uint64_t constructDigout2Config15(types::DigoutSlot data)
Definition CanandcolorDetails.h:2293
uint64_t constructFirmwareVersion(types::FirmwareVersion data)
Definition CanandcolorDetails.h:1447
uint64_t constructScratch1(uint64_t data)
Definition CanandcolorDetails.h:1501
uint64_t constructDigout2Config12(types::DigoutSlot data)
Definition CanandcolorDetails.h:2239
Definition CanandcolorDetails.h:16
static constexpr ClearStickyDigout decode(uint64_t data)
Definition CanandcolorDetails.h:1214
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:1236
constexpr uint64_t encode()
Definition CanandcolorDetails.h:1225
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:1243
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:1233
constexpr uint64_t encode()
Definition CanandcolorDetails.h:830
static constexpr ClearStickyFaults decode(uint64_t data)
Definition CanandcolorDetails.h:819
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:838
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:841
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:848
Definition CanandcolorDetails.h:1067
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:1123
uint8_t period
Definition CanandcolorDetails.h:1079
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:1116
static constexpr ColorOutput decode(uint64_t data)
Definition CanandcolorDetails.h:1087
uint32_t green
Definition CanandcolorDetails.h:1073
uint32_t red
Definition CanandcolorDetails.h:1070
uint32_t blue
Definition CanandcolorDetails.h:1076
constexpr uint64_t encode()
Definition CanandcolorDetails.h:1101
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:1113
bool digout2_state
Definition CanandcolorDetails.h:1137
bool digout1_state
Definition CanandcolorDetails.h:1134
uint16_t digout1_cond
Definition CanandcolorDetails.h:1146
bool digout2_sticky
Definition CanandcolorDetails.h:1143
static constexpr DigitalOutput decode(uint64_t data)
Definition CanandcolorDetails.h:1157
bool digout1_sticky
Definition CanandcolorDetails.h:1140
uint16_t digout2_cond
Definition CanandcolorDetails.h:1149
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:1187
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:1197
constexpr uint64_t encode()
Definition CanandcolorDetails.h:1173
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:1190
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:1059
static constexpr DistanceOutput decode(uint64_t data)
Definition CanandcolorDetails.h:1029
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:1049
constexpr uint64_t encode()
Definition CanandcolorDetails.h:1040
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:1052
uint16_t distance
Definition CanandcolorDetails.h:1021
Definition CanandcolorDetails.h:964
constexpr uint64_t encode()
Definition CanandcolorDetails.h:990
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:1003
static constexpr Enumerate decode(uint64_t data)
Definition CanandcolorDetails.h:978
bool is_bootloader
Definition CanandcolorDetails.h:970
uint64_t serial
Definition CanandcolorDetails.h:967
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:1010
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:1000
Definition CanandcolorDetails.h:915
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:949
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:946
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:956
uint8_t party_level
Definition CanandcolorDetails.h:918
static constexpr PartyMode decode(uint64_t data)
Definition CanandcolorDetails.h:926
constexpr uint64_t encode()
Definition CanandcolorDetails.h:937
uint8_t flags
Definition CanandcolorDetails.h:760
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:802
static constexpr ReportSetting decode(uint64_t data)
Definition CanandcolorDetails.h:768
uint64_t value
Definition CanandcolorDetails.h:757
uint8_t address
Definition CanandcolorDetails.h:754
constexpr uint64_t encode()
Definition CanandcolorDetails.h:781
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:792
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:795
constexpr uint64_t encode()
Definition CanandcolorDetails.h:722
uint8_t address
Definition CanandcolorDetails.h:695
types::SettingFlags flags
Definition CanandcolorDetails.h:701
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:743
static constexpr SetSetting decode(uint64_t data)
Definition CanandcolorDetails.h:709
uint64_t value
Definition CanandcolorDetails.h:698
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:733
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:736
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:684
static constexpr SettingCommand decode(uint64_t data)
Definition CanandcolorDetails.h:652
uint8_t control_flag
Definition CanandcolorDetails.h:641
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:677
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:674
uint8_t setting_index
Definition CanandcolorDetails.h:644
constexpr uint64_t encode()
Definition CanandcolorDetails.h:664
Definition CanandcolorDetails.h:856
static constexpr Status decode(uint64_t data)
Definition CanandcolorDetails.h:873
bool send(redux::canand::CanandAddress &addr)
Definition CanandcolorDetails.h:907
static const uint32_t DLC_MIN
Definition CanandcolorDetails.h:897
uint8_t faults
Definition CanandcolorDetails.h:859
int16_t temperature
Definition CanandcolorDetails.h:865
uint8_t sticky_faults
Definition CanandcolorDetails.h:862
constexpr uint64_t encode()
Definition CanandcolorDetails.h:886
static const uint32_t DLC_MAX
Definition CanandcolorDetails.h:900
static constexpr DigoutControlConfig decode(uint64_t data)
Definition CanandcolorDetails.h:469
constexpr uint64_t encode()
Definition CanandcolorDetails.h:481
uint8_t output_config
Definition CanandcolorDetails.h:458
uint8_t pwm_data_source
Definition CanandcolorDetails.h:461
static constexpr DigoutMessageTrigger decode(uint64_t data)
Definition CanandcolorDetails.h:507
constexpr uint64_t encode()
Definition CanandcolorDetails.h:519
static constexpr DigoutSlot decode(uint64_t data)
Definition CanandcolorDetails.h:563
bool invert_value
Definition CanandcolorDetails.h:540
uint8_t next_slot_action
Definition CanandcolorDetails.h:537
constexpr uint64_t encode()
Definition CanandcolorDetails.h:581
int32_t immidiate_additive
Definition CanandcolorDetails.h:546
uint8_t data_source_b
Definition CanandcolorDetails.h:555
bool slot_enabled
Definition CanandcolorDetails.h:534
uint8_t data_source_a
Definition CanandcolorDetails.h:552
uint8_t immidiate_scaling
Definition CanandcolorDetails.h:549
uint8_t opcode
Definition CanandcolorDetails.h:543
constexpr uint64_t encode()
Definition CanandcolorDetails.h:442
uint8_t firmware_minor
Definition CanandcolorDetails.h:418
uint8_t firmware_patch
Definition CanandcolorDetails.h:415
uint16_t firmware_year
Definition CanandcolorDetails.h:421
static constexpr FirmwareVersion decode(uint64_t data)
Definition CanandcolorDetails.h:429
uint8_t synch_msg_count
Definition CanandcolorDetails.h:378
constexpr uint64_t encode()
Definition CanandcolorDetails.h:399
static constexpr SettingFlags decode(uint64_t data)
Definition CanandcolorDetails.h:386
bool synch_hold
Definition CanandcolorDetails.h:375
bool ephemeral
Definition CanandcolorDetails.h:372