OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
alias_mappings.h
Go to the documentation of this file.
1
34// This is a guard condition so that contents of this file are not included
35// more than once.
36#ifndef __DRIVERS_CANBUS_ALIAS_MAPPINGS__
37#define __DRIVERS_CANBUS_ALIAS_MAPPINGS__
38
39#include <stdbool.h>
40#include <stdint.h>
41
42#include "can_types.h"
44
45#ifdef __cplusplus
46extern "C"
47{
48#endif /* __cplusplus */
49
58 extern void AliasMappings_initialize(void);
59
72
85
88
115 extern alias_mapping_t *AliasMappings_register(uint16_t alias, node_id_t node_id);
116
130 extern void AliasMappings_unregister(uint16_t alias);
131
144
157
170 extern void AliasMappings_flush(void);
171
172#ifdef __cplusplus
173}
174#endif /* __cplusplus */
175
176#endif /* __DRIVERS_CANBUS_ALIAS_MAPPINGS__ */
alias_mapping_t * AliasMappings_find_mapping_by_node_id(node_id_t node_id)
Finds the mapping entry for the given Node ID.
Definition alias_mappings.c:266
void AliasMappings_set_has_duplicate_alias_flag(void)
Signals the main loop that an incoming message used one of our reserved aliases.
Definition alias_mappings.c:97
alias_mapping_info_t * AliasMappings_get_alias_mapping_info(void)
Returns a pointer to the internal alias mapping info structure.
Definition alias_mappings.c:90
alias_mapping_t * AliasMappings_find_mapping_by_alias(uint16_t alias)
Finds the mapping entry for the given alias.
Definition alias_mappings.c:226
void AliasMappings_flush(void)
Clears all alias mappings and resets all flags.
Definition alias_mappings.c:289
void AliasMappings_initialize(void)
Initializes the alias mapping buffer, clearing all entries and flags.
Definition alias_mappings.c:79
void AliasMappings_unregister(uint16_t alias)
Removes the entry matching the given alias from the buffer.
Definition alias_mappings.c:189
void AliasMappings_clear_has_duplicate_alias_flag(void)
Clears the duplicate alias flag after the conflict has been resolved.
Definition alias_mappings.c:104
alias_mapping_t * AliasMappings_register(uint16_t alias, node_id_t node_id)
Registers a CAN alias / Node ID pair in the buffer.
Definition alias_mappings.c:141
Type definitions and constants for the CAN transport layer.
Core type definitions, structures, and configuration constants for the OpenLCB library.
uint64_t node_id_t
48-bit Node ID stored in a 64-bit type (upper 16 bits unused).
Definition openlcb_types.h:359
Definition can_types.h:190
Definition can_types.h:173

Copyright (c) 2026 Jim Kueneman all rights reserved. See the License