GM6000 Digital Heater Controller
Branch: main
SDX-1330
Main Page
Namespaces
Components
Files
File List
File Members
Ajax
Main
StorageMap_.h
Go to the documentation of this file.
1
#ifndef Storm_Thermostat_Main_UserRecord_h_
2
#define Storm_Thermostat_Main_UserRecord_h_
3
/*-----------------------------------------------------------------------------
4
* This file is part of the Colony.Core Project. The Colony.Core Project is an
5
* open source project with a BSD type of licensing agreement. See the license
6
* agreement (license.txt) in the top/ directory or on the Internet at
7
* http://integerfox.com/colony.core/license.txt
8
*
9
* Copyright (c) 2014-2023 John T. Taylor
10
*
11
* Redistributions of the source code must retain the above copyright notice.
12
*----------------------------------------------------------------------------*/
13
/** @file
14
15
This file contains the magic values for how data is laid out in the
16
off-board EEPROM
17
*/
18
19
#include "colony_config.h"
20
#include "
Cpl/Persistent/CrcChunk.h
"
21
#include "
Cpl/Persistent/MirroredChunk.h
"
22
23
// clang-format off
24
25
/// Starting offset for Application Records
26
#define AJAX_MAIN_APPLICATION_RECORDS_START_OFFSET 0
27
28
/// Metadata length for a Mirrored Chunk
29
#define AJAX_MAIN_MIRRORED_CHUNK_META_LEN Cpl::Persistent::MirroredChunk::FRAME_OVERHEAD
30
31
/// Metadata length for a CRC Chunk
32
#define AJAX_MAIN_CRC_CHUNK_META_LEN Cpl::Persistent::CrcChunk::FRAME_OVERHEAD
33
34
/// Maximum number of log entries
35
#ifndef OPTION_AJAX_MAIN_MAX_LOG_ENTRIES
36
#define OPTION_AJAX_MAIN_MAX_LOG_ENTRIES 256
37
#endif
38
39
/// USER Record/Region
40
#define AJAX_MAIN_USER_REGION_DATA_LEN 64
41
/// USER Record/Region
42
#define AJAX_MAIN_USER_REGION_RESERVED 64
43
/// USER Record/Region
44
#define AJAX_MAIN_USER_REGION_LENGTH ( AJAX_MAIN_USER_REGION_DATA_LEN + AJAX_MAIN_USER_REGION_RESERVED + AJAX_MAIN_MIRRORED_CHUNK_META_LEN )
45
/// USER Record/Region
46
#define AJAX_MAIN_USER_REGION_A_START_ADDRESS ( AJAX_MAIN_APPLICATION_RECORDS_START_OFFSET )
47
/// USER Record/Region
48
#define AJAX_MAIN_USER_REGION_B_START_ADDRESS ( AJAX_MAIN_USER_REGION_A_START_ADDRESS + AJAX_MAIN_USER_REGION_LENGTH )
49
/// USER Record/Region
50
#define AJAX_MAIN_USER_REGION_NEXT_OFFSET ( AJAX_MAIN_USER_REGION_B_START_ADDRESS + AJAX_MAIN_USER_REGION_LENGTH )
51
52
53
/// PERSONALITY Record/Region
54
#define AJAX_MAIN_PERSONALITY_REGION_DATA_LEN 193
55
/// PERSONALITY Record/Region
56
#define AJAX_MAIN_PERSONALITY_REGION_RESERVED 64
57
/// PERSONALITY Record/Region
58
#define AJAX_MAIN_PERSONALITY_REGION_LENGTH ( AJAX_MAIN_PERSONALITY_REGION_RESERVED + AJAX_MAIN_PERSONALITY_REGION_DATA_LEN + AJAX_MAIN_MIRRORED_CHUNK_META_LEN )
59
/// PERSONALITY Record/Region
60
#define AJAX_MAIN_PERSONALITY_REGION_A_START_ADDRESS ( AJAX_MAIN_USER_REGION_NEXT_OFFSET )
61
/// PERSONALITY Record/Region
62
#define AJAX_MAIN_PERSONALITY_REGION_B_START_ADDRESS ( AJAX_MAIN_PERSONALITY_REGION_A_START_ADDRESS + AJAX_MAIN_PERSONALITY_REGION_LENGTH )
63
/// PERSONALITY Record/Region
64
#define AJAX_MAIN_PERSONALITY_REGION_NEXT_OFFSET ( AJAX_MAIN_PERSONALITY_REGION_B_START_ADDRESS + AJAX_MAIN_PERSONALITY_REGION_LENGTH )
65
66
/// METRICS Record/Region
67
#define AJAX_MAIN_METRICS_REGION_DATA_LEN 64
68
/// METRICS Record/Region
69
#define AJAX_MAIN_METRICS_REGION_RESERVED 64
70
/// METRICS Record/Region
71
#define AJAX_MAIN_METRICS_REGION_LENGTH ( AJAX_MAIN_METRICS_REGION_RESERVED + AJAX_MAIN_METRICS_REGION_DATA_LEN + AJAX_MAIN_MIRRORED_CHUNK_META_LEN )
72
/// METRICS Record/Region
73
#define AJAX_MAIN_METRICS_REGION_A_START_ADDRESS ( AJAX_MAIN_PERSONALITY_REGION_NEXT_OFFSET )
74
/// METRICS Record/Region
75
#define AJAX_MAIN_METRICS_REGION_B_START_ADDRESS ( AJAX_MAIN_METRICS_REGION_A_START_ADDRESS + AJAX_MAIN_METRICS_REGION_LENGTH )
76
/// METRICS Record/Region
77
#define AJAX_MAIN_METRICS_REGION_NEXT_OFFSET ( AJAX_MAIN_METRICS_REGION_B_START_ADDRESS + AJAX_MAIN_METRICS_REGION_LENGTH )
78
79
/// LOGGING - Index Record/Region
80
#define AJAX_MAIN_LOGINDEX_REGION_DATA_LEN 12
81
/// METRICS Record/Region
82
#define AJAX_MAIN_LOGINDEX_REGION_RESERVED 32
83
/// METRICS Record/Region
84
#define AJAX_MAIN_LOGINDEX_REGION_LENGTH ( AJAX_MAIN_LOGINDEX_REGION_RESERVED + AJAX_MAIN_LOGINDEX_REGION_DATA_LEN + AJAX_MAIN_MIRRORED_CHUNK_META_LEN )
85
/// METRICS Record/Region
86
#define AJAX_MAIN_LOGINDEX_REGION_A_START_ADDRESS ( AJAX_MAIN_METRICS_REGION_NEXT_OFFSET )
87
/// METRICS Record/Region
88
#define AJAX_MAIN_LOGINDEX_REGION_B_START_ADDRESS ( AJAX_MAIN_LOGINDEX_REGION_A_START_ADDRESS + AJAX_MAIN_LOGINDEX_REGION_LENGTH )
89
/// METRICS Record/Region
90
#define AJAX_MAIN_LOGINDEX_REGION_NEXT_OFFSET ( AJAX_MAIN_LOGINDEX_REGION_B_START_ADDRESS + AJAX_MAIN_LOGINDEX_REGION_LENGTH )
91
92
93
/// LOGGING - Entries Record/Region
94
#define AJAX_MAIN_LOGENTRIES_REGION_DATA_LEN ( 159 * OPTION_AJAX_MAIN_MAX_LOG_ENTRIES )
// Length include: log entry + metadata + chunk-metadata
95
/// METRICS Record/Region
96
#define AJAX_MAIN_LOGENTRIES_REGION_RESERVED 0
97
/// METRICS Record/Region
98
#define AJAX_MAIN_LOGENTRIES_REGION_LENGTH ( AJAX_MAIN_LOGENTRIES_REGION_RESERVED + AJAX_MAIN_LOGENTRIES_REGION_DATA_LEN )
99
/// METRICS Record/Region
100
#define AJAX_MAIN_LOGENTRIES_REGION_START_ADDRESS ( AJAX_MAIN_LOGINDEX_REGION_NEXT_OFFSET )
101
/// METRICS Record/Region
102
#define AJAX_MAIN_LOGENTRIES_REGION_NEXT_OFFSET ( AJAX_MAIN_LOGENTRIES_REGION_START_ADDRESS + AJAX_MAIN_LOGENTRIES_REGION_LENGTH )
103
104
// clang-format on
105
106
#endif
// end header latch
CrcChunk.h
MirroredChunk.h
Generated on Sat Jan 18 2025 22:23:55 for GM6000 Digital Heater Controller by
1.9.8