Go to the documentation of this file.
38#ifndef __OPENLCB_OPENLCB_GRIDCONNECT__
39#define __OPENLCB_OPENLCB_GRIDCONNECT__
47#define GRIDCONNECT_STATE_SYNC_START 0
50#define GRIDCONNECT_STATE_SYNC_FIND_HEADER 2
53#define GRIDCONNECT_STATE_SYNC_FIND_DATA 4
56#define GRIDCONNECT_IDENTIFIER_START_POS 2
59#define GRIDCONNECT_IDENTIFIER_LEN 8
62#define GRIDCONNECT_NORMAL_FLAG_POS 10
65#define GRIDCONNECT_DATA_START_POS 11
68#define GRIDCONNECT_HEADER_LEN 12
71#define MAX_GRID_CONNECT_LEN 29
Type definitions and constants for the CAN transport layer.
#define MAX_GRID_CONNECT_LEN
Max GridConnect string length: :X(8)N(16); + NUL = 29 bytes.
Definition openlcb_gridconnect.h:71
uint8_t gridconnect_buffer_t[MAX_GRID_CONNECT_LEN]
Type definition for GridConnect message buffer.
Definition openlcb_gridconnect.h:74
bool OpenLcbGridConnect_copy_out_gridconnect_when_done(uint8_t next_byte, gridconnect_buffer_t *gridconnect_buffer)
Feeds one byte into the streaming GridConnect parser.
Definition openlcb_gridconnect.c:121
void OpenLcbGridConnect_to_can_msg(gridconnect_buffer_t *gridconnect_buffer, can_msg_t *can_msg)
Converts a validated GridConnect string to a can_msg_t.
Definition openlcb_gridconnect.c:266
void OpenLcbGridConnect_from_can_msg(gridconnect_buffer_t *gridconnect_buffer, can_msg_t *can_msg)
Converts a can_msg_t to a null-terminated GridConnect string.
Definition openlcb_gridconnect.c:341
Definition can_types.h:118
Copyright (c) 2026 Jim Kueneman all rights reserved. See the License