ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
clockwerkerrors.h
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16/*
17Header file to define warnings and errors for clockwerk module.
18Convention is as follows:
19NO_ERROR is zero
20ERRORS are numbers > 0
21WARNINGS are numbers < 0
22
23Author: Alex Reynolds
24*/
25
26/// ---------------------------------------------------------------------------------------------------
27/// Matrix and math errors
28/// ---------------------------------------------------------------------------------------------------
29
30/// Error code in the case where matrix math executed successfully
31#define NO_ERROR 0
32
33/// Error code in the case where dimensions were mismatched for an
34/// operation. This error could be returned due to internal mismatches
35/// (i.e. attempt to take determinant of non-square matrix) or
36/// due to mismatches with external sources, i.e. matrix multiplication
37/// dimension mismatch
38#define ERROR_DIMENSIONS 1
39
40/// Error code in the case where the matrix is too poorly conditioned
41/// to perform an operation. For example, determinant close to zero
42#define ERROR_POORLY_CONDITIONED 2
43#define TOLERANCE_CONDITIONING 1e-12
44
45/// Error code in the case where some fool tried to divide by zero
46#define ERROR_DIVIDE_BY_ZERO 3
47
48/// Error code in the case where a function is passed data that exceeds
49/// its range of validity
50#define ERROR_INVALID_RANGE 4
51
52/// Error code in the case where some fool tried to take the square root
53/// of a negative number
54#define ERROR_NEGATIVE_SQRT 5
55
56/// Error code in case of a null pointer
57#define ERROR_NULLPTR 6
58
59/// Error code with invalid subtraction
60#define ERROR_SUBTRACTION_PARAMS 7
61
62/// ---------------------------------------------------------------------------------------------------
63/// Graph tree errors
64/// ---------------------------------------------------------------------------------------------------
65
66/// Error code in the case where the graph tree tries to add a new element
67/// to a tree, but that element already exists on the tree
68#define ERROR_TREE_NAME_EXISTS 10
69
70/// Error code in the case where the expected node does not lie on a
71/// graph tree
72#define ERROR_TREE_NODE_NOT_PRESENT 11
73
74/// Warning in the case where the user attempts to log a graph tree object that
75/// is not loggable
76#define WARN_NOT_LOGGABLE -12
77
78/// Error in the case where we have a circular reference
79#define ERROR_CIRCULAR_REFERENCE 13
80
81/// Error in case where tree is locked
82#define ERROR_TREE_LOCKED 14
83
84/// ---------------------------------------------------------------------------------------------------
85/// Logger errors
86/// ---------------------------------------------------------------------------------------------------
87
88/// Error code in the case where the message size passed to the logger exceeds
89/// the maximum message size
90#define ERROR_MAX_MSG_SIZE 20
91
92/// Error code in the case where the logger was unable to write to file pointer
93#define ERROR_FILE_WRITE 21
94
95/// Warning code in case message was below debug level required for logging
96#define WARN_LOG_LEVEL -22
97
98/// ---------------------------------------------------------------------------------------------------
99/// Data IO/Signal Errors
100/// ---------------------------------------------------------------------------------------------------
101
102/// Error code for attempting to write to a signal/DataIO object without permission
103#define ERROR_WRITE_PERMISSION 31
104
105/// ---------------------------------------------------------------------------------------------------
106/// Logging errors
107/// ---------------------------------------------------------------------------------------------------
108
109/// Variable to raise an error if logger is not locked appropriately before logging
110#define ERROR_LOGGER_LOCK 40
111
112/// Variable to raise an error if an appropriate buffer is not in place
113#define ERROR_BUFFER_NOT_IMPLEMENTED 41
114
115/// ---------------------------------------------------------------------------------------------------
116/// Frame errors
117/// ---------------------------------------------------------------------------------------------------
118
119/// Error in the case where parent of a frame is not a frame
120#define ERROR_PARENT_NOT_FRAME 50
121
122/// Error in the case where two frames are not part of the same tree
123#define ERROR_DIFFERENT_TREE 51
124
125/// Error in the case where a root frame is not present
126#define ERROR_NO_ROOT_FRAME 52
127
128/// Error in the case where you attempt to modify a frame without permission
129#define ERROR_FRAME_MOD_PERMISSION 53
130
131/// Error in the case where we attempt to add an invalid derived
132/// frame type as the parent of a derived frame type
133#define ERROR_FRAME_PARENT_TYPE 54
134
135/// ---------------------------------------------------------------------------------------------------
136/// Integrator and dynamics errors
137/// ---------------------------------------------------------------------------------------------------
138
139/// Error in the case where dynamics model overruns steps or gets out of whack
140#define ERROR_STEP_OVERRUN 60
141
142/// Error in the case where an invalid integrator type is passed as an argument
143#define ERROR_INVALID_INTEGRATOR_TYPE 61
144
145/// ---------------------------------------------------------------------------------------------------
146/// General model errors
147/// ---------------------------------------------------------------------------------------------------
148
149/// Error in the case where dynamics model overruns steps or gets out of whack
150#define ERROR_NOT_FOUND 70
151
152/// Warning in the case an iterative solver was unable to converge
153#define WARNING_NOT_CONVERGED -71
154
155/// ---------------------------------------------------------------------------------------------------
156/// IO and General Simulation Errors
157/// ---------------------------------------------------------------------------------------------------
158
159/// Error in the case where dynamics model overruns steps or gets out of whack
160#define ERROR_CANNOT_CONVERT_STRING 80
161
162/// Error in the case where dynamics model overruns steps or gets out of whack
163#define WARNING_NO_MATCH -81
164
165/// Error in the case where the sim exec is not set up
166#define ERROR_NOT_SETUP 82