text: #ifndef _CONFIG_HXX_
  #define _CONFIG_HXX_
  
  #include "openlcb/ConfiguredConsumer.hxx"
  #include "openlcb/ConfiguredProducer.hxx"
  #include "openlcb/ConfigRepresentation.hxx"
  #include "openlcb/MemoryConfig.hxx"
  
  #include "Hardware.hxx"
  #include "Revision.hxxout"
  
  #include "Logic.hxx"
  #include "Mast.hxx"
  #include "TrackCircuit.hxx"
  
  namespace openlcb
  {
  
  /// Defines the identification information for the node. The arguments are:
  ///
  /// - 4 (version info, always 4 by the standard
  /// - Manufacturer name
  /// - Model name
  /// - Hardware version
  /// - Software version
  ///
  /// This data will be used for all purposes of the identification:
  ///
  /// - the generated cdi.xml will include this data
  /// - the Simple Node Ident Info Protocol will return this data
  /// - the ACDI memory space will contain this data.
  extern const SimpleNodeStaticValues SNIP_STATIC_DATA = {
      4,               "Deepwoods Software", HARDWARE_IMPL,
      "linux.armv7a", "1.00"};
  
  
  /// Used for detecting when the config file stems from a different config.hxx
  /// version and needs to be factory reset before using. Change every time that
  /// the config eeprom file's layout changes.
  static constexpr uint16_t CANONICAL_VERSION = 0x9000;
  
  using LogicGroup = openlcb::RepeatedGroup<LogicConfig, LOGICCOUNT>;
  using MastGroup = openlcb::RepeatedGroup<MastConfig, MASTCOUNT>;
  using TrackCircuitGroup = openlcb::RepeatedGroup<TrackCircuitConfig, TRACKCIRCUITCOUNT>;
  
  /// Defines the main segment in the configuration CDI. This is laid out at
  /// origin 128 to give space for the ACDI user data at the beginning.
  CDI_GROUP(IoBoardSegment, Name(HARDWARE_IMPL), Segment(MemoryConfigDefs::SPACE_CONFIG), Offset(128));
  /// Each entry declares the name of the current entry, then the type and then
  /// optional arguments list.
  CDI_GROUP_ENTRY(internal_config, InternalConfigData);
  CDI_GROUP_ENTRY(logics, LogicGroup, Name("LOGIC"), RepName("Logic"));
  CDI_GROUP_ENTRY(masts, MastGroup, Name("Rule to aspect"),RepName("Mast"));
  CDI_GROUP_ENTRY(circuits, TrackCircuitGroup, Name("TRACK CIRCUITS"), RepName("Circuit"));
  CDI_GROUP_END();
  
  /// This segment is only needed temporarily until there is program code to set
  /// the ACDI user data version byte.
  CDI_GROUP(VersionSeg, Segment(MemoryConfigDefs::SPACE_CONFIG),
      Name("Version information"));
  CDI_GROUP_ENTRY(acdi_user_version, Uint8ConfigEntry,
      Name("ACDI User Data version"), Description("Set to 2 and do not change."));
  CDI_GROUP_ENTRY(buildrevisions,BuildRevisions);
  CDI_GROUP_END();
  
  /// The main structure of the CDI. ConfigDef is the symbol we use in main.cxx
  /// to refer to the configuration defined here.
  CDI_GROUP(ConfigDef, MainCdi());
  /// Adds the <identification> tag with the values from SNIP_STATIC_DATA above.
  CDI_GROUP_ENTRY(ident, Identification);
  /// Adds an <acdi> tag.
  CDI_GROUP_ENTRY(acdi, Acdi);
  /// Adds a segment for changing the values in the ACDI user-defined
  /// space. UserInfoSegment is defined in the system header.
  CDI_GROUP_ENTRY(userinfo, UserInfoSegment, Name("User Info"));
  /// Adds the main configuration segment.
  CDI_GROUP_ENTRY(seg, IoBoardSegment);
  /// Adds the versioning segment.
  CDI_GROUP_ENTRY(version, VersionSeg);
  CDI_GROUP_END();
  
  } // namespace openlcb
  
  #endif // _CONFIG_HXX_
  