Skip to content

Commit 751c064

Browse files
authored
Add serializer for NavTIMEGPS message. (#201)
1 parent b6e0270 commit 751c064

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

ublox_msgs/include/ublox_msgs/serialization.hpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,6 +2366,36 @@ struct UbloxSerializer<ublox_msgs::msg::NavVELNED_<ContainerAllocator> > {
23662366
}
23672367
};
23682368

2369+
template <typename ContainerAllocator>
2370+
struct UbloxSerializer<ublox_msgs::msg::NavTIMEGPS_<ContainerAllocator> > {
2371+
inline static void read(const uint8_t *data, uint32_t count,
2372+
ublox_msgs::msg::NavTIMEGPS_<ContainerAllocator> & m) {
2373+
UbloxIStream stream(const_cast<uint8_t *>(data), count);
2374+
stream.next(m.i_tow);
2375+
stream.next(m.f_tow);
2376+
stream.next(m.week);
2377+
stream.next(m.leap_s);
2378+
stream.next(m.valid);
2379+
stream.next(m.t_acc);
2380+
}
2381+
2382+
inline static uint32_t serializedLength(const ublox_msgs::msg::NavTIMEGPS_<ContainerAllocator> & m) {
2383+
(void)m;
2384+
return 16;
2385+
}
2386+
2387+
inline static void write(uint8_t *data, uint32_t size,
2388+
const ublox_msgs::msg::NavTIMEGPS_<ContainerAllocator> & m) {
2389+
UbloxOStream stream(data, size);
2390+
stream.next(m.i_tow);
2391+
stream.next(m.f_tow);
2392+
stream.next(m.week);
2393+
stream.next(m.leap_s);
2394+
stream.next(m.valid);
2395+
stream.next(m.t_acc);
2396+
}
2397+
};
2398+
23692399
///
23702400
/// @brief Serializes the RxmALM message which has a repeated block.
23712401
///

0 commit comments

Comments
 (0)