diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a901564 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.6.4) +project(CFS_LC C) + +include_directories(fsw/mission_inc) +include_directories(fsw/platform_inc) + +aux_source_directory(fsw/src APP_SRC_FILES) + +# Create the app module +add_cfe_app(lc ${APP_SRC_FILES}) diff --git a/cfs-lc-app-OSS-readme.txt b/cfs-lc-app-OSS-readme.txt index dfc6a08..0b915d8 100644 --- a/cfs-lc-app-OSS-readme.txt +++ b/cfs-lc-app-OSS-readme.txt @@ -1,10 +1,10 @@ core Flight System (cFS) Limit Checker Application (LC) Open Source Release Readme -LC Release 2.0.0 +LC Release 2.1.0 Date: -February 27, 2015 +August 29, 2017 Introduction: The Limit Checker application (LC) is a core Flight System (cFS) application @@ -24,12 +24,12 @@ Introduction: The LC application is written in C and depends on the cFS Operating System Abstraction Layer (OSAL) and cFE components. To build and run the LC application, follow the cFS Deployment Guide instructions contained in - cFE-6.4.1-OSS-release/docs. There is additional LC application specific + cFE-6.5.0a-OSS-release/docs. There is additional LC application specific configuration information contained in the application user's guide - available in cfs-lc-2.0.0-OSS-release/docs/users_guide + available in cfs-lc-2.1.0-OSS-release/docs/users_guide There are also "Quick start" instructions provided in - cFE-6.4.1-OSS-release/cfe-OSS-readme.txt + cFE-6.5.0a-OSS-release/cfe-OSS-readme.txt The OSAL is available at http://sourceforge.net/projects/osal/ and github.com/nasa/ @@ -41,23 +41,23 @@ Introduction: Software Included: - Limit Checker application (LC) 2.0.0 + Limit Checker application (LC) 2.1.0 Software Required: - Operating System Abstraction Layer 4.1.1 or higher can be + Operating System Abstraction Layer 4.2.0 or higher can be obtained at http://sourceforge.net/projects/osal or github.com/nasa/osal - core Flight Executive 6.4.1 or higher can be obtained at + core Flight Executive 6.5.0 or higher can be obtained at http://sorceforge.net/projects/coreflightexec Runtime Targets Supported: - The "out of the box" targets in the cFE 6.4.1 distribution include: + The "out of the box" targets in the cFE 6.5.0 distribution include: 1. 32 bit x86 Linux ( CentOS 6.x ) - 2. Motorola MCP750 PowerPC vxWorks 6.4 + 2. Motorola MCP750 PowerPC vxWorks 6.9 Other targets: Other targets are included, but may take additional work to diff --git a/docs/CFS LCX Requirements Document V1_0 090512.docx b/docs/CFS LCX Requirements Document V1_0 090512.docx deleted file mode 100644 index 07dbbd2..0000000 Binary files a/docs/CFS LCX Requirements Document V1_0 090512.docx and /dev/null differ diff --git a/docs/cFS LC 2100 Version Description Document.docx b/docs/cFS LC 2100 Version Description Document.docx new file mode 100644 index 0000000..1af818d Binary files /dev/null and b/docs/cFS LC 2100 Version Description Document.docx differ diff --git a/docs/cFS LC 2100 Version Description Document.pdf b/docs/cFS LC 2100 Version Description Document.pdf new file mode 100644 index 0000000..ab32a2d Binary files /dev/null and b/docs/cFS LC 2100 Version Description Document.pdf differ diff --git a/docs/cFS LC RequirementsDocumentV1_2-082517.docx b/docs/cFS LC RequirementsDocumentV1_2-082517.docx new file mode 100644 index 0000000..444715e Binary files /dev/null and b/docs/cFS LC RequirementsDocumentV1_2-082517.docx differ diff --git a/docs/cFS LC RequirementsDocumentV1_2-082517.pdf b/docs/cFS LC RequirementsDocumentV1_2-082517.pdf new file mode 100644 index 0000000..ba9d0b1 Binary files /dev/null and b/docs/cFS LC RequirementsDocumentV1_2-082517.pdf differ diff --git a/docs/dox_src/detailed_design/cfs_lc.dox b/docs/dox_src/detailed_design/cfs_lc.dox index 0d96a8e..f48609a 100644 --- a/docs/dox_src/detailed_design/cfs_lc.dox +++ b/docs/dox_src/detailed_design/cfs_lc.dox @@ -1,924 +1,927 @@ -/** - \mainpage CFS Limit Checker (LC) User's Guide - - -**/ - -/** - \page cfslcrevhist CFS Limit Checker User's Guide Revision History - - \verbatim - $Log: cfs_lc.dox $ - Revision 1.1 2012/07/31 16:53:25EDT nschweis - Initial revision - Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/dox_src/detailed_design/project.pj - Revision 1.4 2009/04/18 14:50:44EDT dkobe - Cleaned up comments for users guide generation - Revision 1.4 2009/04/18 13:49:37EDT dkobe - Corrected image links - Revision 1.3 2009/04/18 13:30:21EDT dkobe - Standardized some content - \endverbatim - -**/ -/** - \page cfslcintro CFS Limit Checker Introduction - -

Scope

- - This document provides a complete specification for the commands and telemetry associated - with the CFS Limit Checker (LC) application software. The document is intended primarily - for users of the software (operations personal, test engineers, and maintenance personnel). - The last section of the document, the deployment guide section, is intended for mission - developers when deploying and configuring the FM application software for a mission - flight software build environment. - -

Applicable Documents

- - - - - - - - - - -
Document ID Document Title
TBD CFS Limit Checker Application Requirements Document
TBD CFS Limit Checker Heritage Analysis Document
TBD CFS Limit Checker Design Document
- - -

Acronyms

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Acronym Description
API Application Programming Interface
ATP Absolute Time Processor
ATS Absolute Time tagged command Sequence
CCSDS Consultative Committee for Space Data Systems
C&DH Command and Data Handling
CFE Core Flight Executive
CFS Core Flight System
CI Command Ingest
Cmd Command
CPU Central Processing Unit
EDAC Error Detection and Correction
FDS Flight Data System
FM File Manager
FSW Flight Software
GN&C Guidance Navigation & Control
GSFC Goddard Space Flight Center
HK Housekeeping
HW, H/W Hardware
ICD Interface Control Document
ISR Interrupt Service Routine
LC CFS Limit Checker
OS Operating System
OSAL Operating System Abstraction Layer
Pkts Packets
RAM Random-Access Memory
RTOS Real Time Operating System
RTP Relative Time Processor
RTS Relative Time tagged command Sequence
SB Software Bus Service
SBC Single Board Computer
SC Stored Commands task
SW, S/W Software
TBD To Be Determined
TBL Table
TDM Time Data Multiplex
TLM Telemetry
UTC Universal time code
- - Prev: \ref cfslcrevhist
- Next: \ref cfslcovr -**/ - -/** - \page cfslcovr CFS Limit Checker Overview - - The CFS Limit Checker (LC) application monitors telemetry data points in the flight system - and compares the values against predefined threshold limits. When a threshold condition - is encountered, an event message is issued and a Relative Time Sequence (RTS) command - script may be initiated to respond to the threshold violation. - - LC is a table driven application. Monitoring and response configuration data is stored in - definition tables that can be updated by the ground operators, while statistics on threshold - violations are stored in dump-only results tables and summarized in housekeeping data. - - When processing beyond the standard comparison operators is needed, LC supports the use of - custom evaluation functions that can be modified by a software patch or application update. - - \section LC Design Overview - - The LC design is built around two fundamental constructs. The Watchpoint and the - Actionpoint. - - A Watchpoint defines a comparison between a piece of telemetry data and a pre-defined - constant. Watchpoints are defined in the Watchpoint Definition Table (WDT). Statistics - on watchpoint evaluations are stored in the Watchpoint Results Table (WRT) - (see \ref cfslctbl). Watchpoints are evaluated whenever a message containing the - telemetry point is received over the software bus by LC. - - An Actionpoint defines the response LC will take based upon the current state of one - or more watchpoints. Actionpoints are defined in the Actionpoint Definition Table (ADT). - Statistics on actionpoint evaluations are stored in the Actionpoint Results Table (ART) - (see \ref cfslctbl). Actionpoints are evaluated whenever LC receives a message with - the #LC_SAMPLE_AP_MID message ID. This is not a ground command but an internal message - that will normally come from the CFS scheduler (SCH) application. - - \image html LC_Context.png "LC Context Diagram"
- - Next: \ref cfslcopr -**/ - -/** - \page cfslcopr CFS Limit Checker Operation - - The CFS Limit Checker has three modes of operation, set by the #LC_SET_LC_STATE_CC ground - command and echoed in the CurrentLCState housekeeping variable. - - Active - Active mode is the normal operation mode. In Active mode, the LC task performs - all limit tests defined in the watchpoint definition table and will invoke stored - command sequences if the results of watchpoint evaluations trigger an actionpoint - condition as defined in the actionpoint definition table. - - Passive - In Passive mode, the LC task behaves just like in Active mode except no stored - command sequences will be invoked as a result of actionpoint triggers. - - Disabled - When disabled, the LC task will perform no watchpoint or actionpoint limit - tests. - - Watchpoints are evaluated whenever a message containing the telemetry point is received - by LC. Watchpoints may evaluate to #LC_WATCH_TRUE, #LC_WATCH_FALSE, #LC_WATCH_NOT_MEASURED - or #LC_WATCH_ERROR. Watchpoints can not be individually disabled. The only ways to keep - Watchpoints from being evaluated are to squelch the telemetry packet on which they trigger, - load a WDT that undefines a Watchpoint or disable the entire LC task. - - Actionpoints are evaluated whenever LC receives a message with the #LC_SAMPLE_AP_MID message - ID. An Actionpoint defines a logical relationship between one or more Watchpoint results. - This logical relationship is defined in the form of a Reverse Polish Notation (RPN) - expression in the actionpoint definition specified in the ADT. The result of this RPN - evaluation is either #LC_ACTION_PASS, #LC_ACTION_FAIL, #LC_ACTION_NOT_MEASURED or - #LC_ACTION_ERROR. In the Actionpoint definition, a maximum number of consecutive fails is - specified. If an Actionpoint fails the specified number of times consecutively, LC sends a - request to the Stored Command (SC) application to execute a RTS (Relative Time Sequence) of - commands as a response to this condition. - - Actionpoints can be individually enabled/disabled with the #LC_SET_AP_STATE_CC ground - command. The state of an actionpoint may be set to #LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, - or #LC_APSTATE_DISABLED. These states operate in the same way as the application operating - modes described above. #LC_APSTATE_PASSIVE will just disable RTS requests, while - #LC_APSTATE_DISABLED will stop evaluation of the actionpoint all together. An additional - state #LC_APSTATE_PERMOFF which functions the same as #LC_APSTATE_DISABLED but can only - be changed via table load, can be set using the #LC_SET_AP_PERMOFF_CC ground command - (see \ref cfslcfaqs). - - An example of this watchpoint/actionpoint relationship is shown in the following - diagram: - \image html LC_Monitor_Process.png "LC Monitoring Process Example Diagram"
- - Since LC is a table driven application, it's behavior is dictated by the contents of the - WDT and ADT configuration tables. To change this behavior is simply a matter of loading a - new table with modified parameters. LC will check for any pending table updates whenever - it processes a housekeeping request. If the table passes validation it will go into - effect right away before the next message is read from the software bus. It is not necessary - to disable LC before updating a table, however since the watchpoint and actionpoint definitions - use two separate tables, careful attention needs to be paid to ensure that the tables are - consistent with each other whenever LC is active. For this reason, a mission may choose to - always disable LC prior to any table updates and then re-enable monitoring. - - When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is - reset to initialization values. - - Ideally, LC should require no intervention from the ground on a routine basis. Once monitoring - is enabled, it will keep processing data and checking for threshold violations (assuming regular - scheduler input). - - Next: \ref cfslcreq
- Prev: \ref cfslcovr -**/ - -/** - \page cfslcreq CFS Limit Checker Requirements - - The following are LC subsystem requirements. Detailed requirements are kept under MKS - version control and can be obtained by contacting CFS project management. - - CFS-500: The CFS shall provide for on-board monitoring of telemetry points. - - CFS-501: The CFS shall have the capability to modify the selection and configuration of - monitored telemetry via ground command - - CFS-502: The selection of the monitored points shall be table driven and configurable - via ground uploads - - CFS-503: The CFS shall be able to execute autonomous recovery sequences upon detection - of threshold failures in monitored telemetry - - CFS-504: The contents of recovery sequences shall be configurable via ground uploads - - Next: \ref cfslcdg
- Prev: \ref cfslcopr -**/ - -/** - \page cfslcdg CFS Limit Checker Deployment Guide - - The first step in deploying the LC application is to size and construct default WDT - and ADT tables. LC requires these default table images to be on the filesystem when - the application is started or it will fail to load. These files are required even - if using the Critical Data Store (CDS) since LC will fall back to these table images - if a table restore from CDS fails (which will happen during a power-on reset). Where LC - will look to find these files is dictated by the configuration parameters - #LC_WDT_FILENAME and #LC_ADT_FILENAME. - - The size of the WDT and ADT tables is dictated by the configuration parameters - #LC_MAX_WATCHPOINTS and #LC_MAX_ACTIONPOINTS. The total size of either table should - not exceed the cFE size limit for a single buffered table set by the - #CFE_TBL_MAX_SNGL_TABLE_SIZE parameter. When considering how many watchpoints and - actionpoints are needed, keep in mind the the entire WDT is sequentially searched - whenever a message that may contain watchpoints is received. Likewise the entire - ADT will be processed whenever a #LC_SAMPLE_AP_MID message is recieved. While it - is desirable to leave unused entries in both tables for later updates, large tables - will increase search time which may be undesirable depending on the telemetry and - actionpoint sample rates required. LC defines the performance ID #LC_WDT_SEARCH_PERF_ID - that can be used to monitor WDT search time. There is not currently a performance - ID for ADT processing since the actionpoint sample cycle is not dependent on telemetry - rates but set by the configuration of the scheduler (SCH) application. - - Example source code for these tables sized to the default number of watchpoints - and actionpoints are provided in the files lc_def_wdt.c and lc_def_adt.c. - - LC requires a message with the message ID #LC_SAMPLE_AP_MID to sample actionpoints. - The CFS scheduler application (SCH) needs to be configured to provide this trigger - message at the desired frequency for actionpoint processing to occur. - - The function #LC_ExecuteRTS in the file lc_custom.c needs to be reviewed for any - modifications that may be needed to properly initiate RTS responses to actionpoint - failures. This function uses a local declaration of an example stored commanding - (SC) message structure which was done to allow LC to be compiled independent - of any other external application's data structures. A mission may choose to remove - this and use a message structure declared outside LC instead. This also applies to the - #LC_RTS_REQ_MID and #LC_RTS_REQ_CC constants in lc_mission_cfg.h. - - If custom functions are to be used, the function #LC_CustomFunction in the file - lc_custom.c needs to modified appropriately (see \ref cfslcfaqs). - - In the lc_platform_cfg.h file, there are configuration parameters that control use - of the Critical Data Store (CDS) and the LC operation mode on application - initialization. The default case is not to use the CDS and to set the application - state to #LC_STATE_DISABLED. - - Next: \ref cfslccmds
- Prev: \ref cfslcreq -**/ - -/** - \page cfslccmds CFS Limit Checker Commands - - - - - -
\ref cfslctlm \ref cfslctbl \ref cfslccfg
- - The following is a list of commands that are processed by the CFS Limit Checker Application: -**/ - -/** - \page cfslctlm CFS Limit Checker Telemetry - - - - - -
\ref cfslccmds \ref cfslctbl \ref cfslccfg
- - The following is a list of telemetry that is generated by the CFS Limit Checker Application: -**/ - -/** - \page cfslctbl CFS Limit Checker Table Definitions - - - - - -
\ref cfslccmds \ref cfslctlm \ref cfslccfg
- -

-

Watchpoint Definition Table (WDT)

- - The structure of a single watchpoint definition is defined by #LC_WDTEntry_t. The WDT is - an array of these entries sized by the configuration parameter #LC_MAX_WATCHPOINTS. - The zero based index into this table is used by LC as the Watchpoint ID. - - Brief description of WDT fields: - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DataTypeWatchpoint Data Type. Enumerated type that must be one of the following:
#LC_WATCH_NOT_USED Used to mark unused entries
#LC_DATA_BYTE, #LC_DATA_UBYTE Signed or unsigned byte
#LC_DATA_WORD_BE, #LC_DATA_WORD_LE Signed word, big or little endian
#LC_DATA_UWORD_BE, #LC_DATA_UWORD_LE Unsigned word, big or little endian
#LC_DATA_DWORD_BE, #LC_DATA_DWORD_LE Signed double word, big or little endian
#LC_DATA_UDWORD_BE, #LC_DATA_UDWORD_LE Unsized double word, big or little endian
#LC_DATA_FLOAT_BE, #LC_DATA_FLOAT_BE 32 bit float, big or little endian
OperatorIDComparison type. Enumerated type that must be one of the following:
#LC_NO_OPER Can be used for unused entries (optional)
#LC_OPER_LT, #LC_OPER_LE Less Than, Less Than or Equal
#LC_OPER_NE, #LC_OPER_EQ Not Equal, Equal
#LC_OPER_GT, #LC_OPER_GE Greater Than, Greater Than or Equal
#LC_OPER_CUSTOM No compare, call custom function
MessageIDMessage ID for the message containing the watchpoint
WatchpointOffsetZero based byte offset from the beginning of the message - (including any headers) to the first byte of the - watchpoint data
BitMaskValue to be masked with watchpoint data prior to comparison. Use the - constant #LC_NO_BITMASK when no masking is desired
ComparisonValueValue watchpoint data is to be compared against. This field - uses the #LC_MultiType_t union to store different data types - in a fixed 32-bit field. See lc_def_wdt.c for examples of how - to set this value.
CustomFuncArgumentOptional 32 bit data to be passed to the custom function. - Can be used for any mission-defined purpose.
- -

-

Actionpoint Definition Table (ADT)

- - The structure of a single actionpoint definition is defined by #LC_ADTEntry_t. The ADT is - an array of these entries sized by the configuration parameter #LC_MAX_ACTIONPOINTS. - The zero based index into this table is used by LC as the Actionpoint ID. - - Brief description of ADT fields:
- - - - - - - - - - - - - - - - - - - - - - -
DefaultStateDefault (initial) state for this AP. Enumerated type that must be one - of the following:
#LC_ACTION_NOT_USED Used to mark unused entries
#LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, #LC_APSTATE_DISABLED
RTSId RTS to request if this AP fails
MaxFailsBeforeRTS How may consecutive failures before an RTS request is sent
RPNEquation [#LC_MAX_RPN_EQU_SIZE] Reverse Polish Equation that specifies when this - actionpoint should fail. Combination of Watchpoint - IDs and the following enumerated RPN operators:
#LC_RPN_AND, #LC_RPN_OR, #LC_RPN_XOR, #LC_RPN_NOT, #LC_RPN_EQUAL
See lc_def_adt.c for examples of how to construct this expression
EventType Event type used for event message if AP fails. Enumerated type that must be - one of the following:
#CFE_EVS_INFORMATION, #CFE_EVS_DEBUG, #CFE_EVS_ERROR, #CFE_EVS_CRITICAL
EventID Event ID used for event message if AP fails
EventText[#LC_MAX_ACTION_TEXT] Text used for the event msg when this AP fails - LC appends the trailer text #LC_AP_EVENT_TAIL_STR to - this string when reporting actionpoint failures.
- -

-

Watchpoint Results Table (WRT)

- - The structure of a single watchpoint results table entry is defined by #LC_WRTEntry_t. - The WRT is an array of these entries sized by the configuration parameter - #LC_MAX_WATCHPOINTS. The index into this table is the same Watchpoint ID used for the - corresponding definition table entry. - - Brief description of WRT fields:
- - - - - - - - - - - - - - - -
WatchResult Result for the last evaluation of this watchpoint. Enumerated type that - will be one of the following:
#LC_WATCH_TRUE, #LC_WATCH_FALSE, #LC_WATCH_NOT_MEASURED, #LC_WATCH_ERROR
EvaluationCount How many times this watchpoint has been evaluated
FalseToTrueCount How many times this watchpoint has transitioned from #LC_WATCH_FALSE - to #LC_WATCH_TRUE
ConsecutiveTrueCount Number of consecutive times this watchpoint has evaluated to - #LC_WATCH_TRUE
CumulativeTrueCount Total number of times this watchpoint has evaluated to - #LC_WATCH_TRUE
LastFalseToTrue Watchpoint value and timestamp at the last transition from - #LC_WATCH_FALSE (or #LC_WATCH_NOT_MEASURED) to #LC_WATCH_TRUE
LastTrueToFalse Watchpoint value and timestamp at the last transition from - #LC_WATCH_TRUE to #LC_WATCH_FALSE
- - The timestamp used for the LastFalseToTrue and LastTrueToFalse fields is taken from the - header of the message that contained the watchpoint. If the message timestamp is zero, LC - will use the time returned by the #CFE_TIME_GetTime function instead. - -

-

Actionpoint Results Table (ART)

- - The structure of a single actionpoint results table entry is defined by #LC_ARTEntry_t. - The ART is an array of these entries sized by the configuration parameter - #LC_MAX_ACTIONPOINTS. The index into this table is the same Actionpoint ID used for the - corresponding definition table entry. - - Brief description of ART fields:
- - - - - - - - - - - - - - - - - -
ActionResult Result for the last sample of this actionpoint. Enumerated type that - will be one of the following:
#LC_ACTION_PASS, #LC_ACTION_FAIL, #LC_ACTION_NOT_MEASURED, - #LC_ACTION_ERROR
CurrentState Current state of this actionpoint. Enumerated type that - will be one of the following:
#LC_ACTION_NOT_USED, #LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, - #LC_APSTATE_DISABLED, #LC_APSTATE_PERMOFF
FailToPassCount How many times this actionpoint has transitioned from - #LC_ACTION_FAIL to #LC_ACTION_PASS
PassToFailCount How many times this actionpoint has transitioned from - #LC_ACTION_PASS to #LC_ACTION_FAIL
ConsecutiveFailCount Number of consecutive times this actionpoint has evaluated - #LC_ACTION_FAIL
CumulativeFailCount Total number of times this actionpoint has evaluated to - #LC_ACTION_FAIL
CumulativeRTSExecCount Total number of times an RTS request has been sent for - this actionpoint
- -

- - The entire WDT is searched anytime a message is received that may contain watchpoints. - For this reason, it is important that unused entries are properly marked by setting - the WDT parameter DataType to #LC_WATCH_NOT_USED. - - The entire ADT is processed anytime a sample request is received that specifies an - actionpoint equal to #LC_ALL_ACTIONPOINTS. For this reason, it is important that unused - entries are properly marked by setting the ADT parameter DefaultState to - #LC_ACTION_NOT_USED. - - When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is - reset to initialization values. For each entry in the WRT, WatchResult is set to - #LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, - ActionResult is set to #LC_ACTION_NOT_MEASURED, the CurrentState is set to the - value of the actionpoint's DefaultState specified in the ADT, and all other values are - zeroed. - - These are also the values used (for the entries specified in the command) when the - #LC_RESET_AP_STATS_CC or #LC_RESET_WP_STATS_CC ground command is received. -**/ - -/** - \page cfslccfg CFS Limit Checker Configuration Parameters - - - - - -
\ref cfslccmds \ref cfslctlm \ref cfslctbl
- - The following are configuration parameters used to configure the CFS Limit Checker - Application either for each platform or for a mission as a whole. - -**/ - -/** - \page cfslccons CFS Limit Checker Operational Constraints - - The LC application requires default WDT and ADT table images to be on the filesystem - when the application is started or it will fail to load. These files are required even - if using the Critical Data Store (CDS) since LC will fall back to these table images - if a table restore from CDS fails (which will happen during a power-on reset). Where LC - will look to find these files is dictated by the configuration parameters - #LC_WDT_FILENAME and #LC_ADT_FILENAME. - - Potential causes for LC to terminate prematurely are an error return from the - software bus in the application main loop or error return from one of the cFE table - services functions when LC tries to do table management (check for updates, dump - requests etc.) during each housekeeping cycle. - - When using the Critical Data Store (CDS), the results tables and housekeeping data - will only be restored if the application was shut down through cFE Executive Services - and exited clean. If this is not the case, default values will be used - (see \ref cfslcfaqs). - - Ideally, LC should require no intervention from the ground on a routine basis. Once - monitoring is enabled, it will keep processing data and checking for threshold violations - (assuming regular scheduler input). - - Next: \ref cfslcfaqs
- Prev: \ref cfslctbl -**/ - -/** - \page cfslcfaqs CFS Limit Checker Frequently Asked Questions - -

Watchpoint Questions

- - (Q) - Watchpoints evaluate to #LC_WATCH_TRUE or #LC_WATCH_FALSE. When the - the watchpoint is defined which should be the error condition? -

- Watchpoints evaluate to a boolean True or False. So if you setup a - comparison < 100 any watchpoint value 0 to 99 will evaluate #LC_WATCH_TRUE - and 100+ will be #LC_WATCH_FALSE. - - You want to construct the watchpoint cases so they evaluate True when you - are outside of the acceptable range for a telemetry point. That's why there - are cumulative and consecutive true counts in the watchpoint results - table, but no corresponding values for False. - - For some examples, see the file lc_def_wdt.c - - - (Q) - There is only a single comparison value for each watchpoint. - How can I have multiple thresholds for a single telemetry point? -

- Create additional watchpoint definitions that reference the same telemetry - point but have different comparison values. The watchpoints will be evaluated - in the order they are listed in the WDT when the monitor point arrives. - - Having multiple watchpoints allows different Actionpoints to trigger on - each watchpoint state (or combination of states). - - - (Q) - How do I calculate the watchpoint offset? -

- The offset is a zero based byte offset from the beginning of the message - (including any headers) to the first byte of the watchpoint data. So for - a cFE raw command using CCSDS, the offset has to account for the size of - the cFE command header (#CFE_SB_CMD_HDR_SIZE). - - - (Q) - When do I need to use the bitmask in a watchpoint definition? -

- All watchpoints are sized to a 32 bit value when extracted from a message. - The specified bitmask value is then applied (as a bitwise AND operation) before - the comparison is made or the custom function is called. - - When the watchpoint data is sized, data types smaller than 32 bits are - properly sign or zero extended. For this reason, it is not necessary to - define a mask for UWORD, WORD or UBYTE, BYTE data types to compare properly. - Although it's not needed, a properly constructed bit mask will not cause - a problem for these evaluations either. - - When you really need to use a bitmask is when monitoring odd sized data - (such as a 24 bit sensor reading) or testing data to see if certain bits - have been set (or cleared). - - When no bitmask is needed, be sure to use the constant #LC_NO_BITMASK (or it's - equivalent value 0xFFFFFFFF) in your WDT tables. Since masking is a bitwise - AND, setting the bitmask to zero will have the effect of always clearing the - watchpoint data prior to comparison. - - - (Q) - Why do I need to specify the byte order (big or little endian) of the watchpoint - data type? -

- One enhancement made to the CFS version of LC is that it will properly byte - swap watchpoint data prior to masking and comparison if the byte order of the - data is different than the order used by the processor running LC. This allows - LC to monitor telemetry data that might be constructed by instrument or other - subsystem processors that use a different byte order. - - LC determines it's byte order using the _STRUCT_HIGH_BIT_FIRST_ and - _STRUCT_LOW_BIT_FIRST_ compiler switches that are set in the cFE header - common_types.h according to the platform designated in the cFE platform - makefile. - - - (Q) - When would a watchpoint evalute to #LC_WATCH_NOT_MEASURED? -

- #LC_WATCH_NOT_MEASURED is an initialization value for the Watchpoint - Results Table. If a watchpoint has this WatchResult then the watchpoint - is unused (the DataType in the WDT is set to #LC_WATCH_NOT_USED) or a - message that contains the watchpoint has not yet been recieved by LC and - evaluated. - - - (Q) - When would a watchpoint evalute to #LC_WATCH_ERROR? -

- #LC_WATCH_ERROR is a runtime error indicator for watchpoint processing. - Such a result should be rare since most of the causes are invalid watchpoint - parameters that should be caught during validation of the Watchpoint - Definition Table. - - One notable exception is for floating point watchpoints when the message - data is detected to be a floating point NAN (Not-A-Number) that can't - be relationally compared to any value. - - In all cases, an error event detailing the cause of the problem will be - issued when a WatchResult is set to #LC_WATCH_ERROR. - - - (Q) - What is a custom function and how do I create one? -

- A custom function is a way to do more complicated processing on a watchpoint - when the standard comparison operators are not adequate. - - When the OperatorID in a watchpoint definition is set to #LC_OPER_CUSTOM. - The function #LC_CustomFunction is called instead of LC doing a comparison. - #LC_CustomFunction will then return #LC_WATCH_TRUE or #LC_WATCH_FALSE that - will be used as the WatchResult. - - Although #LC_CustomFunction is the same entry point for all watchpoints with a - designated custom function operator, a mission can modify the function body - to switch on the watchpoint ID (or CustomFuncArgument specified in the - watchpoint definition) and branch to as many different sub-functions - as it needs for watchpoint specific processing. - - The #LC_CustomFunction stub is in the source file lc_custom.c - - - (Q) - How is the WPResults array in the housekeeping packet (#LC_HkPacket_t) - interpreted? -

- The WPResults array is a byte array (aligned to the nearest longword - boundary) that contains a packed subset of the current contents of the - Watchpoint Results Table (see #LC_WRTEntry_t). - - It allocates 2 bits per watchpoint for the most recent watchpoint - comparison result. The numerical 2 bit values are defined using the - following constants: - - #LC_HKWR_FALSE, #LC_HKWR_TRUE, #LC_HKWR_ERROR, #LC_HKWR_NOT_MEASURED - - Ordering (up to #LC_MAX_WATCHPOINTS) is as follows : - - Byte 0:(Rwp3, Rwp2, Rwp1, Rwp0), Byte 1:(Rwp7, Rwp6, Rwp5, Rwp4), etc... - - The WPResults array is constructed every housekeeping cycle and is not - effected by the reset counters (#LC_RESET_CC) ground command. It will only - get cleared if the Watchpoint Results Table is reset (via a new WDT table - load or with a #LC_RESET_WP_STATS_CC ground command) - - -

Actionpoint Questions

- - (Q) - Actionpoints evaluate to #LC_ACTION_PASS or #LC_ACTION_FAIL. - How should the RPN expression get constructed so it will evaluate - to the proper result? -

- Actionpoint RPN expressions are combinations of watchpoint states and - logical operators that evaluate to a boolean True or False. - - Just like a watchpoint evaluation of True indicates a parameter outside - acceptable limits, an AP expression that evaluates True is considered - to have Failed and will have it's ActionResult set to #LC_ACTION_FAIL. - - While the terminology may seem confusing, the key point is to construct - both watchpoint and actionpoint expressions to define the error condition - LC is looking for and NOT the normal condition of the spacecraft data - stream. - - For some examples, see the file lc_def_adt.c - - - (Q) - When would a actionpoint evalute to #LC_ACTION_NOT_MEASURED? -

- #LC_ACTION_NOT_MEASURED is an initialization value for the Actionpoint - Results Table. If an actionpoint has this ActionResult then one of - three possible conditions are true: - - 1) The actionpoint is unused (the DefaultState in the ADT is set to - #LC_ACTION_NOT_USED). - - 2) An actionpoint sample request (#LC_SAMPLE_AP_MID) targeting the AP has not - yet been recieved by LC so the AP has not yet been evaluated. - - 3) One or more of the watchpoints that this AP depends on (as defined by - the RPN expression) has a current WatchResult of #LC_WATCH_NOT_MEASURED - so the AP can't be evaluated. - - - (Q) - When would a actionpoint evalute to #LC_ACTION_ERROR? -

- #LC_ACTION_ERROR is a runtime error indicator for actionpoint processing. - Such a result should be rare since most of the causes are invalid actionpoint - parameters or improperly constructed RPN expressions that should be caught - during validation of the Actionpoint Definition Table. - - However, an exception is the case where one or more watchpoints that this - AP depends on (as defined by the RPN expression) has a current WatchResult of - #LC_WATCH_ERROR. Since the AP can't be evaluated, this will cause the ActionResult - to be set to #LC_ACTION_ERROR. - - In all cases, an error event detailing the cause of the problem will be - issued when an ActionResult is set to #LC_ACTION_ERROR. - - - (Q) - How does the Actionpoint state #LC_APSTATE_PERMOFF differ from - #LC_APSTATE_DISABLED? -

- The AP state #LC_APSTATE_PERMOFF is intended to provide a way to disable - an AP so it can not easily be turned back on by mistake. Such actionpoints - may not be needed after a seperation sequence or only apply to certain - mission phases. - - While the two states are treated the same way during actionpoint processing - (the AP isn't evaluated), there are a few differences. - - An AP can't be set to #LC_APSTATE_PERMOFF with the #LC_SET_AP_STATE_CC command, - it must be done with the #LC_SET_AP_PERMOFF_CC command. - - To set an AP to #LC_APSTATE_PERMOFF with the #LC_SET_AP_PERMOFF_CC command, the - current AP state must be #LC_APSTATE_DISABLED. - - The #LC_SET_AP_PERMOFF_CC command can only be issued for a single actionpoint, - #LC_ALL_ACTIONPOINTS is not valid as an argument for this command. - - Once an AP is set to #LC_APSTATE_PERMOFF, it can only be changed with a new ADT - table load. - - - (Q) - How is the APResults array in the housekeeping packet (#LC_HkPacket_t) - interpreted? -

- The APResults array is a byte array (aligned to the nearest longword - boundary) that contains a packed subset of the current contents of the - Actionpoint Results Table (see #LC_ARTEntry_t). - - It allocates 4 bits per actionpoint, with 2 bits representing the current - state, and 2 bits for the most recent evaluation result. - - The numerical 2 bit values for current state are defined using the - following constants: - - #LC_HKAR_STATE_NOT_USED, #LC_HKAR_STATE_ACTIVE, #LC_HKAR_STATE_PASSIVE, - #LC_HKAR_STATE_DISABLED - - An actionpoint whose current state is #LC_APSTATE_PERMOFF will have it's - state reported in the APResults as #LC_HKAR_STATE_NOT_USED. - - The numerical 2 bit values for evaluation results are defined using the - following constants: - - #LC_HKAR_PASS, #LC_HKAR_FAIL, #LC_HKAR_ERROR, #LC_HKAR_NOT_MEASURED - - Ordering (up to #LC_MAX_ACTIONPOINTS) is as follows : - - Byte 0:(Sap1, Rap1, Sap0, Rap0), Byte 1:(Sap3, Rap3, Sap2, Rap2), etc... - - The APResults array is constructed every housekeeping cycle and is not - effected by the reset counters (#LC_RESET_CC) ground command. It will only - get cleared if the Actionpoint Results Table is reset (via a new ADT table - load or with a #LC_RESET_AP_STATS_CC ground command) - - - (Q) - Will an RTS get requested more than once if an AP stays in the #LC_ACTION_FAIL - state? -

- No. Assuming the current state of an actionpoint is #LC_APSTATE_ACTIVE, then - when the actionpoint fails enough times to trigger an RTS, the state is set - to #LC_APSTATE_PASSIVE. - - In the passive state, the AP will continue to be sampled and statistics - updated, but no RTS requests will be initiated. - - - (Q) - Can we filter event messages per actionpoint? -

- Not in the current implementation. Transition event messages for actionpoints - are of type #CFE_EVS_DEBUG and enabling them will turn on events for all - actionpoint transitions. - - However, it is planned to add event message limits and event message counts - to the ADT and ART tables that would allow this type of filtering in a future - version of LC. - - -

General Questions

- - (Q) - When do results tables get cleared? -

- When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is - reset to initialization values. For each entry in the WRT, WatchResult is set to - #LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, - ActionResult is set to #LC_ACTION_NOT_MEASURED, the CurrentState is set to the - value of the actionpoint's DefaultState specified in the ADT, and all other values are - zeroed. - - These are also the values used (for the entries specified in the command) when the - #LC_RESET_AP_STATS_CC or #LC_RESET_WP_STATS_CC ground command is received. - - - (Q) - Where can I find some examples of watchpoint and actionpoint table definitions? -

- The files lc_def_wdt.c and lc_def_adt.c provide example source code files that can be - used to build LC tables and contain some sample table entries in the comment blocks. - - Since the CFS LC was based upon the LC implementation for LRO, LRO limit checker - tables may also provide guidance though there are some minor differences in syntax between - the two implementations. - - - (Q) - When using the CDS, what is restored and when will defaults be used? -

- When the platform configuration parameter LC_SAVE_TO_CDS is defined, LC will attempt to - use the critical data store (CDS) to save and restore data across application restarts. - The data that LC will save are: - - Watchpoint and Actionpoint Definition Tables - Watchpoint and Actionpoint Results Tables - LC Housekeeping Data - - While the definition tables only need to be updated in the CDS when new ones are loaded, - it is not practical from a performance standpoint to update the CDS every time the - housekeeping data or results data changes. For this reason, results tables and housekeeping - are only updated in the CDS if the application is shut down by cFE Executive Services and exits - cleanly. When the application starts, it will check a "saved on exit" flag in the data - restored from CDS to see if the data is good. If not, it will be reset to initialization - values. - - The detailed sequence for a CDS restore on application startup (with failure cases) is as - follows: - - 1) Try to restore Watchpoint Definition Table from CDS - If FAILS Load default Watchpoint Definition Table from filesystem - Load default Actionpoint Definition Table from filesystem - Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 2) If 1 succeeded, try to restore Actionpoint Definition Table from CDS - If FAILS Load default Watchpoint Definition Table from filesystem - Load default Actionpoint Definition Table from filesystem - Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 3) If 1 and 2 succeeded, try to restore Watchpoint Results Table from CDS - If FAILS Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 4) If 1 - 3 succeeded, try to restore Actionpoint Results Table from CDS - If FAILS Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 5) If 1 - 4 succeeded, try to restore Application data - (housekeeping variables) from CDS - If FAILS Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 6) If 1 - 5 succeeded, check "save on exit" flag in application data - restored in 5 - IF not set to "SAVED" (meaning we updated on exit) - Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - - Prev: \ref cfslccons +/** + \mainpage CFS Limit Checker (LC) User's Guide + + +**/ + +/** + \page cfslcrevhist CFS Limit Checker User's Guide Revision History + + \verbatim + $Log: cfs_lc.dox $ + Revision 1.1 2015/07/26 15:39:51EDT rperera + Initial revision + Member added to project /CFS-APPs-PROJECT/lcx/docs/dox_src/detailed_design/project.pj + Revision 1.1 2012/07/31 16:53:25EDT nschweis + Initial revision + Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/dox_src/detailed_design/project.pj + Revision 1.4 2009/04/18 14:50:44EDT dkobe + Cleaned up comments for users guide generation + Revision 1.4 2009/04/18 13:49:37EDT dkobe + Corrected image links + Revision 1.3 2009/04/18 13:30:21EDT dkobe + Standardized some content + \endverbatim + +**/ +/** + \page cfslcintro CFS Limit Checker Introduction + +

Scope

+ + This document provides a complete specification for the commands and telemetry associated + with the CFS Limit Checker (LC) application software. The document is intended primarily + for users of the software (operations personal, test engineers, and maintenance personnel). + The last section of the document, the deployment guide section, is intended for mission + developers when deploying and configuring the FM application software for a mission + flight software build environment. + +

Applicable Documents

+ + + + + + + + + + +
Document ID Document Title
TBD CFS Limit Checker Application Requirements Document
TBD CFS Limit Checker Heritage Analysis Document
TBD CFS Limit Checker Design Document
+ + +

Acronyms

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Acronym Description
API Application Programming Interface
ATP Absolute Time Processor
ATS Absolute Time tagged command Sequence
CCSDS Consultative Committee for Space Data Systems
C&DH Command and Data Handling
CFE Core Flight Executive
CFS Core Flight System
CI Command Ingest
Cmd Command
CPU Central Processing Unit
EDAC Error Detection and Correction
FDS Flight Data System
FM File Manager
FSW Flight Software
GN&C Guidance Navigation & Control
GSFC Goddard Space Flight Center
HK Housekeeping
HW, H/W Hardware
ICD Interface Control Document
ISR Interrupt Service Routine
LC CFS Limit Checker
OS Operating System
OSAL Operating System Abstraction Layer
Pkts Packets
RAM Random-Access Memory
RTOS Real Time Operating System
RTP Relative Time Processor
RTS Relative Time tagged command Sequence
SB Software Bus Service
SBC Single Board Computer
SC Stored Commands task
SW, S/W Software
TBD To Be Determined
TBL Table
TDM Time Data Multiplex
TLM Telemetry
UTC Universal time code
+ + Prev: \ref cfslcrevhist
+ Next: \ref cfslcovr +**/ + +/** + \page cfslcovr CFS Limit Checker Overview + + The CFS Limit Checker (LC) application monitors telemetry data points in the flight system + and compares the values against predefined threshold limits. When a threshold condition + is encountered, an event message is issued and a Relative Time Sequence (RTS) command + script may be initiated to respond to the threshold violation. + + LC is a table driven application. Monitoring and response configuration data is stored in + definition tables that can be updated by the ground operators, while statistics on threshold + violations are stored in dump-only results tables and summarized in housekeeping data. + + When processing beyond the standard comparison operators is needed, LC supports the use of + custom evaluation functions that can be modified by a software patch or application update. + + \section LC Design Overview + + The LC design is built around two fundamental constructs. The Watchpoint and the + Actionpoint. + + A Watchpoint defines a comparison between a piece of telemetry data and a pre-defined + constant. Watchpoints are defined in the Watchpoint Definition Table (WDT). Statistics + on watchpoint evaluations are stored in the Watchpoint Results Table (WRT) + (see \ref cfslctbl). Watchpoints are evaluated whenever a message containing the + telemetry point is received over the software bus by LC. + + An Actionpoint defines the response LC will take based upon the current state of one + or more watchpoints. Actionpoints are defined in the Actionpoint Definition Table (ADT). + Statistics on actionpoint evaluations are stored in the Actionpoint Results Table (ART) + (see \ref cfslctbl). Actionpoints are evaluated whenever LC receives a message with + the #LC_SAMPLE_AP_MID message ID. This is not a ground command but an internal message + that will normally come from the CFS scheduler (SCH) application. + + \image html LC_Context.png "LC Context Diagram"
+ + Next: \ref cfslcopr +**/ + +/** + \page cfslcopr CFS Limit Checker Operation + + The CFS Limit Checker has three modes of operation, set by the #LC_SET_LC_STATE_CC ground + command and echoed in the CurrentLCState housekeeping variable. + + Active - Active mode is the normal operation mode. In Active mode, the LC task performs + all limit tests defined in the watchpoint definition table and will invoke stored + command sequences if the results of watchpoint evaluations trigger an actionpoint + condition as defined in the actionpoint definition table. + + Passive - In Passive mode, the LC task behaves just like in Active mode except no stored + command sequences will be invoked as a result of actionpoint triggers. + + Disabled - When disabled, the LC task will perform no watchpoint or actionpoint limit + tests. + + Watchpoints are evaluated whenever a message containing the telemetry point is received + by LC. Watchpoints may evaluate to #LC_WATCH_TRUE, #LC_WATCH_FALSE, #LC_WATCH_NOT_MEASURED + or #LC_WATCH_ERROR. Watchpoints can not be individually disabled. The only ways to keep + Watchpoints from being evaluated are to squelch the telemetry packet on which they trigger, + load a WDT that undefines a Watchpoint or disable the entire LC task. + + Actionpoints are evaluated whenever LC receives a message with the #LC_SAMPLE_AP_MID message + ID. An Actionpoint defines a logical relationship between one or more Watchpoint results. + This logical relationship is defined in the form of a Reverse Polish Notation (RPN) + expression in the actionpoint definition specified in the ADT. The result of this RPN + evaluation is either #LC_ACTION_PASS, #LC_ACTION_FAIL, #LC_ACTION_NOT_MEASURED or + #LC_ACTION_ERROR. In the Actionpoint definition, a maximum number of consecutive fails is + specified. If an Actionpoint fails the specified number of times consecutively, LC sends a + request to the Stored Command (SC) application to execute a RTS (Relative Time Sequence) of + commands as a response to this condition. + + Actionpoints can be individually enabled/disabled with the #LC_SET_AP_STATE_CC ground + command. The state of an actionpoint may be set to #LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, + or #LC_APSTATE_DISABLED. These states operate in the same way as the application operating + modes described above. #LC_APSTATE_PASSIVE will just disable RTS requests, while + #LC_APSTATE_DISABLED will stop evaluation of the actionpoint all together. An additional + state #LC_APSTATE_PERMOFF which functions the same as #LC_APSTATE_DISABLED but can only + be changed via table load, can be set using the #LC_SET_AP_PERMOFF_CC ground command + (see \ref cfslcfaqs). + + An example of this watchpoint/actionpoint relationship is shown in the following + diagram: + \image html LC_Monitor_Process.png "LC Monitoring Process Example Diagram"
+ + Since LC is a table driven application, it's behavior is dictated by the contents of the + WDT and ADT configuration tables. To change this behavior is simply a matter of loading a + new table with modified parameters. LC will check for any pending table updates whenever + it processes a housekeeping request. If the table passes validation it will go into + effect right away before the next message is read from the software bus. It is not necessary + to disable LC before updating a table, however since the watchpoint and actionpoint definitions + use two separate tables, careful attention needs to be paid to ensure that the tables are + consistent with each other whenever LC is active. For this reason, a mission may choose to + always disable LC prior to any table updates and then re-enable monitoring. + + When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is + reset to initialization values. + + Ideally, LC should require no intervention from the ground on a routine basis. Once monitoring + is enabled, it will keep processing data and checking for threshold violations (assuming regular + scheduler input). + + Next: \ref cfslcreq
+ Prev: \ref cfslcovr +**/ + +/** + \page cfslcreq CFS Limit Checker Requirements + + The following are LC subsystem requirements. Detailed requirements are kept under MKS + version control and can be obtained by contacting CFS project management. + + CFS-500: The CFS shall provide for on-board monitoring of telemetry points. + + CFS-501: The CFS shall have the capability to modify the selection and configuration of + monitored telemetry via ground command + + CFS-502: The selection of the monitored points shall be table driven and configurable + via ground uploads + + CFS-503: The CFS shall be able to execute autonomous recovery sequences upon detection + of threshold failures in monitored telemetry + + CFS-504: The contents of recovery sequences shall be configurable via ground uploads + + Next: \ref cfslcdg
+ Prev: \ref cfslcopr +**/ + +/** + \page cfslcdg CFS Limit Checker Deployment Guide + + The first step in deploying the LC application is to size and construct default WDT + and ADT tables. LC requires these default table images to be on the filesystem when + the application is started or it will fail to load. These files are required even + if using the Critical Data Store (CDS) since LC will fall back to these table images + if a table restore from CDS fails (which will happen during a power-on reset). Where LC + will look to find these files is dictated by the configuration parameters + #LC_WDT_FILENAME and #LC_ADT_FILENAME. + + The size of the WDT and ADT tables is dictated by the configuration parameters + #LC_MAX_WATCHPOINTS and #LC_MAX_ACTIONPOINTS. The total size of either table should + not exceed the cFE size limit for a single buffered table set by the + #CFE_TBL_MAX_SNGL_TABLE_SIZE parameter. When considering how many watchpoints and + actionpoints are needed, keep in mind the the entire WDT is sequentially searched + whenever a message that may contain watchpoints is received. Likewise the entire + ADT will be processed whenever a #LC_SAMPLE_AP_MID message is recieved. While it + is desirable to leave unused entries in both tables for later updates, large tables + will increase search time which may be undesirable depending on the telemetry and + actionpoint sample rates required. LC defines the performance ID #LC_WDT_SEARCH_PERF_ID + that can be used to monitor WDT search time. There is not currently a performance + ID for ADT processing since the actionpoint sample cycle is not dependent on telemetry + rates but set by the configuration of the scheduler (SCH) application. + + Example source code for these tables sized to the default number of watchpoints + and actionpoints are provided in the files lc_def_wdt.c and lc_def_adt.c. + + LC requires a message with the message ID #LC_SAMPLE_AP_MID to sample actionpoints. + The CFS scheduler application (SCH) needs to be configured to provide this trigger + message at the desired frequency for actionpoint processing to occur. + + The function #LC_ExecuteRTS in the file lc_custom.c needs to be reviewed for any + modifications that may be needed to properly initiate RTS responses to actionpoint + failures. This function uses a local declaration of an example stored commanding + (SC) message structure which was done to allow LC to be compiled independent + of any other external application's data structures. A mission may choose to remove + this and use a message structure declared outside LC instead. This also applies to the + #LC_RTS_REQ_MID and #LC_RTS_REQ_CC constants in lc_mission_cfg.h. + + If custom functions are to be used, the function #LC_CustomFunction in the file + lc_custom.c needs to modified appropriately (see \ref cfslcfaqs). + + In the lc_platform_cfg.h file, there are configuration parameters that control use + of the Critical Data Store (CDS) and the LC operation mode on application + initialization. The default case is not to use the CDS and to set the application + state to #LC_STATE_DISABLED. + + Next: \ref cfslccmds
+ Prev: \ref cfslcreq +**/ + +/** + \page cfslccmds CFS Limit Checker Commands + + + + + +
\ref cfslctlm \ref cfslctbl \ref cfslccfg
+ + The following is a list of commands that are processed by the CFS Limit Checker Application: +**/ + +/** + \page cfslctlm CFS Limit Checker Telemetry + + + + + +
\ref cfslccmds \ref cfslctbl \ref cfslccfg
+ + The following is a list of telemetry that is generated by the CFS Limit Checker Application: +**/ + +/** + \page cfslctbl CFS Limit Checker Table Definitions + + + + + +
\ref cfslccmds \ref cfslctlm \ref cfslccfg
+ +

+

Watchpoint Definition Table (WDT)

+ + The structure of a single watchpoint definition is defined by #LC_WDTEntry_t. The WDT is + an array of these entries sized by the configuration parameter #LC_MAX_WATCHPOINTS. + The zero based index into this table is used by LC as the Watchpoint ID. + + Brief description of WDT fields: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DataTypeWatchpoint Data Type. Enumerated type that must be one of the following:
#LC_WATCH_NOT_USED Used to mark unused entries
#LC_DATA_BYTE, #LC_DATA_UBYTE Signed or unsigned byte
#LC_DATA_WORD_BE, #LC_DATA_WORD_LE Signed word, big or little endian
#LC_DATA_UWORD_BE, #LC_DATA_UWORD_LE Unsigned word, big or little endian
#LC_DATA_DWORD_BE, #LC_DATA_DWORD_LE Signed double word, big or little endian
#LC_DATA_UDWORD_BE, #LC_DATA_UDWORD_LE Unsized double word, big or little endian
#LC_DATA_FLOAT_BE, #LC_DATA_FLOAT_BE 32 bit float, big or little endian
OperatorIDComparison type. Enumerated type that must be one of the following:
#LC_NO_OPER Can be used for unused entries (optional)
#LC_OPER_LT, #LC_OPER_LE Less Than, Less Than or Equal
#LC_OPER_NE, #LC_OPER_EQ Not Equal, Equal
#LC_OPER_GT, #LC_OPER_GE Greater Than, Greater Than or Equal
#LC_OPER_CUSTOM No compare, call custom function
MessageIDMessage ID for the message containing the watchpoint
WatchpointOffsetZero based byte offset from the beginning of the message + (including any headers) to the first byte of the + watchpoint data
BitMaskValue to be masked with watchpoint data prior to comparison. Use the + constant #LC_NO_BITMASK when no masking is desired
ComparisonValueValue watchpoint data is to be compared against. This field + uses the #LC_MultiType_t union to store different data types + in a fixed 32-bit field. See lc_def_wdt.c for examples of how + to set this value.
CustomFuncArgumentOptional 32 bit data to be passed to the custom function. + Can be used for any mission-defined purpose.
+ +

+

Actionpoint Definition Table (ADT)

+ + The structure of a single actionpoint definition is defined by #LC_ADTEntry_t. The ADT is + an array of these entries sized by the configuration parameter #LC_MAX_ACTIONPOINTS. + The zero based index into this table is used by LC as the Actionpoint ID. + + Brief description of ADT fields:
+ + + + + + + + + + + + + + + + + + + + + + +
DefaultStateDefault (initial) state for this AP. Enumerated type that must be one + of the following:
#LC_ACTION_NOT_USED Used to mark unused entries
#LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, #LC_APSTATE_DISABLED
RTSId RTS to request if this AP fails
MaxFailsBeforeRTS How may consecutive failures before an RTS request is sent
RPNEquation [#LC_MAX_RPN_EQU_SIZE] Reverse Polish Equation that specifies when this + actionpoint should fail. Combination of Watchpoint + IDs and the following enumerated RPN operators:
#LC_RPN_AND, #LC_RPN_OR, #LC_RPN_XOR, #LC_RPN_NOT, #LC_RPN_EQUAL
See lc_def_adt.c for examples of how to construct this expression
EventType Event type used for event message if AP fails. Enumerated type that must be + one of the following:
#CFE_EVS_INFORMATION, #CFE_EVS_DEBUG, #CFE_EVS_ERROR, #CFE_EVS_CRITICAL
EventID Event ID used for event message if AP fails
EventText[#LC_MAX_ACTION_TEXT] Text used for the event msg when this AP fails + LC appends the trailer text #LC_AP_EVENT_TAIL_STR to + this string when reporting actionpoint failures.
+ +

+

Watchpoint Results Table (WRT)

+ + The structure of a single watchpoint results table entry is defined by #LC_WRTEntry_t. + The WRT is an array of these entries sized by the configuration parameter + #LC_MAX_WATCHPOINTS. The index into this table is the same Watchpoint ID used for the + corresponding definition table entry. + + Brief description of WRT fields:
+ + + + + + + + + + + + + + + +
WatchResult Result for the last evaluation of this watchpoint. Enumerated type that + will be one of the following:
#LC_WATCH_TRUE, #LC_WATCH_FALSE, #LC_WATCH_NOT_MEASURED, #LC_WATCH_ERROR
EvaluationCount How many times this watchpoint has been evaluated
FalseToTrueCount How many times this watchpoint has transitioned from #LC_WATCH_FALSE + to #LC_WATCH_TRUE
ConsecutiveTrueCount Number of consecutive times this watchpoint has evaluated to + #LC_WATCH_TRUE
CumulativeTrueCount Total number of times this watchpoint has evaluated to + #LC_WATCH_TRUE
LastFalseToTrue Watchpoint value and timestamp at the last transition from + #LC_WATCH_FALSE (or #LC_WATCH_NOT_MEASURED) to #LC_WATCH_TRUE
LastTrueToFalse Watchpoint value and timestamp at the last transition from + #LC_WATCH_TRUE to #LC_WATCH_FALSE
+ + The timestamp used for the LastFalseToTrue and LastTrueToFalse fields is taken from the + header of the message that contained the watchpoint. If the message timestamp is zero, LC + will use the time returned by the #CFE_TIME_GetTime function instead. + +

+

Actionpoint Results Table (ART)

+ + The structure of a single actionpoint results table entry is defined by #LC_ARTEntry_t. + The ART is an array of these entries sized by the configuration parameter + #LC_MAX_ACTIONPOINTS. The index into this table is the same Actionpoint ID used for the + corresponding definition table entry. + + Brief description of ART fields:
+ + + + + + + + + + + + + + + + + +
ActionResult Result for the last sample of this actionpoint. Enumerated type that + will be one of the following:
#LC_ACTION_PASS, #LC_ACTION_FAIL, #LC_ACTION_NOT_MEASURED, + #LC_ACTION_ERROR
CurrentState Current state of this actionpoint. Enumerated type that + will be one of the following:
#LC_ACTION_NOT_USED, #LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, + #LC_APSTATE_DISABLED, #LC_APSTATE_PERMOFF
FailToPassCount How many times this actionpoint has transitioned from + #LC_ACTION_FAIL to #LC_ACTION_PASS
PassToFailCount How many times this actionpoint has transitioned from + #LC_ACTION_PASS to #LC_ACTION_FAIL
ConsecutiveFailCount Number of consecutive times this actionpoint has evaluated + #LC_ACTION_FAIL
CumulativeFailCount Total number of times this actionpoint has evaluated to + #LC_ACTION_FAIL
CumulativeRTSExecCount Total number of times an RTS request has been sent for + this actionpoint
+ +

+ + The entire WDT is searched anytime a message is received that may contain watchpoints. + For this reason, it is important that unused entries are properly marked by setting + the WDT parameter DataType to #LC_WATCH_NOT_USED. + + The entire ADT is processed anytime a sample request is received that specifies an + actionpoint equal to #LC_ALL_ACTIONPOINTS. For this reason, it is important that unused + entries are properly marked by setting the ADT parameter DefaultState to + #LC_ACTION_NOT_USED. + + When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is + reset to initialization values. For each entry in the WRT, WatchResult is set to + #LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, + ActionResult is set to #LC_ACTION_NOT_MEASURED, the CurrentState is set to the + value of the actionpoint's DefaultState specified in the ADT, and all other values are + zeroed. + + These are also the values used (for the entries specified in the command) when the + #LC_RESET_AP_STATS_CC or #LC_RESET_WP_STATS_CC ground command is received. +**/ + +/** + \page cfslccfg CFS Limit Checker Configuration Parameters + + + + + +
\ref cfslccmds \ref cfslctlm \ref cfslctbl
+ + The following are configuration parameters used to configure the CFS Limit Checker + Application either for each platform or for a mission as a whole. + +**/ + +/** + \page cfslccons CFS Limit Checker Operational Constraints + + The LC application requires default WDT and ADT table images to be on the filesystem + when the application is started or it will fail to load. These files are required even + if using the Critical Data Store (CDS) since LC will fall back to these table images + if a table restore from CDS fails (which will happen during a power-on reset). Where LC + will look to find these files is dictated by the configuration parameters + #LC_WDT_FILENAME and #LC_ADT_FILENAME. + + Potential causes for LC to terminate prematurely are an error return from the + software bus in the application main loop or error return from one of the cFE table + services functions when LC tries to do table management (check for updates, dump + requests etc.) during each housekeeping cycle. + + When using the Critical Data Store (CDS), the results tables and housekeeping data + will only be restored if the application was shut down through cFE Executive Services + and exited clean. If this is not the case, default values will be used + (see \ref cfslcfaqs). + + Ideally, LC should require no intervention from the ground on a routine basis. Once + monitoring is enabled, it will keep processing data and checking for threshold violations + (assuming regular scheduler input). + + Next: \ref cfslcfaqs
+ Prev: \ref cfslctbl +**/ + +/** + \page cfslcfaqs CFS Limit Checker Frequently Asked Questions + +

Watchpoint Questions

+ + (Q) + Watchpoints evaluate to #LC_WATCH_TRUE or #LC_WATCH_FALSE. When the + the watchpoint is defined which should be the error condition? +

+ Watchpoints evaluate to a boolean True or False. So if you setup a + comparison < 100 any watchpoint value 0 to 99 will evaluate #LC_WATCH_TRUE + and 100+ will be #LC_WATCH_FALSE. + + You want to construct the watchpoint cases so they evaluate True when you + are outside of the acceptable range for a telemetry point. That's why there + are cumulative and consecutive true counts in the watchpoint results + table, but no corresponding values for False. + + For some examples, see the file lc_def_wdt.c + + + (Q) + There is only a single comparison value for each watchpoint. + How can I have multiple thresholds for a single telemetry point? +

+ Create additional watchpoint definitions that reference the same telemetry + point but have different comparison values. The watchpoints will be evaluated + in the order they are listed in the WDT when the monitor point arrives. + + Having multiple watchpoints allows different Actionpoints to trigger on + each watchpoint state (or combination of states). + + + (Q) + How do I calculate the watchpoint offset? +

+ The offset is a zero based byte offset from the beginning of the message + (including any headers) to the first byte of the watchpoint data. So for + a cFE raw command using CCSDS, the offset has to account for the size of + the cFE command header (#CFE_SB_CMD_HDR_SIZE). + + + (Q) + When do I need to use the bitmask in a watchpoint definition? +

+ All watchpoints are sized to a 32 bit value when extracted from a message. + The specified bitmask value is then applied (as a bitwise AND operation) before + the comparison is made or the custom function is called. + + When the watchpoint data is sized, data types smaller than 32 bits are + properly sign or zero extended. For this reason, it is not necessary to + define a mask for UWORD, WORD or UBYTE, BYTE data types to compare properly. + Although it's not needed, a properly constructed bit mask will not cause + a problem for these evaluations either. + + When you really need to use a bitmask is when monitoring odd sized data + (such as a 24 bit sensor reading) or testing data to see if certain bits + have been set (or cleared). + + When no bitmask is needed, be sure to use the constant #LC_NO_BITMASK (or it's + equivalent value 0xFFFFFFFF) in your WDT tables. Since masking is a bitwise + AND, setting the bitmask to zero will have the effect of always clearing the + watchpoint data prior to comparison. + + + (Q) + Why do I need to specify the byte order (big or little endian) of the watchpoint + data type? +

+ One enhancement made to the CFS version of LC is that it will properly byte + swap watchpoint data prior to masking and comparison if the byte order of the + data is different than the order used by the processor running LC. This allows + LC to monitor telemetry data that might be constructed by instrument or other + subsystem processors that use a different byte order. + + LC determines it's byte order using the _STRUCT_HIGH_BIT_FIRST_ and + _STRUCT_LOW_BIT_FIRST_ compiler switches that are set in the cFE header + common_types.h according to the platform designated in the cFE platform + makefile. + + + (Q) + When would a watchpoint evalute to #LC_WATCH_NOT_MEASURED? +

+ #LC_WATCH_NOT_MEASURED is an initialization value for the Watchpoint + Results Table. If a watchpoint has this WatchResult then the watchpoint + is unused (the DataType in the WDT is set to #LC_WATCH_NOT_USED) or a + message that contains the watchpoint has not yet been recieved by LC and + evaluated. + + + (Q) + When would a watchpoint evalute to #LC_WATCH_ERROR? +

+ #LC_WATCH_ERROR is a runtime error indicator for watchpoint processing. + Such a result should be rare since most of the causes are invalid watchpoint + parameters that should be caught during validation of the Watchpoint + Definition Table. + + One notable exception is for floating point watchpoints when the message + data is detected to be a floating point NAN (Not-A-Number) that can't + be relationally compared to any value. + + In all cases, an error event detailing the cause of the problem will be + issued when a WatchResult is set to #LC_WATCH_ERROR. + + + (Q) + What is a custom function and how do I create one? +

+ A custom function is a way to do more complicated processing on a watchpoint + when the standard comparison operators are not adequate. + + When the OperatorID in a watchpoint definition is set to #LC_OPER_CUSTOM. + The function #LC_CustomFunction is called instead of LC doing a comparison. + #LC_CustomFunction will then return #LC_WATCH_TRUE or #LC_WATCH_FALSE that + will be used as the WatchResult. + + Although #LC_CustomFunction is the same entry point for all watchpoints with a + designated custom function operator, a mission can modify the function body + to switch on the watchpoint ID (or CustomFuncArgument specified in the + watchpoint definition) and branch to as many different sub-functions + as it needs for watchpoint specific processing. + + The #LC_CustomFunction stub is in the source file lc_custom.c + + + (Q) + How is the WPResults array in the housekeeping packet (#LC_HkPacket_t) + interpreted? +

+ The WPResults array is a byte array (aligned to the nearest longword + boundary) that contains a packed subset of the current contents of the + Watchpoint Results Table (see #LC_WRTEntry_t). + + It allocates 2 bits per watchpoint for the most recent watchpoint + comparison result. The numerical 2 bit values are defined using the + following constants: + + #LC_HKWR_FALSE, #LC_HKWR_TRUE, #LC_HKWR_ERROR, #LC_HKWR_NOT_MEASURED + + Ordering (up to #LC_MAX_WATCHPOINTS) is as follows : + + Byte 0:(Rwp3, Rwp2, Rwp1, Rwp0), Byte 1:(Rwp7, Rwp6, Rwp5, Rwp4), etc... + + The WPResults array is constructed every housekeeping cycle and is not + effected by the reset counters (#LC_RESET_CC) ground command. It will only + get cleared if the Watchpoint Results Table is reset (via a new WDT table + load or with a #LC_RESET_WP_STATS_CC ground command) + + +

Actionpoint Questions

+ + (Q) + Actionpoints evaluate to #LC_ACTION_PASS or #LC_ACTION_FAIL. + How should the RPN expression get constructed so it will evaluate + to the proper result? +

+ Actionpoint RPN expressions are combinations of watchpoint states and + logical operators that evaluate to a boolean True or False. + + Just like a watchpoint evaluation of True indicates a parameter outside + acceptable limits, an AP expression that evaluates True is considered + to have Failed and will have it's ActionResult set to #LC_ACTION_FAIL. + + While the terminology may seem confusing, the key point is to construct + both watchpoint and actionpoint expressions to define the error condition + LC is looking for and NOT the normal condition of the spacecraft data + stream. + + For some examples, see the file lc_def_adt.c + + + (Q) + When would a actionpoint evalute to #LC_ACTION_NOT_MEASURED? +

+ #LC_ACTION_NOT_MEASURED is an initialization value for the Actionpoint + Results Table. If an actionpoint has this ActionResult then one of + three possible conditions are true: + + 1) The actionpoint is unused (the DefaultState in the ADT is set to + #LC_ACTION_NOT_USED). + + 2) An actionpoint sample request (#LC_SAMPLE_AP_MID) targeting the AP has not + yet been recieved by LC so the AP has not yet been evaluated. + + 3) One or more of the watchpoints that this AP depends on (as defined by + the RPN expression) has a current WatchResult of #LC_WATCH_NOT_MEASURED + so the AP can't be evaluated. + + + (Q) + When would a actionpoint evalute to #LC_ACTION_ERROR? +

+ #LC_ACTION_ERROR is a runtime error indicator for actionpoint processing. + Such a result should be rare since most of the causes are invalid actionpoint + parameters or improperly constructed RPN expressions that should be caught + during validation of the Actionpoint Definition Table. + + However, an exception is the case where one or more watchpoints that this + AP depends on (as defined by the RPN expression) has a current WatchResult of + #LC_WATCH_ERROR. Since the AP can't be evaluated, this will cause the ActionResult + to be set to #LC_ACTION_ERROR. + + In all cases, an error event detailing the cause of the problem will be + issued when an ActionResult is set to #LC_ACTION_ERROR. + + + (Q) + How does the Actionpoint state #LC_APSTATE_PERMOFF differ from + #LC_APSTATE_DISABLED? +

+ The AP state #LC_APSTATE_PERMOFF is intended to provide a way to disable + an AP so it can not easily be turned back on by mistake. Such actionpoints + may not be needed after a seperation sequence or only apply to certain + mission phases. + + While the two states are treated the same way during actionpoint processing + (the AP isn't evaluated), there are a few differences. + + An AP can't be set to #LC_APSTATE_PERMOFF with the #LC_SET_AP_STATE_CC command, + it must be done with the #LC_SET_AP_PERMOFF_CC command. + + To set an AP to #LC_APSTATE_PERMOFF with the #LC_SET_AP_PERMOFF_CC command, the + current AP state must be #LC_APSTATE_DISABLED. + + The #LC_SET_AP_PERMOFF_CC command can only be issued for a single actionpoint, + #LC_ALL_ACTIONPOINTS is not valid as an argument for this command. + + Once an AP is set to #LC_APSTATE_PERMOFF, it can only be changed with a new ADT + table load. + + + (Q) + How is the APResults array in the housekeeping packet (#LC_HkPacket_t) + interpreted? +

+ The APResults array is a byte array (aligned to the nearest longword + boundary) that contains a packed subset of the current contents of the + Actionpoint Results Table (see #LC_ARTEntry_t). + + It allocates 4 bits per actionpoint, with 2 bits representing the current + state, and 2 bits for the most recent evaluation result. + + The numerical 2 bit values for current state are defined using the + following constants: + + #LC_HKAR_STATE_NOT_USED, #LC_HKAR_STATE_ACTIVE, #LC_HKAR_STATE_PASSIVE, + #LC_HKAR_STATE_DISABLED + + An actionpoint whose current state is #LC_APSTATE_PERMOFF will have it's + state reported in the APResults as #LC_HKAR_STATE_NOT_USED. + + The numerical 2 bit values for evaluation results are defined using the + following constants: + + #LC_HKAR_PASS, #LC_HKAR_FAIL, #LC_HKAR_ERROR, #LC_HKAR_NOT_MEASURED + + Ordering (up to #LC_MAX_ACTIONPOINTS) is as follows : + + Byte 0:(Sap1, Rap1, Sap0, Rap0), Byte 1:(Sap3, Rap3, Sap2, Rap2), etc... + + The APResults array is constructed every housekeeping cycle and is not + effected by the reset counters (#LC_RESET_CC) ground command. It will only + get cleared if the Actionpoint Results Table is reset (via a new ADT table + load or with a #LC_RESET_AP_STATS_CC ground command) + + + (Q) + Will an RTS get requested more than once if an AP stays in the #LC_ACTION_FAIL + state? +

+ No. Assuming the current state of an actionpoint is #LC_APSTATE_ACTIVE, then + when the actionpoint fails enough times to trigger an RTS, the state is set + to #LC_APSTATE_PASSIVE. + + In the passive state, the AP will continue to be sampled and statistics + updated, but no RTS requests will be initiated. + + + (Q) + Can we filter event messages per actionpoint? +

+ Not in the current implementation. Transition event messages for actionpoints + are of type #CFE_EVS_DEBUG and enabling them will turn on events for all + actionpoint transitions. + + However, it is planned to add event message limits and event message counts + to the ADT and ART tables that would allow this type of filtering in a future + version of LC. + + +

General Questions

+ + (Q) + When do results tables get cleared? +

+ When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is + reset to initialization values. For each entry in the WRT, WatchResult is set to + #LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, + ActionResult is set to #LC_ACTION_NOT_MEASURED, the CurrentState is set to the + value of the actionpoint's DefaultState specified in the ADT, and all other values are + zeroed. + + These are also the values used (for the entries specified in the command) when the + #LC_RESET_AP_STATS_CC or #LC_RESET_WP_STATS_CC ground command is received. + + + (Q) + Where can I find some examples of watchpoint and actionpoint table definitions? +

+ The files lc_def_wdt.c and lc_def_adt.c provide example source code files that can be + used to build LC tables and contain some sample table entries in the comment blocks. + + Since the CFS LC was based upon the LC implementation for LRO, LRO limit checker + tables may also provide guidance though there are some minor differences in syntax between + the two implementations. + + + (Q) + When using the CDS, what is restored and when will defaults be used? +

+ When the platform configuration parameter LC_SAVE_TO_CDS is defined, LC will attempt to + use the critical data store (CDS) to save and restore data across application restarts. + The data that LC will save are: + + Watchpoint and Actionpoint Definition Tables + Watchpoint and Actionpoint Results Tables + LC Housekeeping Data + + While the definition tables only need to be updated in the CDS when new ones are loaded, + it is not practical from a performance standpoint to update the CDS every time the + housekeeping data or results data changes. For this reason, results tables and housekeeping + are only updated in the CDS if the application is shut down by cFE Executive Services and exits + cleanly. When the application starts, it will check a "saved on exit" flag in the data + restored from CDS to see if the data is good. If not, it will be reset to initialization + values. + + The detailed sequence for a CDS restore on application startup (with failure cases) is as + follows: + + 1) Try to restore Watchpoint Definition Table from CDS + If FAILS Load default Watchpoint Definition Table from filesystem + Load default Actionpoint Definition Table from filesystem + Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 2) If 1 succeeded, try to restore Actionpoint Definition Table from CDS + If FAILS Load default Watchpoint Definition Table from filesystem + Load default Actionpoint Definition Table from filesystem + Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 3) If 1 and 2 succeeded, try to restore Watchpoint Results Table from CDS + If FAILS Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 4) If 1 - 3 succeeded, try to restore Actionpoint Results Table from CDS + If FAILS Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 5) If 1 - 4 succeeded, try to restore Application data + (housekeeping variables) from CDS + If FAILS Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 6) If 1 - 5 succeeded, check "save on exit" flag in application data + restored in 5 + IF not set to "SAVED" (meaning we updated on exit) + Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + + Prev: \ref cfslccons **/ \ No newline at end of file diff --git a/docs/dox_src/mnem_maps/cfs_lc_cmd_mnem_map b/docs/dox_src/mnem_maps/cfs_lc_cmd_mnem_map index f85c456..b9635f2 100644 --- a/docs/dox_src/mnem_maps/cfs_lc_cmd_mnem_map +++ b/docs/dox_src/mnem_maps/cfs_lc_cmd_mnem_map @@ -1,25 +1,25 @@ -#--------------------------------------------------------------------------- -# Each of the following assignment statements should have the documentation -# mnemonic on the left followed by the mission specific command mnemonic -# on the right of the equals operator. -# -# FORMATTING DETAILS TO REMEMBER! -# 1) ALIASES line MUST have "+=" as the operator -# 2) There CANNOT be spaces around the "=" operator on assignment statements -# 3) Each line, EXCEPT the last, MUST have the line continuation character "\" -# at the end -# 4) NO comments, such as these, can be interspersed within the assignment -# statements -# 5) If there are multiple mnemonics for a particular data point, they should -# be separated by the following ", \b \c " and enclosed in double quotes to -# maintain proper formatting in the documentation. For example: -# ES_RESET="$sc_$cpu_ES_ProcessorReset, \b \c $sc_$cpu_ES_PowerOnReset" -#--------------------------------------------------------------------------- -ALIASES += \ -LC_NOOP=$sc_$cpu_LC_NOOP \ -LC_RESETCTRS=$sc_$cpu_LC_ResetCtrs \ -LC_SETLCSTATE=$sc_$cpu_LC_SetLCState \ -LC_SETAPSTATE=$sc_$cpu_LC_SetAPState \ -LC_SETAPPERMOFF=$sc_$cpu_LC_SetAPPermOff \ -LC_RESETAPSTATS=$sc_$cpu_LC_ResetAPStats \ -LC_RESETWPSTATS=$sc_$cpu_LC_ResetWPStats +#--------------------------------------------------------------------------- +# Each of the following assignment statements should have the documentation +# mnemonic on the left followed by the mission specific command mnemonic +# on the right of the equals operator. +# +# FORMATTING DETAILS TO REMEMBER! +# 1) ALIASES line MUST have "+=" as the operator +# 2) There CANNOT be spaces around the "=" operator on assignment statements +# 3) Each line, EXCEPT the last, MUST have the line continuation character "\" +# at the end +# 4) NO comments, such as these, can be interspersed within the assignment +# statements +# 5) If there are multiple mnemonics for a particular data point, they should +# be separated by the following ", \b \c " and enclosed in double quotes to +# maintain proper formatting in the documentation. For example: +# ES_RESET="$sc_$cpu_ES_ProcessorReset, \b \c $sc_$cpu_ES_PowerOnReset" +#--------------------------------------------------------------------------- +ALIASES += \ +LC_NOOP=$sc_$cpu_LC_NOOP \ +LC_RESETCTRS=$sc_$cpu_LC_ResetCtrs \ +LC_SETLCSTATE=$sc_$cpu_LC_SetLCState \ +LC_SETAPSTATE=$sc_$cpu_LC_SetAPState \ +LC_SETAPPERMOFF=$sc_$cpu_LC_SetAPPermOff \ +LC_RESETAPSTATS=$sc_$cpu_LC_ResetAPStats \ +LC_RESETWPSTATS=$sc_$cpu_LC_ResetWPStats diff --git a/docs/dox_src/mnem_maps/cfs_lc_tlm_mnem_map b/docs/dox_src/mnem_maps/cfs_lc_tlm_mnem_map index f1231ff..9ed0adf 100644 --- a/docs/dox_src/mnem_maps/cfs_lc_tlm_mnem_map +++ b/docs/dox_src/mnem_maps/cfs_lc_tlm_mnem_map @@ -1,29 +1,29 @@ -#--------------------------------------------------------------------------- -# Each of the following assignment statements should have the documentation -# mnemonic on the left followed by the mission specific telemetry mnemonic -# on the right of the equals operator. -# -# FORMATTING DETAILS TO REMEMBER! -# 1) ALIASES line MUST have "+=" as the operator -# 2) There CANNOT be spaces around the "=" operator on assignment statements -# 3) Each line, EXCEPT the last, MUST have the line continuation character "\" -# at the end -# 4) NO comments, such as these, can be interspersed within the assignment -# statements -# 5) If there are multiple mnemonics for a particular data point, they should -# be separated by the following ", \b \c " and enclosed in double quotes to -# maintain proper formatting in the documentation. For example: -# ES_RESET="$sc_$cpu_ES_ProcessorReset, \b \c $sc_$cpu_ES_PowerOnReset" -#--------------------------------------------------------------------------- -ALIASES += \ -LC_CMDPC=$sc_$cpu_LC_CMDPC \ -LC_CMDEC=$sc_$cpu_LC_CMDEC \ -LC_APSAMPLECNT=$sc_$cpu_LC_APSampleCnt \ -LC_MONMSGCNT=$sc_$cpu_LC_MonMsgCnt \ -LC_RTSCNT=$sc_$cpu_LC_RTSCnt \ -LC_PASSRTSCNT=$sc_$cpu_LC_PassRTSCnt \ -LC_WPSINUSE=$sc_$cpu_LC_WPsInUse \ -LC_ACTIVEAPS=$sc_$cpu_LC_ActiveAPs \ -LC_CURLCSTATE=$sc_$cpu_LC_CurrentLCState \ -LC_WPRESULTS=$sc_$cpu_LC_WPResults \ -LC_APRESULTS=$sc_$cpu_LC_APResults +#--------------------------------------------------------------------------- +# Each of the following assignment statements should have the documentation +# mnemonic on the left followed by the mission specific telemetry mnemonic +# on the right of the equals operator. +# +# FORMATTING DETAILS TO REMEMBER! +# 1) ALIASES line MUST have "+=" as the operator +# 2) There CANNOT be spaces around the "=" operator on assignment statements +# 3) Each line, EXCEPT the last, MUST have the line continuation character "\" +# at the end +# 4) NO comments, such as these, can be interspersed within the assignment +# statements +# 5) If there are multiple mnemonics for a particular data point, they should +# be separated by the following ", \b \c " and enclosed in double quotes to +# maintain proper formatting in the documentation. For example: +# ES_RESET="$sc_$cpu_ES_ProcessorReset, \b \c $sc_$cpu_ES_PowerOnReset" +#--------------------------------------------------------------------------- +ALIASES += \ +LC_CMDPC=$sc_$cpu_LC_CMDPC \ +LC_CMDEC=$sc_$cpu_LC_CMDEC \ +LC_APSAMPLECNT=$sc_$cpu_LC_APSampleCnt \ +LC_MONMSGCNT=$sc_$cpu_LC_MonMsgCnt \ +LC_RTSCNT=$sc_$cpu_LC_RTSCnt \ +LC_PASSRTSCNT=$sc_$cpu_LC_PassRTSCnt \ +LC_WPSINUSE=$sc_$cpu_LC_WPsInUse \ +LC_ACTIVEAPS=$sc_$cpu_LC_ActiveAPs \ +LC_CURLCSTATE=$sc_$cpu_LC_CurrentLCState \ +LC_WPRESULTS=$sc_$cpu_LC_WPResults \ +LC_APRESULTS=$sc_$cpu_LC_APResults diff --git a/docs/dox_src/users_guide/cfs_lc.dox b/docs/dox_src/users_guide/cfs_lc.dox index cdc58ff..58cfc36 100644 --- a/docs/dox_src/users_guide/cfs_lc.dox +++ b/docs/dox_src/users_guide/cfs_lc.dox @@ -1,950 +1,957 @@ -/** - \mainpage CFS Limit Checker (LC) User's Guide - - -**/ - -/** - \page cfslcrevhist CFS Limit Checker User's Guide Revision History - - \verbatim - $Log: cfs_lc.dox $ - Revision 1.1 2012/07/31 16:53:28EDT nschweis - Initial revision - Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/dox_src/users_guide/project.pj - Revision 1.7 2011/07/27 14:15:15EDT wmoleski - Updated the Operation section to add more detail about actionpoint evaluation and added 2 new FAQs about - ActionPoints. - Revision 1.6 2010/03/08 08:28:12EST wmoleski - Updated the telemetry mnemonic mapping file and the User's Guide file. - Revision 1.5 2009/04/18 14:50:43EDT dkobe - Cleaned up comments for users guide generation - Revision 1.4 2009/04/18 13:49:37EDT dkobe - Corrected image links - Revision 1.3 2009/04/18 13:30:21EDT dkobe - Standardized some content - \endverbatim - - Next: \ref cfslcintro -**/ -/** - \page cfslcintro CFS Limit Checker Introduction - -

Scope

- - This document provides a complete specification for the commands and telemetry associated - with the CFS Limit Checker (LC) application software. The document is intended primarily - for users of the software (operations personal, test engineers, and maintenance personnel). - The last section of the document, the deployment guide section, is intended for mission - developers when deploying and configuring the FM application software for a mission - flight software build environment. - -

Applicable Documents

- - - - - - - - - - -
Document ID Document Title
582-2008-011 CFS Limit Checker Application Requirements Document
TBD CFS Limit Checker Heritage Analysis Document
TBD CFS Limit Checker Design Document
- - -

Acronyms

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Acronym Description
API Application Programming Interface
ATP Absolute Time Processor
ATS Absolute Time tagged command Sequence
CCSDS Consultative Committee for Space Data Systems
C&DH Command and Data Handling
CFE Core Flight Executive
CFS Core Flight System
CI Command Ingest
Cmd Command
CPU Central Processing Unit
EDAC Error Detection and Correction
FDS Flight Data System
FM File Manager
FSW Flight Software
GN&C Guidance Navigation & Control
GSFC Goddard Space Flight Center
HK Housekeeping
HW, H/W Hardware
ICD Interface Control Document
ISR Interrupt Service Routine
LC CFS Limit Checker
OS Operating System
OSAL Operating System Abstraction Layer
Pkts Packets
RAM Random-Access Memory
RTOS Real Time Operating System
RTP Relative Time Processor
RTS Relative Time tagged command Sequence
SB Software Bus Service
SBC Single Board Computer
SC Stored Commands task
SW, S/W Software
TBD To Be Determined
TBL Table
TDM Time Data Multiplex
TLM Telemetry
UTC Universal time code
- - Next: \ref cfslcovr
- Prev: \ref cfslcrevhist -**/ - -/** - \page cfslcovr CFS Limit Checker Overview - - The CFS Limit Checker (LC) application monitors telemetry data points in the flight system - and compares the values against predefined threshold limits. When a threshold condition - is encountered, an event message is issued and a Relative Time Sequence (RTS) command - script may be initiated to respond to the threshold violation. - - LC is a table driven application. Monitoring and response configuration data is stored in - definition tables that can be updated by the ground operators, while statistics on threshold - violations are stored in dump-only results tables and summarized in housekeeping data. - - When processing beyond the standard comparison operators is needed, LC supports the use of - custom evaluation functions that can be modified by a software patch or application update. - - \section LC Design Overview - - The LC design is built around two fundamental constructs. The Watchpoint and the - Actionpoint. - - A Watchpoint defines a comparison between a piece of telemetry data and a pre-defined - constant. Watchpoints are defined in the Watchpoint Definition Table (WDT). Statistics - on watchpoint evaluations are stored in the Watchpoint Results Table (WRT) - (see \ref cfslctbl). Watchpoints are evaluated whenever a message containing the - telemetry point is received over the software bus by LC. - - An Actionpoint defines the response LC will take based upon the current state of one - or more watchpoints. Actionpoints are defined in the Actionpoint Definition Table (ADT). - Statistics on actionpoint evaluations are stored in the Actionpoint Results Table (ART) - (see \ref cfslctbl). Actionpoints are evaluated whenever LC receives a message with - the #LC_SAMPLE_AP_MID message ID. This is not a ground command but an internal message - that will normally come from the CFS scheduler (SCH) application. - - \image html LC_Context.png "LC Context Diagram"
- - Next: \ref cfslcopr
- Prev: \ref cfslcintro -**/ - -/** - \page cfslcopr CFS Limit Checker Operation - - The CFS Limit Checker has three modes of operation, set by the #LC_SET_LC_STATE_CC ground - command and echoed in the CurrentLCState housekeeping variable. - - Active - Active mode is the normal operation mode. In Active mode, the LC task performs - all limit tests defined in the watchpoint definition table and will invoke stored - command sequences if the results of watchpoint evaluations trigger an actionpoint - condition as defined in the actionpoint definition table. - - Passive - In Passive mode, the LC task behaves just like in Active mode except no stored - command sequences will be invoked as a result of actionpoint triggers. - - Disabled - When disabled, the LC task will perform no watchpoint or actionpoint limit - tests. - - Watchpoints are evaluated whenever a message containing the telemetry point is received - by LC. Watchpoints may evaluate to #LC_WATCH_TRUE, #LC_WATCH_FALSE, #LC_WATCH_NOT_MEASURED - or #LC_WATCH_ERROR. Watchpoints can not be individually disabled. The only ways to keep - Watchpoints from being evaluated are to squelch the telemetry packet on which they trigger, - load a WDT that undefines a Watchpoint or disable the entire LC task. - - Actionpoints are evaluated whenever LC receives a message with the #LC_SAMPLE_AP_MID message - ID. This message contains a parameter indicating which actionpoint to evaluate. A single actionpoint can be specified by using the actionpoint ID (0 to #LC_MAX_ACTIONPOINTS). All actionpoints can be evaluated by specifying xFFFF as the parameter. There is no way to evaluate multiple actionpoints other than ALL within a single message. An Actionpoint defines a logical relationship between one or more Watchpoint results. - This logical relationship is defined in the form of a Reverse Polish Notation (RPN) - expression in the actionpoint definition specified in the ADT. The result of this RPN - evaluation is either #LC_ACTION_PASS, #LC_ACTION_FAIL, #LC_ACTION_NOT_MEASURED or - #LC_ACTION_ERROR. In the Actionpoint definition, a maximum number of consecutive fails is - specified. If an Actionpoint fails the specified number of times consecutively, LC sends a - request to the Stored Command (SC) application to execute a RTS (Relative Time Sequence) of - commands as a response to this condition. - - Actionpoints can be individually enabled/disabled with the #LC_SET_AP_STATE_CC ground - command. The state of an actionpoint may be set to #LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, - or #LC_APSTATE_DISABLED. These states operate in the same way as the application operating - modes described above. #LC_APSTATE_PASSIVE will just disable RTS requests, while - #LC_APSTATE_DISABLED will stop evaluation of the actionpoint all together. An additional - state #LC_APSTATE_PERMOFF which functions the same as #LC_APSTATE_DISABLED but can only - be changed via table load, can be set using the #LC_SET_AP_PERMOFF_CC ground command - (see \ref cfslcfaqs). - - An example of this watchpoint/actionpoint relationship is shown in the following - diagram: - \image html LC_Monitor_Process.png "LC Monitoring Process Example Diagram"
- - Since LC is a table driven application, it's behavior is dictated by the contents of the - WDT and ADT configuration tables. To change this behavior is simply a matter of loading a - new table with modified parameters. LC will check for any pending table updates whenever - it processes a housekeeping request. If the table passes validation it will go into - effect right away before the next message is read from the software bus. It is not necessary - to disable LC before updating a table, however since the watchpoint and actionpoint definitions - use two separate tables, careful attention needs to be paid to ensure that the tables are - consistent with each other whenever LC is active. For this reason, a mission may choose to - always disable LC prior to any table updates and then re-enable monitoring. - - When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is - reset to initialization values. - - Ideally, LC should require no intervention from the ground on a routine basis. Once monitoring - is enabled, it will keep processing data and checking for threshold violations (assuming regular - scheduler input). - - Next: \ref cfslcreq
- Prev: \ref cfslcovr -**/ - -/** - \page cfslcreq CFS Limit Checker Requirements - - For detailed LC requirements, please see the "Core Flight System (CFS) Limit - Checker Application Requirements" Document Number:582-2008-011 - - Next: \ref cfslcdg
- Prev: \ref cfslcopr -**/ - -/** - \page cfslcdg CFS Limit Checker Deployment Guide - - The first step in deploying the LC application is to size and construct default WDT - and ADT tables. LC requires these default table images to be on the filesystem when - the application is started or it will fail to load. These files are required even - if using the Critical Data Store (CDS) since LC will fall back to these table images - if a table restore from CDS fails (which will happen during a power-on reset). Where LC - will look to find these files is dictated by the configuration parameters - #LC_WDT_FILENAME and #LC_ADT_FILENAME. - - The size of the WDT and ADT tables is dictated by the configuration parameters - #LC_MAX_WATCHPOINTS and #LC_MAX_ACTIONPOINTS. The total size of either table should - not exceed the cFE size limit for a single buffered table set by the - #CFE_TBL_MAX_SNGL_TABLE_SIZE parameter. When considering how many watchpoints and - actionpoints are needed, keep in mind the the entire WDT is sequentially searched - whenever a message that may contain watchpoints is received. Likewise the entire - ADT will be processed whenever a #LC_SAMPLE_AP_MID message is recieved. While it - is desirable to leave unused entries in both tables for later updates, large tables - will increase search time which may be undesirable depending on the telemetry and - actionpoint sample rates required. LC defines the performance ID #LC_WDT_SEARCH_PERF_ID - that can be used to monitor WDT search time. There is not currently a performance - ID for ADT processing since the actionpoint sample cycle is not dependent on telemetry - rates but set by the configuration of the scheduler (SCH) application. - - Example source code for these tables sized to the default number of watchpoints - and actionpoints are provided in the files lc_def_wdt.c and lc_def_adt.c. - - LC requires a message with the message ID #LC_SAMPLE_AP_MID to sample actionpoints. - The CFS scheduler application (SCH) needs to be configured to provide this trigger - message at the desired frequency for actionpoint processing to occur. - - The function /LC_ExecuteRTS in the file lc_custom.c needs to be reviewed for any - modifications that may be needed to properly initiate RTS responses to actionpoint - failures. This function uses a local declaration of an example stored commanding - (SC) message structure which was done to allow LC to be compiled independent - of any other external application's data structures. A mission may choose to remove - this and use a message structure declared outside LC instead. This also applies to the - #LC_RTS_REQ_MID and #LC_RTS_REQ_CC constants in lc_mission_cfg.h. - - If custom functions are to be used, the function /LC_CustomFunction in the file - lc_custom.c needs to modified appropriately (see \ref cfslcfaqs). - - In the lc_platform_cfg.h file, there are configuration parameters that control use - of the Critical Data Store (CDS) and the LC operation mode on application - initialization. The default case is not to use the CDS and to set the application - state to #LC_STATE_DISABLED. - - Next: \ref cfslccmds
- Prev: \ref cfslcreq -**/ - -/** - \page cfslccmds CFS Limit Checker Commands - - Next: \ref cfslctlm
- Prev: \ref cfslcdg
- - - - - -
\ref cfslctlm \ref cfslctbl \ref cfslccfg
- - The following is a list of commands that are processed by the CFS Limit Checker Application: -**/ - -/** - \page cfslctlm CFS Limit Checker Telemetry - - Next: \ref cfslctbl
- Prev: \ref cfslccmds
- - - - - -
\ref cfslccmds \ref cfslctbl \ref cfslccfg
- - The following is a list of telemetry that is generated by the CFS Limit Checker Application: -**/ - -/** - \page cfslctbl CFS Limit Checker Table Definitions - - Next: \ref cfslccfg
- Prev: \ref cfslctlm
- - - - - -
\ref cfslccmds \ref cfslctlm \ref cfslccfg
- -

-

Watchpoint Definition Table (WDT)

- - The structure of a single watchpoint definition is defined by #LC_WDTEntry_t. The WDT is - an array of these entries sized by the configuration parameter #LC_MAX_WATCHPOINTS. - The zero based index into this table is used by LC as the Watchpoint ID. - - Brief description of WDT fields: - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DataTypeWatchpoint Data Type. Enumerated type that must be one of the following:
#LC_WATCH_NOT_USED Used to mark unused entries
#LC_DATA_BYTE, #LC_DATA_UBYTE Signed or unsigned byte
#LC_DATA_WORD_BE, #LC_DATA_WORD_LE Signed word, big or little endian
#LC_DATA_UWORD_BE, #LC_DATA_UWORD_LE Unsigned word, big or little endian
#LC_DATA_DWORD_BE, #LC_DATA_DWORD_LE Signed double word, big or little endian
#LC_DATA_UDWORD_BE, #LC_DATA_UDWORD_LE Unsized double word, big or little endian
#LC_DATA_FLOAT_BE, #LC_DATA_FLOAT_BE 32 bit float, big or little endian
OperatorIDComparison type. Enumerated type that must be one of the following:
#LC_NO_OPER Can be used for unused entries (optional)
#LC_OPER_LT, #LC_OPER_LE Less Than, Less Than or Equal
#LC_OPER_NE, #LC_OPER_EQ Not Equal, Equal
#LC_OPER_GT, #LC_OPER_GE Greater Than, Greater Than or Equal
#LC_OPER_CUSTOM No compare, call custom function
MessageIDMessage ID for the message containing the watchpoint
WatchpointOffsetZero based byte offset from the beginning of the message - (including any headers) to the first byte of the - watchpoint data
BitMaskValue to be masked with watchpoint data prior to comparison. Use the - constant #LC_NO_BITMASK when no masking is desired
ComparisonValueValue watchpoint data is to be compared against. This field - uses the #LC_MultiType_t union to store different data types - in a fixed 32-bit field. See lc_def_wdt.c for examples of how - to set this value.
CustomFuncArgumentOptional 32 bit data to be passed to the custom function. - Can be used for any mission-defined purpose.
- -

-

Actionpoint Definition Table (ADT)

- - The structure of a single actionpoint definition is defined by #LC_ADTEntry_t. The ADT is - an array of these entries sized by the configuration parameter #LC_MAX_ACTIONPOINTS. - The zero based index into this table is used by LC as the Actionpoint ID. - - Brief description of ADT fields:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DefaultStateDefault (initial) state for this AP. Enumerated type that must be one - of the following:
#LC_ACTION_NOT_USED Used to mark unused entries
#LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, #LC_APSTATE_DISABLED
MaxPassiveEvents How may events to issue before filtering occurs for an RTS not started because the AP is Passive
MaxPassFailEvents How may events to issue before filtering occurs for the AP result transition from pass to fail
MaxFailPassEvents How may events to issue before filtering occurs for the AP result transition from fail to pass
RTSId RTS to request if this AP fails
MaxFailsBeforeRTS How may consecutive failures before an RTS request is sent
RPNEquation [#LC_MAX_RPN_EQU_SIZE] Reverse Polish Equation that specifies when this - actionpoint should fail. Combination of Watchpoint - IDs and the following enumerated RPN operators:
#LC_RPN_AND, #LC_RPN_OR, #LC_RPN_XOR, #LC_RPN_NOT, #LC_RPN_EQUAL
See lc_def_adt.c for examples of how to construct this expression
EventType Event type used for event message if AP fails. Enumerated type that must be - one of the following:
#CFE_EVS_INFORMATION, #CFE_EVS_DEBUG, #CFE_EVS_ERROR, #CFE_EVS_CRITICAL
EventID Event ID used for event message if AP fails
EventText[#LC_MAX_ACTION_TEXT] Text used for the event msg when this AP fails - LC appends the trailer text /LC_AP_EVENT_TAIL_STR to - this string when reporting actionpoint failures.
- -

-

Watchpoint Results Table (WRT)

- - The structure of a single watchpoint results table entry is defined by #LC_WRTEntry_t. - The WRT is an array of these entries sized by the configuration parameter - #LC_MAX_WATCHPOINTS. The index into this table is the same Watchpoint ID used for the - corresponding definition table entry. - - Brief description of WRT fields:
- - - - - - - - - - - - - - - -
WatchResult Result for the last evaluation of this watchpoint. Enumerated type that - will be one of the following:
#LC_WATCH_TRUE, #LC_WATCH_FALSE, #LC_WATCH_NOT_MEASURED, #LC_WATCH_ERROR
EvaluationCount How many times this watchpoint has been evaluated
FalseToTrueCount How many times this watchpoint has transitioned from #LC_WATCH_FALSE - to #LC_WATCH_TRUE
ConsecutiveTrueCount Number of consecutive times this watchpoint has evaluated to - #LC_WATCH_TRUE
CumulativeTrueCount Total number of times this watchpoint has evaluated to - #LC_WATCH_TRUE
LastFalseToTrue Watchpoint value and timestamp at the last transition from - #LC_WATCH_FALSE (or #LC_WATCH_NOT_MEASURED) to #LC_WATCH_TRUE
LastTrueToFalse Watchpoint value and timestamp at the last transition from - #LC_WATCH_TRUE to #LC_WATCH_FALSE
- - The timestamp used for the LastFalseToTrue and LastTrueToFalse fields is taken from the - header of the message that contained the watchpoint. If the message timestamp is zero, LC - will use the time returned by the #CFE_TIME_GetTime function instead. - -

-

Actionpoint Results Table (ART)

- - The structure of a single actionpoint results table entry is defined by #LC_ARTEntry_t. - The ART is an array of these entries sized by the configuration parameter - #LC_MAX_ACTIONPOINTS. The index into this table is the same Actionpoint ID used for the - corresponding definition table entry. - - Brief description of ART fields:
- - - - - - - - - - - - - - - - - - - -
ActionResult Result for the last sample of this actionpoint. Enumerated type that - will be one of the following:
#LC_ACTION_PASS, #LC_ACTION_FAIL, #LC_ACTION_NOT_MEASURED, - #LC_ACTION_ERROR
CurrentState Current state of this actionpoint. Enumerated type that - will be one of the following:
#LC_ACTION_NOT_USED, #LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, - #LC_APSTATE_DISABLED, #LC_APSTATE_PERMOFF
PassiveAPCount How many times this actionpoint's RTS has not been invoked because the AP was passive.
FailToPassCount How many times this actionpoint has transitioned from - #LC_ACTION_FAIL to #LC_ACTION_PASS
PassToFailCount How many times this actionpoint has transitioned from - #LC_ACTION_PASS to #LC_ACTION_FAIL
ConsecutiveFailCount Number of consecutive times this actionpoint has evaluated - #LC_ACTION_FAIL
CumulativeFailCount Total number of times this actionpoint has evaluated to - #LC_ACTION_FAIL
CumulativeRTSExecCount Total number of times an RTS request has been sent for - this actionpoint
- -

- - The entire WDT is searched anytime a message is received that may contain watchpoints. - For this reason, it is important that unused entries are properly marked by setting - the WDT parameter DataType to #LC_WATCH_NOT_USED. - - The entire ADT is processed anytime a sample request is received that specifies an - actionpoint equal to #LC_ALL_ACTIONPOINTS. For this reason, it is important that unused - entries are properly marked by setting the ADT parameter DefaultState to - #LC_ACTION_NOT_USED. - - When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is - reset to initialization values. For each entry in the WRT, WatchResult is set to - #LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, - ActionResult is set to #LC_ACTION_NOT_MEASURED, the CurrentState is set to the - value of the actionpoint's DefaultState specified in the ADT, and all other values are - zeroed. - - These are also the values used (for the entries specified in the command) when the - #LC_RESET_AP_STATS_CC or #LC_RESET_WP_STATS_CC ground command is received. -**/ - -/** - \page cfslccfg CFS Limit Checker Configuration Parameters - - Next: \ref cfslccons
- Prev: \ref cfslctbl
- - - - - -
\ref cfslccmds \ref cfslctlm \ref cfslctbl
- - The following are configuration parameters used to configure the CFS Limit Checker - Application either for each platform or for a mission as a whole. - -**/ - -/** - \page cfslccons CFS Limit Checker Operational Constraints - - The LC application requires default WDT and ADT table images to be on the filesystem - when the application is started or it will fail to load. These files are required even - if using the Critical Data Store (CDS) since LC will fall back to these table images - if a table restore from CDS fails (which will happen during a power-on reset). Where LC - will look to find these files is dictated by the configuration parameters - #LC_WDT_FILENAME and #LC_ADT_FILENAME. - - Potential causes for LC to terminate prematurely are an error return from the - software bus in the application main loop or error return from one of the cFE table - services functions when LC tries to do table management (check for updates, dump - requests etc.) during each housekeeping cycle. - - When using the Critical Data Store (CDS), the results tables and housekeeping data - will only be restored if the application was shut down through cFE Executive Services - and exited clean. If this is not the case, default values will be used - (see \ref cfslcfaqs). - - Ideally, LC should require no intervention from the ground on a routine basis. Once - monitoring is enabled, it will keep processing data and checking for threshold violations - (assuming regular scheduler input). - - Next: \ref cfslcfaqs
- Prev: \ref cfslccfg -**/ - -/** - \page cfslcfaqs CFS Limit Checker Frequently Asked Questions - -

Watchpoint Questions

- - (Q) - Watchpoints evaluate to #LC_WATCH_TRUE or #LC_WATCH_FALSE. When the - the watchpoint is defined which should be the error condition? -

- Watchpoints evaluate to a boolean True or False. So if you setup a - comparison < 100 any watchpoint value 0 to 99 will evaluate #LC_WATCH_TRUE - and 100+ will be #LC_WATCH_FALSE. - - You want to construct the watchpoint cases so they evaluate True when you - are outside of the acceptable range for a telemetry point. That's why there - are cumulative and consecutive true counts in the watchpoint results - table, but no corresponding values for False. - - For some examples, see the file lc_def_wdt.c - - - (Q) - There is only a single comparison value for each watchpoint. - How can I have multiple thresholds for a single telemetry point? -

- Create additional watchpoint definitions that reference the same telemetry - point but have different comparison values. The watchpoints will be evaluated - in the order they are listed in the WDT when the monitor point arrives. - - Having multiple watchpoints allows different Actionpoints to trigger on - each watchpoint state (or combination of states). - - - (Q) - How do I calculate the watchpoint offset? -

- The offset is a zero based byte offset from the beginning of the message - (including any headers) to the first byte of the watchpoint data. So for - a cFE raw command using CCSDS, the offset has to account for the size of - the cFE command header (#CFE_SB_CMD_HDR_SIZE). - - - (Q) - When do I need to use the bitmask in a watchpoint definition? -

- All watchpoints are sized to a 32 bit value when extracted from a message. - The specified bitmask value is then applied (as a bitwise AND operation) before - the comparison is made or the custom function is called. - - When the watchpoint data is sized, data types smaller than 32 bits are - properly sign or zero extended. For this reason, it is not necessary to - define a mask for UWORD, WORD or UBYTE, BYTE data types to compare properly. - Although it's not needed, a properly constructed bit mask will not cause - a problem for these evaluations either. - - When you really need to use a bitmask is when monitoring odd sized data - (such as a 24 bit sensor reading) or testing data to see if certain bits - have been set (or cleared). - - When no bitmask is needed, be sure to use the constant #LC_NO_BITMASK (or it's - equivalent value 0xFFFFFFFF) in your WDT tables. Since masking is a bitwise - AND, setting the bitmask to zero will have the effect of always clearing the - watchpoint data prior to comparison. - - - (Q) - Why do I need to specify the byte order (big or little endian) of the watchpoint - data type? -

- One enhancement made to the CFS version of LC is that it will properly byte - swap watchpoint data prior to masking and comparison if the byte order of the - data is different than the order used by the processor running LC. This allows - LC to monitor telemetry data that might be constructed by instrument or other - subsystem processors that use a different byte order. - - LC determines it's byte order using the _STRUCT_HIGH_BIT_FIRST_ and - _STRUCT_LOW_BIT_FIRST_ compiler switches that are set in the cFE header - common_types.h according to the platform designated in the cFE platform - makefile. - - - (Q) - When would a watchpoint evalute to #LC_WATCH_NOT_MEASURED? -

- #LC_WATCH_NOT_MEASURED is an initialization value for the Watchpoint - Results Table. If a watchpoint has this WatchResult then the watchpoint - is unused (the DataType in the WDT is set to #LC_WATCH_NOT_USED) or a - message that contains the watchpoint has not yet been recieved by LC and - evaluated. - - - (Q) - When would a watchpoint evalute to #LC_WATCH_ERROR? -

- #LC_WATCH_ERROR is a runtime error indicator for watchpoint processing. - Such a result should be rare since most of the causes are invalid watchpoint - parameters that should be caught during validation of the Watchpoint - Definition Table. - - One notable exception is for floating point watchpoints when the message - data is detected to be a floating point NAN (Not-A-Number) that can't - be relationally compared to any value. - - In all cases, an error event detailing the cause of the problem will be - issued when a WatchResult is set to #LC_WATCH_ERROR. - - - (Q) - What is a custom function and how do I create one? -

- A custom function is a way to do more complicated processing on a watchpoint - when the standard comparison operators are not adequate. - - When the OperatorID in a watchpoint definition is set to #LC_OPER_CUSTOM. - The function /LC_CustomFunction is called instead of LC doing a comparison. - /LC_CustomFunction will then return #LC_WATCH_TRUE or #LC_WATCH_FALSE that - will be used as the WatchResult. - - Although /LC_CustomFunction is the same entry point for all watchpoints with a - designated custom function operator, a mission can modify the function body - to switch on the watchpoint ID (or CustomFuncArgument specified in the - watchpoint definition) and branch to as many different sub-functions - as it needs for watchpoint specific processing. - - The /LC_CustomFunction stub is in the source file lc_custom.c - - - (Q) - How is the WPResults array in the housekeeping packet (#LC_HkPacket_t) - interpreted? -

- The WPResults array is a byte array (aligned to the nearest longword - boundary) that contains a packed subset of the current contents of the - Watchpoint Results Table (see #LC_WRTEntry_t). - - It allocates 2 bits per watchpoint for the most recent watchpoint - comparison result. The numerical 2 bit values are defined using the - following constants: - - #LC_HKWR_FALSE, #LC_HKWR_TRUE, #LC_HKWR_ERROR, #LC_HKWR_NOT_MEASURED - - Ordering (up to #LC_MAX_WATCHPOINTS) is as follows : - - Byte 0:(Rwp3, Rwp2, Rwp1, Rwp0), Byte 1:(Rwp7, Rwp6, Rwp5, Rwp4), etc... - - The WPResults array is constructed every housekeeping cycle and is not - effected by the reset counters (#LC_RESET_CC) ground command. It will only - get cleared if the Watchpoint Results Table is reset (via a new WDT table - load or with a #LC_RESET_WP_STATS_CC ground command) - - -

Actionpoint Questions

- - (Q) - Actionpoints evaluate to #LC_ACTION_PASS or #LC_ACTION_FAIL. - How should the RPN expression get constructed so it will evaluate - to the proper result? -

- Actionpoint RPN expressions are combinations of watchpoint states and - logical operators that evaluate to a boolean True or False. - - Just like a watchpoint evaluation of True indicates a parameter outside - acceptable limits, an AP expression that evaluates True is considered - to have Failed and will have it's ActionResult set to #LC_ACTION_FAIL. - - While the terminology may seem confusing, the key point is to construct - both watchpoint and actionpoint expressions to define the error condition - LC is looking for and NOT the normal condition of the spacecraft data - stream. - - For some examples, see the file lc_def_adt.c - - - (Q) - When would a actionpoint evalute to #LC_ACTION_NOT_MEASURED? -

- #LC_ACTION_NOT_MEASURED is an initialization value for the Actionpoint - Results Table. If an actionpoint has this ActionResult then one of - three possible conditions are true: - - 1) The actionpoint is unused (the DefaultState in the ADT is set to - #LC_ACTION_NOT_USED). - - 2) An actionpoint sample request (#LC_SAMPLE_AP_MID) targeting the AP has not - yet been recieved by LC so the AP has not yet been evaluated. - - 3) One or more of the watchpoints that this AP depends on (as defined by - the RPN expression) has a current WatchResult of #LC_WATCH_NOT_MEASURED - so the AP can't be evaluated. - - - (Q) - When would a actionpoint evalute to #LC_ACTION_ERROR? -

- #LC_ACTION_ERROR is a runtime error indicator for actionpoint processing. - Such a result should be rare since most of the causes are invalid actionpoint - parameters or improperly constructed RPN expressions that should be caught - during validation of the Actionpoint Definition Table. - - However, an exception is the case where one or more watchpoints that this - AP depends on (as defined by the RPN expression) has a current WatchResult of - #LC_WATCH_ERROR. Since the AP can't be evaluated, this will cause the ActionResult - to be set to #LC_ACTION_ERROR. - - In all cases, an error event detailing the cause of the problem will be - issued when an ActionResult is set to #LC_ACTION_ERROR. - - - (Q) - How does the Actionpoint state #LC_APSTATE_PERMOFF differ from - #LC_APSTATE_DISABLED? -

- The AP state #LC_APSTATE_PERMOFF is intended to provide a way to disable - an AP so it can not easily be turned back on by mistake. Such actionpoints - may not be needed after a seperation sequence or only apply to certain - mission phases. - - While the two states are treated the same way during actionpoint processing - (the AP isn't evaluated), there are a few differences. - - An AP can't be set to #LC_APSTATE_PERMOFF with the #LC_SET_AP_STATE_CC command, - it must be done with the #LC_SET_AP_PERMOFF_CC command. - - To set an AP to #LC_APSTATE_PERMOFF with the #LC_SET_AP_PERMOFF_CC command, the - current AP state must be #LC_APSTATE_DISABLED. - - The #LC_SET_AP_PERMOFF_CC command can only be issued for a single actionpoint, - #LC_ALL_ACTIONPOINTS is not valid as an argument for this command. - - Once an AP is set to #LC_APSTATE_PERMOFF, it can only be changed with a new ADT - table load. - - - (Q) - How is the APResults array in the housekeeping packet (#LC_HkPacket_t) - interpreted? -

- The APResults array is a byte array (aligned to the nearest longword - boundary) that contains a packed subset of the current contents of the - Actionpoint Results Table (see #LC_ARTEntry_t). - - It allocates 4 bits per actionpoint, with 2 bits representing the current - state, and 2 bits for the most recent evaluation result. - - The numerical 2 bit values for current state are defined using the - following constants: - - #LC_HKAR_STATE_NOT_USED, #LC_HKAR_STATE_ACTIVE, #LC_HKAR_STATE_PASSIVE, - #LC_HKAR_STATE_DISABLED - - An actionpoint whose current state is #LC_APSTATE_PERMOFF will have it's - state reported in the APResults as #LC_HKAR_STATE_NOT_USED. - - The numerical 2 bit values for evaluation results are defined using the - following constants: - - #LC_HKAR_PASS, #LC_HKAR_FAIL, #LC_HKAR_ERROR, #LC_HKAR_NOT_MEASURED - - Ordering (up to #LC_MAX_ACTIONPOINTS) is as follows : - - Byte 0:(Sap1, Rap1, Sap0, Rap0), Byte 1:(Sap3, Rap3, Sap2, Rap2), etc... - - The APResults array is constructed every housekeeping cycle and is not - effected by the reset counters (#LC_RESET_CC) ground command. It will only - get cleared if the Actionpoint Results Table is reset (via a new ADT table - load or with a #LC_RESET_AP_STATS_CC ground command) - - - (Q) - Will an RTS get requested more than once if an AP stays in the #LC_ACTION_FAIL - state? -

- No. Assuming the current state of an actionpoint is #LC_APSTATE_ACTIVE, then - when the actionpoint fails enough times to trigger an RTS, the state is set - to #LC_APSTATE_PASSIVE. - - In the passive state, the AP will continue to be sampled and statistics - updated, but no RTS requests will be initiated. - - - (Q) - Can we filter event messages per actionpoint? -

- Not in the current implementation. Transition event messages for actionpoints - are of type #CFE_EVS_DEBUG and enabling them will turn on events for all - actionpoint transitions. - - However, it is planned to add event message limits and event message counts - to the ADT and ART tables that would allow this type of filtering in a future - version of LC. - - - (Q) - Can I send a single actionpoint evaluation message for multiple actionpoints (eg. 1,2,5,6,7)? -

- No. You can send individual messages for each action point or a single message to evaluate ALL (xFFFF) actionpoints. - - - (Q) - What if most of my actionpoints need to be evaluated at 1HZ but one needs to be evaluated at 10HZ. How would I setup the Scheduler table to do this? -

- In order to evaluate an actionpoint, an evaluation message must be placed in the scheduler table. Since the scheduler table is evaluated at 1HZ, the suggested way to accomplish this is to place 9 entries for the 10HZ actionpoint and a single entry to evaluate ALL actionpoints. Note that the ALL actionpoints message needs to be placed 100ms away from the other 9. - - -

General Questions

- - (Q) - When do results tables get cleared? -

- When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is - reset to initialization values. For each entry in the WRT, WatchResult is set to - #LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, - ActionResult is set to #LC_ACTION_NOT_MEASURED, the CurrentState is set to the - value of the actionpoint's DefaultState specified in the ADT, and all other values are - zeroed. - - These are also the values used (for the entries specified in the command) when the - #LC_RESET_AP_STATS_CC or #LC_RESET_WP_STATS_CC ground command is received. - - - (Q) - Where can I find some examples of watchpoint and actionpoint table definitions? -

- The files lc_def_wdt.c and lc_def_adt.c provide example source code files that can be - used to build LC tables and contain some sample table entries in the comment blocks. - - Since the CFS LC was based upon the LC implementation for LRO, LRO limit checker - tables may also provide guidance though there are some minor differences in syntax between - the two implementations. - - - (Q) - When using the CDS, what is restored and when will defaults be used? -

- When the platform configuration parameter LC_SAVE_TO_CDS is defined, LC will attempt to - use the critical data store (CDS) to save and restore data across application restarts. - The data that LC will save are: - - Watchpoint and Actionpoint Definition Tables - Watchpoint and Actionpoint Results Tables - LC Housekeeping Data - - While the definition tables only need to be updated in the CDS when new ones are loaded, - it is not practical from a performance standpoint to update the CDS every time the - housekeeping data or results data changes. For this reason, results tables and housekeeping - are only updated in the CDS if the application is shut down by cFE Executive Services and exits - cleanly. When the application starts, it will check a "saved on exit" flag in the data - restored from CDS to see if the data is good. If not, it will be reset to initialization - values. - - The detailed sequence for a CDS restore on application startup (with failure cases) is as - follows: - - 1) Try to restore Watchpoint Definition Table from CDS - If FAILS Load default Watchpoint Definition Table from filesystem - Load default Actionpoint Definition Table from filesystem - Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 2) If 1 succeeded, try to restore Actionpoint Definition Table from CDS - If FAILS Load default Watchpoint Definition Table from filesystem - Load default Actionpoint Definition Table from filesystem - Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 3) If 1 and 2 succeeded, try to restore Watchpoint Results Table from CDS - If FAILS Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 4) If 1 - 3 succeeded, try to restore Actionpoint Results Table from CDS - If FAILS Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 5) If 1 - 4 succeeded, try to restore Application data - (housekeeping variables) from CDS - If FAILS Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - 6) If 1 - 5 succeeded, check "save on exit" flag in application data - restored in 5 - IF not set to "SAVED" (meaning we updated on exit) - Clear Watchpoint Results Table to init values - Clear Actionpoint Results Table to init values - Clear Housekeeping variables to init values - - - Prev: \ref cfslccons -**/ +/** + \mainpage CFS Limit Checker (LC) User's Guide + + +**/ + +/** + \page cfslcrevhist CFS Limit Checker User's Guide Revision History + + \verbatim + $Log: cfs_lc.dox $ + Revision 1.1.2.1 2017/08/07 14:38:03EDT sstrege + + Revision 1.1 2015/07/26 15:40:18EDT rperera + Initial revision + Member added to project /CFS-APPs-PROJECT/lcx/docs/dox_src/users_guide/project.pj + Revision 1.1 2012/07/31 16:53:28EDT nschweis + Initial revision + Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/dox_src/users_guide/project.pj + Revision 1.7 2011/07/27 14:15:15EDT wmoleski + Updated the Operation section to add more detail about actionpoint evaluation and added 2 new FAQs about + ActionPoints. + Revision 1.6 2010/03/08 08:28:12EST wmoleski + Updated the telemetry mnemonic mapping file and the User's Guide file. + Revision 1.5 2009/04/18 14:50:43EDT dkobe + Cleaned up comments for users guide generation + Revision 1.4 2009/04/18 13:49:37EDT dkobe + Corrected image links + Revision 1.3 2009/04/18 13:30:21EDT dkobe + Standardized some content + \endverbatim + + Next: \ref cfslcintro +**/ +/** + \page cfslcintro CFS Limit Checker Introduction + +

Scope

+ + This document provides a complete specification for the commands and telemetry associated + with the CFS Limit Checker (LC) application software. The document is intended primarily + for users of the software (operations personal, test engineers, and maintenance personnel). + The last section of the document, the deployment guide section, is intended for mission + developers when deploying and configuring the LC application software for a mission + flight software build environment. + +

Applicable Documents

+ + + + + + + + + + + + +
Document ID Document Title
582-2008-011 CFS Limit Checker Application Requirements Document
TBD CFS Limit Checker Heritage Analysis Document
TBD CFS Limit Checker Design Document
582-2012-004 CFS Limit Checker Application User's Guide
+ + +

Acronyms

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Acronym Description
API Application Programming Interface
ATP Absolute Time Processor
ATS Absolute Time tagged command Sequence
CCSDS Consultative Committee for Space Data Systems
C&DH Command and Data Handling
CFE Core Flight Executive
CFS Core Flight System
CI Command Ingest
Cmd Command
CPU Central Processing Unit
EDAC Error Detection and Correction
FDS Flight Data System
FM File Manager
FSW Flight Software
GN&C Guidance Navigation & Control
GSFC Goddard Space Flight Center
HK Housekeeping
HW, H/W Hardware
ICD Interface Control Document
ISR Interrupt Service Routine
LC CFS Limit Checker
OS Operating System
OSAL Operating System Abstraction Layer
Pkts Packets
RAM Random-Access Memory
RTOS Real Time Operating System
RTP Relative Time Processor
RTS Relative Time tagged command Sequence
SB Software Bus Service
SBC Single Board Computer
SC Stored Commands task
SW, S/W Software
TBD To Be Determined
TBL Table
TDM Time Data Multiplex
TLM Telemetry
UTC Universal time code
+ + Next: \ref cfslcovr
+ Prev: \ref cfslcrevhist +**/ + +/** + \page cfslcovr CFS Limit Checker Overview + + The CFS Limit Checker (LC) application monitors telemetry data points in the flight system + and compares the values against predefined threshold limits. When a threshold condition + is encountered, an event message is issued and a Relative Time Sequence (RTS) command + script may be initiated to respond to the threshold violation. + + LC is a table driven application. Monitoring and response configuration data is stored in + definition tables that can be updated by the ground operators, while statistics on threshold + violations are stored in dump-only results tables and summarized in housekeeping data. + + When processing beyond the standard comparison operators is needed, LC supports the use of + custom evaluation functions that can be modified by a software patch or application update. + + \section LC Design Overview + + The LC design is built around two fundamental constructs. The Watchpoint and the + Actionpoint. + + A Watchpoint defines a comparison between a piece of telemetry data and a pre-defined + constant. Watchpoints are defined in the Watchpoint Definition Table (WDT). Statistics + on watchpoint evaluations are stored in the Watchpoint Results Table (WRT) + (see \ref cfslctbl). Watchpoints are evaluated whenever a message containing the + telemetry point is received over the software bus by LC. + + An Actionpoint defines the response LC will take based upon the current state of one + or more watchpoints. Actionpoints are defined in the Actionpoint Definition Table (ADT). + Statistics on actionpoint evaluations are stored in the Actionpoint Results Table (ART) + (see \ref cfslctbl). Actionpoints are evaluated whenever LC receives a message with + the #LC_SAMPLE_AP_MID message ID. This is not a ground command but an internal message + that will normally come from the CFS scheduler (SCH) application. + + \image html LC_Context.png "LC Context Diagram"
+ + Next: \ref cfslcopr
+ Prev: \ref cfslcintro +**/ + +/** + \page cfslcopr CFS Limit Checker Operation + + The CFS Limit Checker has three modes of operation, set by the #LC_SET_LC_STATE_CC ground + command and echoed in the CurrentLCState housekeeping variable. + + Active - Active mode is the normal operation mode. In Active mode, the LC task performs + all limit tests defined in the watchpoint definition table and will invoke stored + command sequences if the results of watchpoint evaluations trigger an actionpoint + condition as defined in the actionpoint definition table. + + Passive - In Passive mode, the LC task behaves just like in Active mode except no stored + command sequences will be invoked as a result of actionpoint triggers. + + Disabled - When disabled, the LC task will perform no watchpoint or actionpoint limit + tests. + + Watchpoints are evaluated whenever a message containing the telemetry point is received + by LC. Watchpoints may evaluate to #LC_WATCH_TRUE, #LC_WATCH_FALSE, #LC_WATCH_NOT_MEASURED + or #LC_WATCH_ERROR. Watchpoints can not be individually disabled. The only ways to keep + Watchpoints from being evaluated are to squelch the telemetry packet on which they trigger, + load a WDT that undefines a Watchpoint or disable the entire LC task. + + Actionpoints are evaluated whenever LC receives a message with the #LC_SAMPLE_AP_MID message + ID. This message contains a parameter indicating which actionpoint to evaluate. A single actionpoint can be specified by using the actionpoint ID (0 to #LC_MAX_ACTIONPOINTS). All actionpoints can be evaluated by specifying xFFFF as the parameter. There is no way to evaluate multiple actionpoints other than ALL within a single message. An Actionpoint defines a logical relationship between one or more Watchpoint results. + This logical relationship is defined in the form of a Reverse Polish Notation (RPN) + expression in the actionpoint definition specified in the ADT. The result of this RPN + evaluation is either #LC_ACTION_PASS, #LC_ACTION_FAIL, #LC_ACTION_NOT_MEASURED or + #LC_ACTION_ERROR. In the Actionpoint definition, a maximum number of consecutive fails is + specified. If an Actionpoint fails the specified number of times consecutively, LC sends a + request to the Stored Command (SC) application to execute a RTS (Relative Time Sequence) of + commands as a response to this condition. + + Actionpoints can be individually enabled/disabled with the #LC_SET_AP_STATE_CC ground + command. The state of an actionpoint may be set to #LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, + or #LC_APSTATE_DISABLED. These states operate in the same way as the application operating + modes described above. #LC_APSTATE_PASSIVE will just disable RTS requests, while + #LC_APSTATE_DISABLED will stop evaluation of the actionpoint all together. An additional + state #LC_APSTATE_PERMOFF which functions the same as #LC_APSTATE_DISABLED but can only + be changed via table load, can be set using the #LC_SET_AP_PERMOFF_CC ground command + (see \ref cfslcfaqs). + + An example of this watchpoint/actionpoint relationship is shown in the following + diagram: + \image html LC_Monitor_Process.png "LC Monitoring Process Example Diagram"
+ + Since LC is a table driven application, it's behavior is dictated by the contents of the + WDT and ADT configuration tables. To change this behavior is simply a matter of loading a + new table with modified parameters. LC will check for any pending table updates whenever + it processes a housekeeping request. If the table passes validation it will go into + effect right away before the next message is read from the software bus. It is not necessary + to disable LC before updating a table, however since the watchpoint and actionpoint definitions + use two separate tables, careful attention needs to be paid to ensure that the tables are + consistent with each other whenever LC is active. For this reason, a mission may choose to + always disable LC prior to any table updates and then re-enable monitoring. + + When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is + reset to initialization values. + + Ideally, LC should require no intervention from the ground on a routine basis. Once monitoring + is enabled, it will keep processing data and checking for threshold violations (assuming regular + scheduler input). + + Next: \ref cfslcreq
+ Prev: \ref cfslcovr +**/ + +/** + \page cfslcreq CFS Limit Checker Requirements + + For detailed LC requirements, please see the "Core Flight System (CFS) Limit + Checker Application Requirements" Document Number:582-2008-011 + + Next: \ref cfslcdg
+ Prev: \ref cfslcopr +**/ + +/** + \page cfslcdg CFS Limit Checker Deployment Guide + + The first step in deploying the LC application is to size and construct default WDT + and ADT tables. LC requires these default table images to be on the filesystem when + the application is started or it will fail to load. These files are required even + if using the Critical Data Store (CDS) since LC will fall back to these table images + if a table restore from CDS fails (which will happen during a power-on reset). Where LC + will look to find these files is dictated by the configuration parameters + #LC_WDT_FILENAME and #LC_ADT_FILENAME. + + The size of the WDT and ADT tables is dictated by the configuration parameters + #LC_MAX_WATCHPOINTS and #LC_MAX_ACTIONPOINTS. The total size of either table should + not exceed the cFE size limit for a single buffered table set by the + #CFE_TBL_MAX_SNGL_TABLE_SIZE parameter. When considering how many watchpoints and + actionpoints are needed, keep in mind the the entire WDT is sequentially searched + whenever a message that may contain watchpoints is received. Likewise the entire + ADT will be processed whenever a #LC_SAMPLE_AP_MID message is recieved. While it + is desirable to leave unused entries in both tables for later updates, large tables + will increase search time which may be undesirable depending on the telemetry and + actionpoint sample rates required. LC defines the performance ID #LC_WDT_SEARCH_PERF_ID + that can be used to monitor WDT search time. There is not currently a performance + ID for ADT processing since the actionpoint sample cycle is not dependent on telemetry + rates but set by the configuration of the scheduler (SCH) application. + + Example source code for these tables sized to the default number of watchpoints + and actionpoints are provided in the files lc_def_wdt.c and lc_def_adt.c. + + LC requires a message with the message ID #LC_SAMPLE_AP_MID to sample actionpoints. + The CFS scheduler application (SCH) needs to be configured to provide this trigger + message at the desired frequency for actionpoint processing to occur. + + The function /LC_ExecuteRTS in the file lc_custom.c needs to be reviewed for any + modifications that may be needed to properly initiate RTS responses to actionpoint + failures. This function uses a local declaration of an example stored commanding + (SC) message structure which was done to allow LC to be compiled independent + of any other external application's data structures. A mission may choose to remove + this and use a message structure declared outside LC instead. This also applies to the + #LC_RTS_REQ_MID and #LC_RTS_REQ_CC constants in lc_mission_cfg.h. + + If custom functions are to be used, the function /LC_CustomFunction in the file + lc_custom.c needs to modified appropriately (see \ref cfslcfaqs). + + In the lc_platform_cfg.h file, there are configuration parameters that control use + of the Critical Data Store (CDS) and the LC operation mode on application + initialization. The default case is not to use the CDS and to set the application + state to #LC_STATE_DISABLED. + + Next: \ref cfslccmds
+ Prev: \ref cfslcreq +**/ + +/** + \page cfslccmds CFS Limit Checker Commands + + Next: \ref cfslctlm
+ Prev: \ref cfslcdg
+ + + + + +
\ref cfslctlm \ref cfslctbl \ref cfslccfg
+ + The following is a list of commands that are processed by the CFS Limit Checker Application: +**/ + +/** + \page cfslctlm CFS Limit Checker Telemetry + + Next: \ref cfslctbl
+ Prev: \ref cfslccmds
+ + + + + +
\ref cfslccmds \ref cfslctbl \ref cfslccfg
+ + The following is a list of telemetry that is generated by the CFS Limit Checker Application: +**/ + +/** + \page cfslctbl CFS Limit Checker Table Definitions + + Next: \ref cfslccfg
+ Prev: \ref cfslctlm
+ + + + + +
\ref cfslccmds \ref cfslctlm \ref cfslccfg
+ +

+

Watchpoint Definition Table (WDT)

+ + The structure of a single watchpoint definition is defined by #LC_WDTEntry_t. The WDT is + an array of these entries sized by the configuration parameter #LC_MAX_WATCHPOINTS. + The zero based index into this table is used by LC as the Watchpoint ID. + + Brief description of WDT fields: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DataTypeWatchpoint Data Type. Enumerated type that must be one of the following:
#LC_WATCH_NOT_USED Used to mark unused entries
#LC_DATA_BYTE, #LC_DATA_UBYTE Signed or unsigned byte
#LC_DATA_WORD_BE, #LC_DATA_WORD_LE Signed word, big or little endian
#LC_DATA_UWORD_BE, #LC_DATA_UWORD_LE Unsigned word, big or little endian
#LC_DATA_DWORD_BE, #LC_DATA_DWORD_LE Signed double word, big or little endian
#LC_DATA_UDWORD_BE, #LC_DATA_UDWORD_LE Unsized double word, big or little endian
#LC_DATA_FLOAT_BE, #LC_DATA_FLOAT_BE 32 bit float, big or little endian
OperatorIDComparison type. Enumerated type that must be one of the following:
#LC_NO_OPER Can be used for unused entries (optional)
#LC_OPER_LT, #LC_OPER_LE Less Than, Less Than or Equal
#LC_OPER_NE, #LC_OPER_EQ Not Equal, Equal
#LC_OPER_GT, #LC_OPER_GE Greater Than, Greater Than or Equal
#LC_OPER_CUSTOM No compare, call custom function
MessageIDMessage ID for the message containing the watchpoint
WatchpointOffsetZero based byte offset from the beginning of the message + (including any headers) to the first byte of the + watchpoint data
BitMaskValue to be masked with watchpoint data prior to comparison. Use the + constant #LC_NO_BITMASK when no masking is desired
ComparisonValueValue watchpoint data is to be compared against. This field + uses the #LC_MultiType_t union to store different data types + in a fixed 32-bit field. See lc_def_wdt.c for examples of how + to set this value.
CustomFuncArgumentOptional 32 bit data to be passed to the custom function. + Can be used for any mission-defined purpose.
+ +

+

Actionpoint Definition Table (ADT)

+ + The structure of a single actionpoint definition is defined by #LC_ADTEntry_t. The ADT is + an array of these entries sized by the configuration parameter #LC_MAX_ACTIONPOINTS. + The zero based index into this table is used by LC as the Actionpoint ID. + + Brief description of ADT fields:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DefaultStateDefault (initial) state for this AP. Enumerated type that must be one + of the following:
#LC_ACTION_NOT_USED Used to mark unused entries
#LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, #LC_APSTATE_DISABLED
MaxPassiveEvents How may events to issue before filtering occurs for an RTS not started because the AP is Passive
MaxPassFailEvents How may events to issue before filtering occurs for the AP result transition from pass to fail
MaxFailPassEvents How may events to issue before filtering occurs for the AP result transition from fail to pass
RTSId RTS to request if this AP fails
MaxFailsBeforeRTS How may consecutive failures before an RTS request is sent
RPNEquation [#LC_MAX_RPN_EQU_SIZE] Reverse Polish Equation that specifies when this + actionpoint should fail. Combination of Watchpoint + IDs and the following enumerated RPN operators:
#LC_RPN_AND, #LC_RPN_OR, #LC_RPN_XOR, #LC_RPN_NOT, #LC_RPN_EQUAL
See lc_def_adt.c for examples of how to construct this expression
EventType Event type used for event message if AP fails. Enumerated type that must be + one of the following:
#CFE_EVS_INFORMATION, #CFE_EVS_DEBUG, #CFE_EVS_ERROR, #CFE_EVS_CRITICAL
EventID Event ID used for event message if AP fails
EventText[#LC_MAX_ACTION_TEXT] Text used for the event msg when this AP fails + LC appends the trailer text /LC_AP_EVENT_TAIL_STR to + this string when reporting actionpoint failures.
+ +

+

Watchpoint Results Table (WRT)

+ + The structure of a single watchpoint results table entry is defined by #LC_WRTEntry_t. + The WRT is an array of these entries sized by the configuration parameter + #LC_MAX_WATCHPOINTS. The index into this table is the same Watchpoint ID used for the + corresponding definition table entry. + + Brief description of WRT fields:
+ + + + + + + + + + + + + + + +
WatchResult Result for the last evaluation of this watchpoint. Enumerated type that + will be one of the following:
#LC_WATCH_TRUE, #LC_WATCH_FALSE, #LC_WATCH_NOT_MEASURED, #LC_WATCH_ERROR
EvaluationCount How many times this watchpoint has been evaluated
FalseToTrueCount How many times this watchpoint has transitioned from #LC_WATCH_FALSE + to #LC_WATCH_TRUE
ConsecutiveTrueCount Number of consecutive times this watchpoint has evaluated to + #LC_WATCH_TRUE
CumulativeTrueCount Total number of times this watchpoint has evaluated to + #LC_WATCH_TRUE
LastFalseToTrue Watchpoint value and timestamp at the last transition from + #LC_WATCH_FALSE (or #LC_WATCH_NOT_MEASURED) to #LC_WATCH_TRUE
LastTrueToFalse Watchpoint value and timestamp at the last transition from + #LC_WATCH_TRUE to #LC_WATCH_FALSE
+ + The timestamp used for the LastFalseToTrue and LastTrueToFalse fields is taken from the + header of the message that contained the watchpoint. If the message timestamp is zero, LC + will use the time returned by the #CFE_TIME_GetTime function instead. + +

+

Actionpoint Results Table (ART)

+ + The structure of a single actionpoint results table entry is defined by #LC_ARTEntry_t. + The ART is an array of these entries sized by the configuration parameter + #LC_MAX_ACTIONPOINTS. The index into this table is the same Actionpoint ID used for the + corresponding definition table entry. + + Brief description of ART fields:
+ + + + + + + + + + + + + + + + + + + +
ActionResult Result for the last sample of this actionpoint. Enumerated type that + will be one of the following:
#LC_ACTION_PASS, #LC_ACTION_FAIL, #LC_ACTION_NOT_MEASURED, + #LC_ACTION_ERROR
CurrentState Current state of this actionpoint. Enumerated type that + will be one of the following:
#LC_ACTION_NOT_USED, #LC_APSTATE_ACTIVE, #LC_APSTATE_PASSIVE, + #LC_APSTATE_DISABLED, #LC_APSTATE_PERMOFF
PassiveAPCount How many times this actionpoint's RTS has not been invoked because the AP was passive.
FailToPassCount How many times this actionpoint has transitioned from + #LC_ACTION_FAIL to #LC_ACTION_PASS
PassToFailCount How many times this actionpoint has transitioned from + #LC_ACTION_PASS to #LC_ACTION_FAIL
ConsecutiveFailCount Number of consecutive times this actionpoint has evaluated + #LC_ACTION_FAIL
CumulativeFailCount Total number of times this actionpoint has evaluated to + #LC_ACTION_FAIL
CumulativeRTSExecCount Total number of times an RTS request has been sent for + this actionpoint
+ +

+ + The entire WDT is searched anytime a message is received that may contain watchpoints. + For this reason, it is important that unused entries are properly marked by setting + the WDT parameter DataType to #LC_WATCH_NOT_USED. + + The entire ADT is processed anytime a sample request is received that specifies an + actionpoint equal to #LC_ALL_ACTIONPOINTS. For this reason, it is important that unused + entries are properly marked by setting the ADT parameter DefaultState to + #LC_ACTION_NOT_USED. + + When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is + reset to initialization values. For each entry in the WRT, WatchResult is set to + #LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, + ActionResult is set to #LC_ACTION_NOT_MEASURED, the CurrentState is set to the + value of the actionpoint's DefaultState specified in the ADT, and all other values are + zeroed. + + These are also the values used (for the entries specified in the command) when the + #LC_RESET_AP_STATS_CC or #LC_RESET_WP_STATS_CC ground command is received. +**/ + +/** + \page cfslccfg CFS Limit Checker Configuration Parameters + + Next: \ref cfslccons
+ Prev: \ref cfslctbl
+ + + + + +
\ref cfslccmds \ref cfslctlm \ref cfslctbl
+ + The following are configuration parameters used to configure the CFS Limit Checker + Application either for each platform or for a mission as a whole. + +**/ + +/** + \page cfslccons CFS Limit Checker Operational Constraints + + The LC application requires default WDT and ADT table images to be on the filesystem + when the application is started or it will fail to load. These files are required even + if using the Critical Data Store (CDS) since LC will fall back to these table images + if a table restore from CDS fails (which will happen during a power-on reset). Where LC + will look to find these files is dictated by the configuration parameters + #LC_WDT_FILENAME and #LC_ADT_FILENAME. + + Potential causes for LC to terminate prematurely are an error return from the + software bus in the application main loop or error return from one of the cFE table + services functions when LC tries to do table management (check for updates, dump + requests etc.) during each housekeeping cycle. + + When using the Critical Data Store (CDS), the results tables and housekeeping data + will only be restored if the application was shut down through cFE Executive Services + and exited clean. If this is not the case, default values will be used + (see \ref cfslcfaqs). + + Ideally, LC should require no intervention from the ground on a routine basis. Once + monitoring is enabled, it will keep processing data and checking for threshold violations + (assuming regular scheduler input). + + Next: \ref cfslcfaqs
+ Prev: \ref cfslccfg +**/ + +/** + \page cfslcfaqs CFS Limit Checker Frequently Asked Questions + +

Watchpoint Questions

+ + (Q) + Watchpoints evaluate to #LC_WATCH_TRUE or #LC_WATCH_FALSE. When the + the watchpoint is defined which should be the error condition? +

+ Watchpoints evaluate to a boolean True or False. So if you setup a + comparison < 100 any watchpoint value 0 to 99 will evaluate #LC_WATCH_TRUE + and 100+ will be #LC_WATCH_FALSE. + + You want to construct the watchpoint cases so they evaluate True when you + are outside of the acceptable range for a telemetry point. That's why there + are cumulative and consecutive true counts in the watchpoint results + table, but no corresponding values for False. + + For some examples, see the file lc_def_wdt.c + + + (Q) + There is only a single comparison value for each watchpoint. + How can I have multiple thresholds for a single telemetry point? +

+ Create additional watchpoint definitions that reference the same telemetry + point but have different comparison values. The watchpoints will be evaluated + in the order they are listed in the WDT when the monitor point arrives. + + Having multiple watchpoints allows different Actionpoints to trigger on + each watchpoint state (or combination of states). + + + (Q) + How do I calculate the watchpoint offset? +

+ The offset is a zero based byte offset from the beginning of the message + (including any headers) to the first byte of the watchpoint data. So for + a cFE raw command using CCSDS, the offset has to account for the size of + the cFE command header (#CFE_SB_CMD_HDR_SIZE). + + + (Q) + When do I need to use the bitmask in a watchpoint definition? +

+ All watchpoints are sized to a 32 bit value when extracted from a message. + The specified bitmask value is then applied (as a bitwise AND operation) before + the comparison is made or the custom function is called. + + When the watchpoint data is sized, data types smaller than 32 bits are + properly sign or zero extended. For this reason, it is not necessary to + define a mask for UWORD, WORD or UBYTE, BYTE data types to compare properly. + Although it's not needed, a properly constructed bit mask will not cause + a problem for these evaluations either. + + When you really need to use a bitmask is when monitoring odd sized data + (such as a 24 bit sensor reading) or testing data to see if certain bits + have been set (or cleared). + + When no bitmask is needed, be sure to use the constant #LC_NO_BITMASK (or it's + equivalent value 0xFFFFFFFF) in your WDT tables. Since masking is a bitwise + AND, setting the bitmask to zero will have the effect of always clearing the + watchpoint data prior to comparison. + + + (Q) + Why do I need to specify the byte order (big or little endian) of the watchpoint + data type? +

+ One enhancement made to the CFS version of LC is that it will properly byte + swap watchpoint data prior to masking and comparison if the byte order of the + data is different than the order used by the processor running LC. This allows + LC to monitor telemetry data that might be constructed by instrument or other + subsystem processors that use a different byte order. + + LC determines it's byte order using the _STRUCT_HIGH_BIT_FIRST_ and + _STRUCT_LOW_BIT_FIRST_ compiler switches that are set in the cFE header + common_types.h according to the platform designated in the cFE platform + makefile. + + + (Q) + When would a watchpoint evalute to #LC_WATCH_NOT_MEASURED? +

+ #LC_WATCH_NOT_MEASURED is an initialization value for the Watchpoint + Results Table. If a watchpoint has this WatchResult then the watchpoint + is unused (the DataType in the WDT is set to #LC_WATCH_NOT_USED) or a + message that contains the watchpoint has not yet been recieved by LC and + evaluated. + + + (Q) + When would a watchpoint evalute to #LC_WATCH_ERROR? +

+ #LC_WATCH_ERROR is a runtime error indicator for watchpoint processing. + Such a result should be rare since most of the causes are invalid watchpoint + parameters that should be caught during validation of the Watchpoint + Definition Table. + + One notable exception is for floating point watchpoints when the message + data is detected to be a floating point NAN (Not-A-Number) that can't + be relationally compared to any value. + + In all cases, an error event detailing the cause of the problem will be + issued when a WatchResult is set to #LC_WATCH_ERROR. + + + (Q) + What is a custom function and how do I create one? +

+ A custom function is a way to do more complicated processing on a watchpoint + when the standard comparison operators are not adequate. + + When the OperatorID in a watchpoint definition is set to #LC_OPER_CUSTOM. + The function /LC_CustomFunction is called instead of LC doing a comparison. + /LC_CustomFunction will then return #LC_WATCH_TRUE or #LC_WATCH_FALSE that + will be used as the WatchResult. + + Although /LC_CustomFunction is the same entry point for all watchpoints with a + designated custom function operator, a mission can modify the function body + to switch on the watchpoint ID (or CustomFuncArgument specified in the + watchpoint definition) and branch to as many different sub-functions + as it needs for watchpoint specific processing. + + The /LC_CustomFunction stub is in the source file lc_custom.c + + + (Q) + How is the WPResults array in the housekeeping packet (#LC_HkPacket_t) + interpreted? +

+ The WPResults array is a byte array (aligned to the nearest longword + boundary) that contains a packed subset of the current contents of the + Watchpoint Results Table (see #LC_WRTEntry_t). + + It allocates 2 bits per watchpoint for the most recent watchpoint + comparison result. The numerical 2 bit values are defined using the + following constants: + + #LC_HKWR_FALSE, #LC_HKWR_TRUE, #LC_HKWR_ERROR, #LC_HKWR_NOT_MEASURED + + Ordering (up to #LC_MAX_WATCHPOINTS) is as follows : + + Byte 0:(Rwp3, Rwp2, Rwp1, Rwp0), Byte 1:(Rwp7, Rwp6, Rwp5, Rwp4), etc... + + The WPResults array is constructed every housekeeping cycle and is not + effected by the reset counters (#LC_RESET_CC) ground command. It will only + get cleared if the Watchpoint Results Table is reset (via a new WDT table + load or with a #LC_RESET_WP_STATS_CC ground command) + + +

Actionpoint Questions

+ + (Q) + Actionpoints evaluate to #LC_ACTION_PASS or #LC_ACTION_FAIL. + How should the RPN expression get constructed so it will evaluate + to the proper result? +

+ Actionpoint RPN expressions are combinations of watchpoint states and + logical operators that evaluate to a boolean True or False. + + Just like a watchpoint evaluation of True indicates a parameter outside + acceptable limits, an AP expression that evaluates True is considered + to have Failed and will have it's ActionResult set to #LC_ACTION_FAIL. + + While the terminology may seem confusing, the key point is to construct + both watchpoint and actionpoint expressions to define the error condition + LC is looking for and NOT the normal condition of the spacecraft data + stream. + + For some examples, see the file lc_def_adt.c + + + (Q) + When would a actionpoint evalute to #LC_ACTION_NOT_MEASURED? +

+ #LC_ACTION_NOT_MEASURED is an initialization value for the Actionpoint + Results Table. If an actionpoint has this ActionResult then one of + three possible conditions are true: + + 1) The actionpoint is unused (the DefaultState in the ADT is set to + #LC_ACTION_NOT_USED). + + 2) An actionpoint sample request (#LC_SAMPLE_AP_MID) targeting the AP has not + yet been recieved by LC so the AP has not yet been evaluated. + + 3) One or more of the watchpoints that this AP depends on (as defined by + the RPN expression) has a current WatchResult of #LC_WATCH_NOT_MEASURED + so the AP can't be evaluated. + + + (Q) + When would a actionpoint evalute to #LC_ACTION_ERROR? +

+ #LC_ACTION_ERROR is a runtime error indicator for actionpoint processing. + Such a result should be rare since most of the causes are invalid actionpoint + parameters or improperly constructed RPN expressions that should be caught + during validation of the Actionpoint Definition Table. + + However, an exception is the case where one or more watchpoints that this + AP depends on (as defined by the RPN expression) has a current WatchResult of + #LC_WATCH_ERROR. Since the AP can't be evaluated, this will cause the ActionResult + to be set to #LC_ACTION_ERROR. + + In all cases, an error event detailing the cause of the problem will be + issued when an ActionResult is set to #LC_ACTION_ERROR. + + + (Q) + How does the Actionpoint state #LC_APSTATE_PERMOFF differ from + #LC_APSTATE_DISABLED? +

+ The AP state #LC_APSTATE_PERMOFF is intended to provide a way to disable + an AP so it can not easily be turned back on by mistake. Such actionpoints + may not be needed after a seperation sequence or only apply to certain + mission phases. + + While the two states are treated the same way during actionpoint processing + (the AP isn't evaluated), there are a few differences. + + An AP can't be set to #LC_APSTATE_PERMOFF with the #LC_SET_AP_STATE_CC command, + it must be done with the #LC_SET_AP_PERMOFF_CC command. + + To set an AP to #LC_APSTATE_PERMOFF with the #LC_SET_AP_PERMOFF_CC command, the + current AP state must be #LC_APSTATE_DISABLED. + + The #LC_SET_AP_PERMOFF_CC command can only be issued for a single actionpoint, + #LC_ALL_ACTIONPOINTS is not valid as an argument for this command. + + Once an AP is set to #LC_APSTATE_PERMOFF, it can only be changed with a new ADT + table load. + + + (Q) + How is the APResults array in the housekeeping packet (#LC_HkPacket_t) + interpreted? +

+ The APResults array is a byte array (aligned to the nearest longword + boundary) that contains a packed subset of the current contents of the + Actionpoint Results Table (see #LC_ARTEntry_t). + + It allocates 4 bits per actionpoint, with 2 bits representing the current + state, and 2 bits for the most recent evaluation result. + + The numerical 2 bit values for current state are defined using the + following constants: + + #LC_HKAR_STATE_NOT_USED, #LC_HKAR_STATE_ACTIVE, #LC_HKAR_STATE_PASSIVE, + #LC_HKAR_STATE_DISABLED + + An actionpoint whose current state is #LC_APSTATE_PERMOFF will have it's + state reported in the APResults as #LC_HKAR_STATE_NOT_USED. + + The numerical 2 bit values for evaluation results are defined using the + following constants: + + #LC_HKAR_PASS, #LC_HKAR_FAIL, #LC_HKAR_ERROR, #LC_HKAR_NOT_MEASURED + + Ordering (up to #LC_MAX_ACTIONPOINTS) is as follows : + + Byte 0:(Sap1, Rap1, Sap0, Rap0), Byte 1:(Sap3, Rap3, Sap2, Rap2), etc... + + The APResults array is constructed every housekeeping cycle and is not + effected by the reset counters (#LC_RESET_CC) ground command. It will only + get cleared if the Actionpoint Results Table is reset (via a new ADT table + load or with a #LC_RESET_AP_STATS_CC ground command) + + + (Q) + Will an RTS get requested more than once if an AP stays in the #LC_ACTION_FAIL + state? +

+ No. Assuming the current state of an actionpoint is #LC_APSTATE_ACTIVE, then + when the actionpoint fails enough times to trigger an RTS, the state is set + to #LC_APSTATE_PASSIVE. + + In the passive state, the AP will continue to be sampled and statistics + updated, but no RTS requests will be initiated. + + + (Q) + Can we filter event messages per actionpoint? +

+ Not in the current implementation. Transition event messages for actionpoints + are of type #CFE_EVS_DEBUG and enabling them will turn on events for all + actionpoint transitions. + + However, it is planned to add event message limits and event message counts + to the ADT and ART tables that would allow this type of filtering in a future + version of LC. + + + (Q) + Can I send a single actionpoint evaluation message for multiple actionpoints (eg. 1,2,5,6,7)? +

+ No. You can send individual messages for each action point or a single message to evaluate ALL (xFFFF) actionpoints. + + + (Q) + What if most of my actionpoints need to be evaluated at 1HZ but one needs to be evaluated at 10HZ. How would I setup the Scheduler table to do this? +

+ In order to evaluate an actionpoint, an evaluation message must be placed in the scheduler table. Since the scheduler table is evaluated at 1HZ, the suggested way to accomplish this is to place 9 entries for the 10HZ actionpoint and a single entry to evaluate ALL actionpoints. Note that the ALL actionpoints message needs to be placed 100ms away from the other 9. + + +

General Questions

+ + (Q) + When do results tables get cleared? +

+ When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is + reset to initialization values. For each entry in the WRT, WatchResult is set to + #LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, + ActionResult is set to #LC_ACTION_NOT_MEASURED, the CurrentState is set to the + value of the actionpoint's DefaultState specified in the ADT, and all other values are + zeroed. + + These are also the values used (for the entries specified in the command) when the + #LC_RESET_AP_STATS_CC or #LC_RESET_WP_STATS_CC ground command is received. + + + (Q) + Where can I find some examples of watchpoint and actionpoint table definitions? +

+ The files lc_def_wdt.c and lc_def_adt.c provide example source code files that can be + used to build LC tables and contain some sample table entries in the comment blocks. + + Since the CFS LC was based upon the LC implementation for LRO, LRO limit checker + tables may also provide guidance though there are some minor differences in syntax between + the two implementations. + + + (Q) + When using the CDS, what is restored and when will defaults be used? +

+ When the platform configuration parameter LC_SAVE_TO_CDS is defined, LC will attempt to + use the critical data store (CDS) to save and restore data across application restarts. + The data that LC will save are: + + Watchpoint and Actionpoint Definition Tables + Watchpoint and Actionpoint Results Tables + LC Housekeeping Data + + While the definition tables only need to be updated in the CDS when new ones are loaded, + it is not practical from a performance standpoint to update the CDS every time the + housekeeping data or results data changes. For this reason, results tables and housekeeping + are only updated in the CDS if the application is shut down by cFE Executive Services and exits + cleanly. When the application starts, it will check a "saved on exit" flag in the data + restored from CDS to see if the data is good. If not, it will be reset to initialization + values. + + The detailed sequence for a CDS restore on application startup (with failure cases) is as + follows: + + 1) Try to restore Watchpoint Definition Table from CDS + If FAILS Load default Watchpoint Definition Table from filesystem + Load default Actionpoint Definition Table from filesystem + Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 2) If 1 succeeded, try to restore Actionpoint Definition Table from CDS + If FAILS Load default Watchpoint Definition Table from filesystem + Load default Actionpoint Definition Table from filesystem + Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 3) If 1 and 2 succeeded, try to restore Watchpoint Results Table from CDS + If FAILS Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 4) If 1 - 3 succeeded, try to restore Actionpoint Results Table from CDS + If FAILS Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 5) If 1 - 4 succeeded, try to restore Application data + (housekeeping variables) from CDS + If FAILS Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + 6) If 1 - 5 succeeded, check "save on exit" flag in application data + restored in 5 + IF not set to "SAVED" (meaning we updated on exit) + Clear Watchpoint Results Table to init values + Clear Actionpoint Results Table to init values + Clear Housekeeping variables to init values + + + Prev: \ref cfslccons +**/ diff --git a/docs/misc/CFS LCX 2000 Version Description Document.doc b/docs/misc/CFS LCX 2000 Version Description Document.doc deleted file mode 100644 index 3bc2a79..0000000 Binary files a/docs/misc/CFS LCX 2000 Version Description Document.doc and /dev/null differ diff --git a/docs/users_guide/CFS LC User Guide Doc No 582-2012-004 Source Files.zip b/docs/users_guide/CFS LC User Guide Doc No 582-2012-004 Source Files.zip index 07173c4..544691e 100644 Binary files a/docs/users_guide/CFS LC User Guide Doc No 582-2012-004 Source Files.zip and b/docs/users_guide/CFS LC User Guide Doc No 582-2012-004 Source Files.zip differ diff --git a/docs/users_guide/CFS LC User Guide Doc No 582-2012-004 Ver 1 2012_09-19.pdf b/docs/users_guide/CFS LC User Guide Doc No 582-2012-004 Ver 1 2012_09-19.pdf deleted file mode 100644 index 7073afa..0000000 Binary files a/docs/users_guide/CFS LC User Guide Doc No 582-2012-004 Ver 1 2012_09-19.pdf and /dev/null differ diff --git a/docs/users_guide/CFS LCX User Guide Supp Doc No 582-2012-005 Source Files.zip b/docs/users_guide/CFS LCX User Guide Supp Doc No 582-2012-005 Source Files.zip deleted file mode 100644 index 24d8869..0000000 Binary files a/docs/users_guide/CFS LCX User Guide Supp Doc No 582-2012-005 Source Files.zip and /dev/null differ diff --git a/docs/users_guide/CFS LCX User Guide Supp Doc No 582-2012-005 Ver 1 2012_09-19.pdf b/docs/users_guide/CFS LCX User Guide Supp Doc No 582-2012-005 Ver 1 2012_09-19.pdf deleted file mode 100644 index ee659d8..0000000 Binary files a/docs/users_guide/CFS LCX User Guide Supp Doc No 582-2012-005 Ver 1 2012_09-19.pdf and /dev/null differ diff --git a/docs/users_guide/cFS LC User Guide Doc No 582-2012-004 Ver 1_1 2017_08-29.pdf b/docs/users_guide/cFS LC User Guide Doc No 582-2012-004 Ver 1_1 2017_08-29.pdf new file mode 100644 index 0000000..6e983a6 Binary files /dev/null and b/docs/users_guide/cFS LC User Guide Doc No 582-2012-004 Ver 1_1 2017_08-29.pdf differ diff --git a/docs/users_guide/html/annotated.html b/docs/users_guide/html/annotated.html index 3706226..a88d89e 100644 --- a/docs/users_guide/html/annotated.html +++ b/docs/users_guide/html/annotated.html @@ -1,42 +1,51 @@ - - -CFS Limit Checker Application on User's Guide: Data Structures - - - - -
-
-
-
-

CFS Limit Checker Application on User's Guide Data Structures

Here are the data structures with brief descriptions: - - - - - - - - - - - - - - -
LC_ADTEntry_tActionpoint Definition Table (ADT) Entry
LC_ARTEntry_tActionpoint Results Table (ART) Entry
LC_HkPacket_t
LC_MultiType_tWatchpoint Definition Table (WDT) MultiType Union This union is used to set and extract the comparison value in each WDT entry since it needs to fill a 32 bit fixed width field. A conditional compile switch gets the endianess right
LC_NoArgsCmd_tNo Arguments Command For command details see LC_NOOP_CC, LC_RESET_CC Also see LC_SEND_HK_MID
LC_ResetAPStats_tReset AP (Actionpoint) Statistics For command details see LC_RESET_AP_STATS_CC
LC_ResetWPStats_tReset WP (Watchpoint) Statistics For command details see LC_RESET_WP_STATS_CC
LC_SampleAP_tSample AP (Actionpoint) Request See LC_SAMPLE_AP_MID
LC_SetAPPermOff_tSet AP (Actionpoint) Permanently Off For command details see LC_SET_AP_PERMOFF_CC
LC_SetAPState_tSet AP (Actionpoint) State Command For command details see LC_SET_AP_STATE_CC
LC_SetLCState_tSet LC Application State Command For command details see LC_SET_LC_STATE_CC
LC_WDTEntry_tWatchpoint Definition Table (WDT) Entry
LC_WRTEntry_tWatchpoint Results Table (WRT) Entry
LC_WRTTransition_tWatchpoint Transition Structure
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: Data Structures + + + + + + +
+

Data Structures

Here are the data structures with brief descriptions: + + + + + + + + + + + + + + +
LC_ADTEntry_tActionpoint Definition Table (ADT) Entry
LC_ARTEntry_tActionpoint Results Table (ART) Entry
LC_HkPacket_t
LC_MultiType_t
LC_NoArgsCmd_tNo Arguments Command For command details see LC_NOOP_CC, LC_RESET_CC Also see LC_SEND_HK_MID
LC_ResetAPStats_tReset AP (Actionpoint) Statistics For command details see LC_RESET_AP_STATS_CC
LC_ResetWPStats_tReset WP (Watchpoint) Statistics For command details see LC_RESET_WP_STATS_CC
LC_SampleAP_tSample AP (Actionpoint) Request See LC_SAMPLE_AP_MID
LC_SetAPPermOff_tSet AP (Actionpoint) Permanently Off For command details see LC_SET_AP_PERMOFF_CC
LC_SetAPState_tSet AP (Actionpoint) State Command For command details see LC_SET_AP_STATE_CC
LC_SetLCState_tSet LC Application State Command For command details see LC_SET_LC_STATE_CC
LC_WDTEntry_tWatchpoint Definition Table (WDT) Entry
LC_WRTEntry_tWatchpoint Results Table (WRT) Entry
LC_WRTTransition_tWatchpoint Transition Structure
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfeevents.html b/docs/users_guide/html/cfeevents.html index bed4d89..4739d9d 100644 --- a/docs/users_guide/html/cfeevents.html +++ b/docs/users_guide/html/cfeevents.html @@ -1,421 +1,499 @@ - - -CFS Limit Checker Application on User's Guide: cFE Event Message Cross Reference - - - - -
-
-

cFE Event Message Cross Reference

-
Global LC_ACTION_ERROR_ERR_EID
-
'AP evaluated to error: AP = %d, Result = %d'

-

-
-

-

-
Global LC_ADT_GETADDR_ERR_EID
-
'Error getting ADT address, RC=0x%08X'

-

-
-

-

-
Global LC_ADT_LOAD_ERR_EID
-
'Error (RC=0x%08X) Loading ADT with '%s''

-

-
-

-

-
Global LC_ADT_REGISTER_ERR_EID
-
'Error registering ADT, RC=0x%08X'

-

-
-

-

-
Global LC_ADTVAL_ERR_EID
-
'ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d'

-

-
-

-

-
Global LC_ADTVAL_INF_EID
-
'ADT verify results: good = %d, bad = %d, unused = %d'

-

-
-

-

-
Global LC_ADTVAL_RPNERR_EID
-
'ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d'

-

-
-

-

-
Global LC_AP_FAILTOPASS_INF_EID
-
'AP state change from FAIL to PASS: AP = %d'

-

-
-

-

-
Global LC_AP_PASSIVE_FAIL_INF_EID
-
'AP failed while passive: AP = %d, FailCount = %d, RTS = %d'

-

-
-

-

-
Global LC_AP_PASSTOFAIL_INF_EID
-
'AP state change from PASS to FAIL: AP = %d'

-

-
-

-

-
Global LC_APOFF_APNUM_ERR_EID
-
'Set AP perm off error: Invalid AP number = %d'

-

-
-

-

-
Global LC_APOFF_CURR_ERR_EID
-
'Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d'

-

-
-

-

-
Global LC_APOFF_INF_EID
-
'Set AP permanently off command: AP = %d'

-

-
-

-

-
Global LC_APP_CDS_REGISTER_ERR_EID
-
'Error registering application data CDS Area, RC=0x%08X'

-

-
-

-

-
Global LC_APP_NO_SAVE_START_ERR_EID
-
'Application data NOT saved to CDS on startup, RC=0x%08X'

-

-
-

-

-
Global LC_APSAMPLE_APNUM_ERR_EID
-
'Sample AP error: invalid AP number, start = %d, end = %d'

-

-
-

-

-
Global LC_APSAMPLE_CURR_ERR_EID
-
'Sample AP error, invalid current AP state: AP = %d, State = %d'

-

-
-

-

-
Global LC_APSAMPLE_LEN_ERR_EID
-
'Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'

-

-
-

-

-
Global LC_APSTATE_APNUM_ERR_EID
-
'Set AP state error: Invalid AP number = %d'

-

-
-

-

-
Global LC_APSTATE_CURR_ERR_EID
-
'Set AP state error: AP = %d, Invalid current AP state = %d'

-

-
-

-

-
Global LC_APSTATE_INF_EID
-
'Set AP state command: AP = %d, New state = %d'

-

-
-

-

-
Global LC_APSTATE_NEW_ERR_EID
-
'Set AP state error: AP = %d, Invalid new state = %d'

-

-
-

-

-
Global LC_APSTATS_APNUM_ERR_EID
-
'Reset AP stats error: invalid AP number = %d'

-

-
-

-

-
Global LC_APSTATS_INF_EID
-
'Reset AP stats command: AP = %d'

-

-
-

-

-
Global LC_ART_CDS_REGISTER_ERR_EID
-
'Error registering ART CDS Area, RC=0x%08X'

-

-
-

-

-
Global LC_ART_GETADDR_ERR_EID
-
'Error getting ART address, RC=0x%08X'

-

-
-

-

-
Global LC_ART_NO_SAVE_ERR_EID
-
'ART data NOT saved to CDS on exit, RC=0x%08X'

-

-
-

-

-
Global LC_ART_REGISTER_ERR_EID
-
'Error registering ART, RC=0x%08X'

-

-
-

-

-
Global LC_CC_ERR_EID
-
'Invalid command code: ID = 0x%04X, CC = %d'

-

-
-

-

-
Global LC_CDS_DISABLED_INF_EID
-
'LC use of Critical Data Store disabled, activity mask = 0x%08X'

-

-
-

-

-
Global LC_CDS_RESTORED_INF_EID
-
'Previous state restored from Critical Data Store'

-

-
-

-

-
Global LC_CDS_UPDATED_INF_EID
-
'Default state loaded and written to CDS, activity mask = 0x%08X'

-

-
-

-

-
Global LC_CFCALL_ERR_EID
-
'Unexpected LC_CustomFunction call: WP = %d'

-

-
-

-

-
Global LC_CR_PIPE_ERR_EID
-
'Error Creating LC Pipe, RC=0x%08X'

-

-
-

-

-
Global LC_HKREQ_LEN_ERR_EID
-
'Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'

-

-
-

-

-
Global LC_INIT_INF_EID
-
'LC Initialized. Version %d.%d.%d.%d'

-

-
-

-

-
Global LC_INVALID_RPN_ERR_EID
-
'AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d'

-

-
-

-

-
Global LC_LCSTATE_ERR_EID
-
'Set LC state error: invalid state = %d'

-

-
-

-

-
Global LC_LCSTATE_INF_EID
-
'Set LC state command: new state = %d'

-

-
-

-

-
Global LC_LEN_ERR_EID
-
'Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'

-

-
-

-

-
Global LC_MID_INF_EID
-
'Msg with unreferenced message ID rcvd: ID = 0x%04X'

-

-
-

-

-
Global LC_NOOP_INF_EID
-
'No-op command: Version %d.%d.%d.%d'

-

-
-

-

-
Global LC_PASSIVE_FAIL_DBG_EID
-
'AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d'

-

-
-

-

-
Global LC_RESET_DBG_EID
-
'Reset counters command'

-

-
-

-

-
Global LC_SUB_GND_CMD_ERR_EID
-
'Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X'

-

-
-

-

-
Global LC_SUB_HK_REQ_ERR_EID
-
'Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X'

-

-
-

-

-
Global LC_SUB_SAMPLE_CMD_ERR_EID
-
'Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X'

-

-
-

-

-
Global LC_SUB_WP_ERR_EID
-
'Error subscribing watchpoint: MID=0x%04X, RC=0x%08X'

-

-
-

-

-
Global LC_TASK_EXIT_EID
-
'Task terminating, err = 0x%08X'

-

-
-

-

-
Global LC_UNSUB_WP_ERR_EID
-
'Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X'

-

-
-

-

-
Global LC_WDT_GETADDR_ERR_EID
-
'Error getting WDT address, RC=0x%08X'

-

-
-

-

-
Global LC_WDT_LOAD_ERR_EID
-
'Error (RC=0x%08X) Loading WDT with '%s''

-

-
-

-

-
Global LC_WDT_REGISTER_ERR_EID
-
'Error registering WDT, RC=0x%08X'

-

-
-

-

-
Global LC_WDT_REREGISTER_ERR_EID
-
'Error re-registering WDT, RC=0x%08X'

-

-
-

-

-
Global LC_WDTVAL_ERR_EID
-
'WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d'

-

-
-

-

-
Global LC_WDTVAL_FPERR_EID
-
'WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X'

-

-
-

-

-
Global LC_WDTVAL_INF_EID
-
'WDT verify results: good = %d, bad = %d, unused = %d'

-

-
-

-

-
Global LC_WP_DATATYPE_ERR_EID
-
'WP has undefined data type: WP = %d, DataType = %d'

-

-
-

-

-
Global LC_WP_NAN_ERR_EID
-
'WP data value is a float NAN: WP = %d, Value = 0x%08X'

-

-
-

-

-
Global LC_WP_OFFSET_ERR_EID
-
'WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d'

-

-
-

-

-
Global LC_WP_OPERID_ERR_EID
-
'WP has invalid operator ID: WP = %d, OperID = %d'

-

-
-

-

-
Global LC_WPSTATS_INF_EID
-
'Reset WP stats command: WP = %d'

-

-
-

-

-
Global LC_WPSTATS_WPNUM_ERR_EID
-
'Reset WP stats error: invalid WP number = %d'

-

-
-

-

-
Global LC_WRT_CDS_REGISTER_ERR_EID
-
'Error registering WRT CDS Area, RC=0x%08X'

-

-
-

-

-
Global LC_WRT_GETADDR_ERR_EID
-
'Error getting WRT address, RC=0x%08X'

-

-
-

-

-
Global LC_WRT_NO_SAVE_ERR_EID
-
'WRT data NOT saved to CDS on exit, RC=0x%08X'

-

-
-

-

-
Global LC_WRT_REGISTER_ERR_EID
-
'Error registering WRT, RC=0x%08X'

-

-
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: cFE Event Message Cross Reference + + + + + + +
+ + +

cFE Event Message Cross Reference

+
+
Global LC_ACTION_ERROR_ERR_EID
+

'AP evaluated to error: AP = %d, Result = %d'

+

+
+
+

+
+
Global LC_ADT_GETADDR_ERR_EID
+

'Error getting ADT address, RC=0x%08X'

+

+
+
+

+
+
Global LC_ADT_LOAD_ERR_EID
+

'Error (RC=0x%08X) Loading ADT with '%s''

+

+
+
+

+
+
Global LC_ADT_REGISTER_ERR_EID
+

'Error registering ADT, RC=0x%08X'

+

+
+
+

+
+
Global LC_ADTVAL_ERR_EID
+

'ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d'

+

+
+
+

+
+
Global LC_ADTVAL_INF_EID
+

'ADT verify results: good = %d, bad = %d, unused = %d'

+

+
+
+

+
+
Global LC_ADTVAL_RPNERR_EID
+

'ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d'

+

+
+
+

+
+
Global LC_AP_FAILTOPASS_INF_EID
+

'AP state change from FAIL to PASS: AP = %d'

+

+
+
+

+
+
Global LC_AP_PASSIVE_FAIL_INF_EID
+

'AP failed while passive: AP = %d, FailCount = %d, RTS = %d'

+

+
+
+

+
+
Global LC_AP_PASSTOFAIL_INF_EID
+

'AP state change from PASS to FAIL: AP = %d'

+

+
+
+

+
+
Global LC_APOFF_APNUM_ERR_EID
+

'Set AP perm off error: Invalid AP number = %d'

+

+
+
+

+
+
Global LC_APOFF_CURR_ERR_EID
+

'Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d'

+

+
+
+

+
+
Global LC_APOFF_INF_EID
+

'Set AP permanently off command: AP = %d'

+

+
+
+

+
+
Global LC_APP_CDS_REGISTER_ERR_EID
+

'Error registering application data CDS Area, RC=0x%08X'

+

+
+
+

+
+
Global LC_APP_NO_SAVE_START_ERR_EID
+

'Application data NOT saved to CDS on startup, RC=0x%08X'

+

+
+
+

+
+
Global LC_APSAMPLE_APNUM_ERR_EID
+

'Sample AP error: invalid AP number, start = %d, end = %d'

+

+
+
+

+
+
Global LC_APSAMPLE_CURR_ERR_EID
+

'Sample AP error, invalid current AP state: AP = %d, State = %d'

+

+
+
+

+
+
Global LC_APSAMPLE_LEN_ERR_EID
+

'Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'

+

+
+
+

+
+
Global LC_APSTATE_APNUM_ERR_EID
+

'Set AP state error: Invalid AP number = %d'

+

+
+
+

+
+
Global LC_APSTATE_CURR_ERR_EID
+

'Set AP state error: AP = %d, Invalid current AP state = %d'

+

+
+
+

+
+
Global LC_APSTATE_INF_EID
+

'Set AP state command: AP = %d, New state = %d'

+

+
+
+

+
+
Global LC_APSTATE_NEW_ERR_EID
+

'Set AP state error: AP = %d, Invalid new state = %d'

+

+
+
+

+
+
Global LC_APSTATS_APNUM_ERR_EID
+

'Reset AP stats error: invalid AP number = %d'

+

+
+
+

+
+
Global LC_APSTATS_INF_EID
+

'Reset AP stats command: AP = %d'

+

+
+
+

+
+
Global LC_ART_CDS_REGISTER_ERR_EID
+

'Error registering ART CDS Area, RC=0x%08X'

+

+
+
+

+
+
Global LC_ART_GETADDR_ERR_EID
+

'Error getting ART address, RC=0x%08X'

+

+
+
+

+
+
Global LC_ART_NO_SAVE_ERR_EID
+

'ART data NOT saved to CDS on exit, RC=0x%08X'

+

+
+
+

+
+
Global LC_ART_REGISTER_ERR_EID
+

'Error registering ART, RC=0x%08X'

+

+
+
+

+
+
Global LC_CC_ERR_EID
+

'Invalid command code: ID = 0x%04X, CC = %d'

+

+
+
+

+
+
Global LC_CDS_DISABLED_INF_EID
+

'LC use of Critical Data Store disabled, activity mask = 0x%08X'

+

+
+
+

+
+
Global LC_CDS_RESTORED_INF_EID
+

'Previous state restored from Critical Data Store'

+

+
+
+

+
+
Global LC_CDS_UPDATED_INF_EID
+

'Default state loaded and written to CDS, activity mask = 0x%08X'

+

+
+
+

+
+
Global LC_CFCALL_ERR_EID
+

'Unexpected LC_CustomFunction call: WP = %d'

+

+
+
+

+
+
Global LC_CR_PIPE_ERR_EID
+

'Error Creating LC Pipe, RC=0x%08X'

+

+
+
+

+
+
Global LC_HKREQ_LEN_ERR_EID
+

'Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'

+

+
+
+

+
+
Global LC_INIT_INF_EID
+

'LC Initialized. Version %d.%d.%d.%d'

+

+
+
+

+
+
Global LC_INVALID_RPN_ERR_EID
+

'AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d'

+

+
+
+

+
+
Global LC_LCSTATE_ERR_EID
+

'Set LC state error: invalid state = %d'

+

+
+
+

+
+
Global LC_LCSTATE_INF_EID
+

'Set LC state command: new state = %d'

+

+
+
+

+
+
Global LC_LEN_ERR_EID
+

'Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'

+

+
+
+

+
+
Global LC_MID_INF_EID
+

'Msg with unreferenced message ID rcvd: ID = 0x%04X'

+

+
+
+

+
+
Global LC_NOOP_INF_EID
+

'No-op command: Version %d.%d.%d.%d'

+

+
+
+

+
+
Global LC_PASSIVE_FAIL_DBG_EID
+

'AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d'

+

+
+
+

+
+
Global LC_RESET_DBG_EID
+

'Reset counters command'

+

+
+
+

+
+
Global LC_SUB_GND_CMD_ERR_EID
+

'Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X'

+

+
+
+

+
+
Global LC_SUB_HK_REQ_ERR_EID
+

'Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X'

+

+
+
+

+
+
Global LC_SUB_SAMPLE_CMD_ERR_EID
+

'Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X'

+

+
+
+

+
+
Global LC_SUB_WP_ERR_EID
+

'Error subscribing watchpoint: MID=0x%04X, RC=0x%08X'

+

+
+
+

+
+
Global LC_TASK_EXIT_EID
+

'Task terminating, err = 0x%08X'

+

+
+
+

+
+
Global LC_UNSUB_WP_ERR_EID
+

'Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X'

+

+
+
+

+
+
Global LC_WDT_GETADDR_ERR_EID
+

'Error getting WDT address, RC=0x%08X'

+

+
+
+

+
+
Global LC_WDT_LOAD_ERR_EID
+

'Error (RC=0x%08X) Loading WDT with '%s''

+

+
+
+

+
+
Global LC_WDT_REGISTER_ERR_EID
+

'Error registering WDT, RC=0x%08X'

+

+
+
+

+
+
Global LC_WDT_REREGISTER_ERR_EID
+

'Error re-registering WDT, RC=0x%08X'

+

+
+
+

+
+
Global LC_WDTVAL_ERR_EID
+

'WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d'

+

+
+
+

+
+
Global LC_WDTVAL_FPERR_EID
+

'WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X'

+

+
+
+

+
+
Global LC_WDTVAL_INF_EID
+

'WDT verify results: good = %d, bad = %d, unused = %d'

+

+
+
+

+
+
Global LC_WP_DATATYPE_ERR_EID
+

'WP has undefined data type: WP = %d, DataType = %d'

+

+
+
+

+
+
Global LC_WP_NAN_ERR_EID
+

'WP data value is a float NAN: WP = %d, Value = 0x%08X'

+

+
+
+

+
+
Global LC_WP_OFFSET_ERR_EID
+

'WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d'

+

+
+
+

+
+
Global LC_WP_OPERID_ERR_EID
+

'WP has invalid operator ID: WP = %d, OperID = %d'

+

+
+
+

+
+
Global LC_WPSTATS_INF_EID
+

'Reset WP stats command: WP = %d'

+

+
+
+

+
+
Global LC_WPSTATS_WPNUM_ERR_EID
+

'Reset WP stats error: invalid WP number = %d'

+

+
+
+

+
+
Global LC_WRT_CDS_REGISTER_ERR_EID
+

'Error registering WRT CDS Area, RC=0x%08X'

+

+
+
+

+
+
Global LC_WRT_GETADDR_ERR_EID
+

'Error getting WRT address, RC=0x%08X'

+

+
+
+

+
+
Global LC_WRT_NO_SAVE_ERR_EID
+

'WRT data NOT saved to CDS on exit, RC=0x%08X'

+

+
+
+

+
+
Global LC_WRT_REGISTER_ERR_EID
+

'Error registering WRT, RC=0x%08X'

+

+
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfs__lc_8dox.html b/docs/users_guide/html/cfs__lc_8dox.html index c30745b..9ea5f2c 100644 --- a/docs/users_guide/html/cfs__lc_8dox.html +++ b/docs/users_guide/html/cfs__lc_8dox.html @@ -1,28 +1,36 @@ - - -CFS Limit Checker Application on User's Guide: lc/docs/dox_src/users_guide/cfs_lc.dox File Reference - - - - -
-
-
-
-

lc/docs/dox_src/users_guide/cfs_lc.dox File Reference

- -
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: lc/docs/dox_src/users_guide/cfs_lc.dox File Reference + + + + + + +
+

lc/docs/dox_src/users_guide/cfs_lc.dox File Reference

+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslccfg.html b/docs/users_guide/html/cfslccfg.html index c2ca1fd..be980b3 100644 --- a/docs/users_guide/html/cfslccfg.html +++ b/docs/users_guide/html/cfslccfg.html @@ -1,120 +1,143 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Configuration Parameters - - - - -
-
- -

CFS Limit Checker Configuration Parameters

Next: CFS Limit Checker Operational Constraints
- Prev: CFS Limit Checker Table Definitions
-

- - - -
CFS Limit Checker Commands CFS Limit Checker Telemetry CFS Limit Checker Table Definitions
-

-The following are configuration parameters used to configure the CFS Limit Checker Application either for each platform or for a mission as a whole.

-

-
Global LC_ADT_FILENAME
-
Actionpoint Definition Table (ADT) filename

-

-
-

-

-
Global LC_APP_NAME
-
Application Name

-

-
-

-

-
Global LC_FLOAT_TOLERANCE
-
Floating Point Compare Tolerance

-

-
-

-

-
Global LC_MAX_ACTION_TEXT
-
Maximum actionpoint event text string size

-

-
-

-

-
Global LC_MAX_ACTIONPOINTS
-
Maximum number of actionpoints

-

-
-

-

-
Global LC_MAX_RPN_EQU_SIZE
-
Maximum reverse polish (RPN) equation size

-

-
-

-

-
Global LC_MAX_VALID_ADT_RTSID
-
Maximum valid ADT RTS ID

-

-
-

-

-
Global LC_MAX_WATCHPOINTS
-
Maximum number of watchpoints

-

-
-

-

-
Global LC_PIPE_DEPTH
-
Command Pipe Depth

-

-
-

-

-
Global LC_STATE_POWER_ON_RESET
-
LC state after power-on reset

-

-
-

-

-
Global LC_STATE_WHEN_CDS_RESTORED
-
Save data to CDS compiler switch

-

-
-

-

-
Global LC_STATE_WHEN_CDS_RESTORED
-
LC state when CDS is restored

-

-
-

-

-
Global LC_WDT_FILENAME
-
Watchpoint Definition Table (WDT) filename

-

-
-

-

-
Global LC_RTS_REQ_CC
-
RTS Request Command Code

-

-
-

-

-
Global LC_RTS_REQ_MID
-
RTS Request Message ID

-

-
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Configuration Parameters + + + + + + +
+ + +

CFS Limit Checker Configuration Parameters

Next: CFS Limit Checker Operational Constraints
+ Prev: CFS Limit Checker Table Definitions
+

+ + + +

CFS Limit Checker Commands

+

CFS Limit Checker Telemetry

+

CFS Limit Checker Table Definitions

+
+

The following are configuration parameters used to configure the CFS Limit Checker Application either for each platform or for a mission as a whole.

+

+
+
Global LC_ADT_FILENAME
+

Actionpoint Definition Table (ADT) filename

+

+
+
+

+
+
Global LC_APP_NAME
+

Application Name

+

+
+
+

+
+
Global LC_FLOAT_TOLERANCE
+

Floating Point Compare Tolerance

+

+
+
+

+
+
Global LC_MAX_ACTION_TEXT
+

Maximum actionpoint event text string size

+

+
+
+

+
+
Global LC_MAX_ACTIONPOINTS
+

Maximum number of actionpoints

+

+
+
+

+
+
Global LC_MAX_RPN_EQU_SIZE
+

Maximum reverse polish (RPN) equation size

+

+
+
+

+
+
Global LC_MAX_VALID_ADT_RTSID
+

Maximum valid ADT RTS ID

+

+
+
+

+
+
Global LC_MAX_WATCHPOINTS
+

Maximum number of watchpoints

+

+
+
+

+
+
Global LC_PIPE_DEPTH
+

Command Pipe Depth

+

+
+
+

+
+
Global LC_RTS_REQ_CC
+

RTS Request Command Code

+

+
+
+

+
+
Global LC_RTS_REQ_MID
+

RTS Request Message ID

+

+
+
+

+
+
Global LC_STATE_POWER_ON_RESET
+

LC state after power-on reset

+

+
+
+

+
+
Global LC_STATE_WHEN_CDS_RESTORED
+

Save data to CDS compiler switch

+

+

LC state when CDS is restored

+

+
+
+

+
+
Global LC_WDT_FILENAME
+

Watchpoint Definition Table (WDT) filename

+

+
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslccmdmnems.html b/docs/users_guide/html/cfslccmdmnems.html index a2a882b..20e6a40 100644 --- a/docs/users_guide/html/cfslccmdmnems.html +++ b/docs/users_guide/html/cfslccmdmnems.html @@ -1,54 +1,65 @@ - - -CFS Limit Checker Application on User's Guide: LC Command Mnemonic Cross Reference - - - - -
-
-

LC Command Mnemonic Cross Reference

-
Global LC_NOOP_CC
-
$sc_$cpu_LC_NOOP
-
-

-

-
Global LC_RESET_AP_STATS_CC
-
$sc_$cpu_LC_ResetAPStats
-
-

-

-
Global LC_RESET_CC
-
$sc_$cpu_LC_ResetCtrs
-
-

-

-
Global LC_RESET_WP_STATS_CC
-
$sc_$cpu_LC_ResetWPStats
-
-

-

-
Global LC_SET_AP_PERMOFF_CC
-
$sc_$cpu_LC_SetAPPermOff
-
-

-

-
Global LC_SET_AP_STATE_CC
-
$sc_$cpu_LC_SetAPState
-
-

-

-
Global LC_SET_LC_STATE_CC
-
$sc_$cpu_LC_SetLCState
-
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC Command Mnemonic Cross Reference + + + + + + +
+ + +

LC Command Mnemonic Cross Reference

+
+
Global LC_NOOP_CC
+
$sc_$cpu_LC_NOOP
+
+

+
+
Global LC_RESET_AP_STATS_CC
+
$sc_$cpu_LC_ResetAPStats
+
+

+
+
Global LC_RESET_CC
+
$sc_$cpu_LC_ResetCtrs
+
+

+
+
Global LC_RESET_WP_STATS_CC
+
$sc_$cpu_LC_ResetWPStats
+
+

+
+
Global LC_SET_AP_PERMOFF_CC
+
$sc_$cpu_LC_SetAPPermOff
+
+

+
+
Global LC_SET_AP_STATE_CC
+
$sc_$cpu_LC_SetAPState
+
+

+
+
Global LC_SET_LC_STATE_CC
+
$sc_$cpu_LC_SetLCState
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslccmds.html b/docs/users_guide/html/cfslccmds.html index c376204..b01d64d 100644 --- a/docs/users_guide/html/cfslccmds.html +++ b/docs/users_guide/html/cfslccmds.html @@ -1,72 +1,92 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Commands - - - - -
-
- -

CFS Limit Checker Commands

Next: CFS Limit Checker Telemetry
- Prev: CFS Limit Checker Deployment Guide
-

- - - -
CFS Limit Checker Telemetry CFS Limit Checker Table Definitions CFS Limit Checker Configuration Parameters
-

-The following is a list of commands that are processed by the CFS Limit Checker Application:

-

-
Global LC_NOOP_CC
-
Noop

-

-
-

-

-
Global LC_RESET_AP_STATS_CC
-
Reset AP Statistics

-

-
-

-

-
Global LC_RESET_CC
-
Reset Counters

-

-
-

-

-
Global LC_RESET_WP_STATS_CC
-
Reset WP Statistics

-

-
-

-

-
Global LC_SET_AP_PERMOFF_CC
-
Set AP Permanently Off

-

-
-

-

-
Global LC_SET_AP_STATE_CC
-
Set AP State

-

-
-

-

-
Global LC_SET_LC_STATE_CC
-
Set LC Application State

-

-
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Commands + + + + + + +
+ + +

CFS Limit Checker Commands

Next: CFS Limit Checker Telemetry
+ Prev: CFS Limit Checker Deployment Guide
+

+ + + +

CFS Limit Checker Telemetry

+

CFS Limit Checker Table Definitions

+

CFS Limit Checker Configuration Parameters

+
+

The following is a list of commands that are processed by the CFS Limit Checker Application:

+

+
+
Global LC_NOOP_CC
+

Noop

+

+
+
+

+
+
Global LC_RESET_AP_STATS_CC
+

Reset AP Statistics

+

+
+
+

+
+
Global LC_RESET_CC
+

Reset Counters

+

+
+
+

+
+
Global LC_RESET_WP_STATS_CC
+

Reset WP Statistics

+

+
+
+

+
+
Global LC_SET_AP_PERMOFF_CC
+

Set AP Permanently Off

+

+
+
+

+
+
Global LC_SET_AP_STATE_CC
+

Set AP State

+

+
+
+

+
+
Global LC_SET_LC_STATE_CC
+

Set LC Application State

+

+
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslccons.html b/docs/users_guide/html/cfslccons.html index 85dd5fb..49da424 100644 --- a/docs/users_guide/html/cfslccons.html +++ b/docs/users_guide/html/cfslccons.html @@ -1,27 +1,38 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Operational Constraints - - - - -
-
- -

CFS Limit Checker Operational Constraints

The LC application requires default WDT and ADT table images to be on the filesystem when the application is started or it will fail to load. These files are required even if using the Critical Data Store (CDS) since LC will fall back to these table images if a table restore from CDS fails (which will happen during a power-on reset). Where LC will look to find these files is dictated by the configuration parameters LC_WDT_FILENAME and LC_ADT_FILENAME.

-Potential causes for LC to terminate prematurely are an error return from the software bus in the application main loop or error return from one of the cFE table services functions when LC tries to do table management (check for updates, dump requests etc.) during each housekeeping cycle.

-When using the Critical Data Store (CDS), the results tables and housekeeping data will only be restored if the application was shut down through cFE Executive Services and exited clean. If this is not the case, default values will be used (see CFS Limit Checker Frequently Asked Questions).

-Ideally, LC should require no intervention from the ground on a routine basis. Once monitoring is enabled, it will keep processing data and checking for threshold violations (assuming regular scheduler input).

-Next: CFS Limit Checker Frequently Asked Questions
- Prev: CFS Limit Checker Configuration Parameters


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Operational Constraints + + + + + + +
+ + +

CFS Limit Checker Operational Constraints

The LC application requires default WDT and ADT table images to be on the filesystem when the application is started or it will fail to load. These files are required even if using the Critical Data Store (CDS) since LC will fall back to these table images if a table restore from CDS fails (which will happen during a power-on reset). Where LC will look to find these files is dictated by the configuration parameters LC_WDT_FILENAME and LC_ADT_FILENAME.

+

Potential causes for LC to terminate prematurely are an error return from the software bus in the application main loop or error return from one of the cFE table services functions when LC tries to do table management (check for updates, dump requests etc.) during each housekeeping cycle.

+

When using the Critical Data Store (CDS), the results tables and housekeeping data will only be restored if the application was shut down through cFE Executive Services and exited clean. If this is not the case, default values will be used (see CFS Limit Checker Frequently Asked Questions).

+

Ideally, LC should require no intervention from the ground on a routine basis. Once monitoring is enabled, it will keep processing data and checking for threshold violations (assuming regular scheduler input).

+

Next: CFS Limit Checker Frequently Asked Questions
+ Prev: CFS Limit Checker Configuration Parameters

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslcdg.html b/docs/users_guide/html/cfslcdg.html index b94cb6f..5b04b53 100644 --- a/docs/users_guide/html/cfslcdg.html +++ b/docs/users_guide/html/cfslcdg.html @@ -1,30 +1,41 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Deployment Guide - - - - -
-
- -

CFS Limit Checker Deployment Guide

The first step in deploying the LC application is to size and construct default WDT and ADT tables. LC requires these default table images to be on the filesystem when the application is started or it will fail to load. These files are required even if using the Critical Data Store (CDS) since LC will fall back to these table images if a table restore from CDS fails (which will happen during a power-on reset). Where LC will look to find these files is dictated by the configuration parameters LC_WDT_FILENAME and LC_ADT_FILENAME.

-The size of the WDT and ADT tables is dictated by the configuration parameters LC_MAX_WATCHPOINTS and LC_MAX_ACTIONPOINTS. The total size of either table should not exceed the cFE size limit for a single buffered table set by the CFE_TBL_MAX_SNGL_TABLE_SIZE parameter. When considering how many watchpoints and actionpoints are needed, keep in mind the the entire WDT is sequentially searched whenever a message that may contain watchpoints is received. Likewise the entire ADT will be processed whenever a LC_SAMPLE_AP_MID message is recieved. While it is desirable to leave unused entries in both tables for later updates, large tables will increase search time which may be undesirable depending on the telemetry and actionpoint sample rates required. LC defines the performance ID LC_WDT_SEARCH_PERF_ID that can be used to monitor WDT search time. There is not currently a performance ID for ADT processing since the actionpoint sample cycle is not dependent on telemetry rates but set by the configuration of the scheduler (SCH) application.

-Example source code for these tables sized to the default number of watchpoints and actionpoints are provided in the files lc_def_wdt.c and lc_def_adt.c.

-LC requires a message with the message ID LC_SAMPLE_AP_MID to sample actionpoints. The CFS scheduler application (SCH) needs to be configured to provide this trigger message at the desired frequency for actionpoint processing to occur.

-The function /LC_ExecuteRTS in the file lc_custom.c needs to be reviewed for any modifications that may be needed to properly initiate RTS responses to actionpoint failures. This function uses a local declaration of an example stored commanding (SC) message structure which was done to allow LC to be compiled independent of any other external application's data structures. A mission may choose to remove this and use a message structure declared outside LC instead. This also applies to the LC_RTS_REQ_MID and LC_RTS_REQ_CC constants in lc_mission_cfg.h.

-If custom functions are to be used, the function /LC_CustomFunction in the file lc_custom.c needs to modified appropriately (see CFS Limit Checker Frequently Asked Questions).

-In the lc_platform_cfg.h file, there are configuration parameters that control use of the Critical Data Store (CDS) and the LC operation mode on application initialization. The default case is not to use the CDS and to set the application state to LC_STATE_DISABLED.

-Next: CFS Limit Checker Commands
- Prev: CFS Limit Checker Requirements


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Deployment Guide + + + + + + +
+ + +

CFS Limit Checker Deployment Guide

The first step in deploying the LC application is to size and construct default WDT and ADT tables. LC requires these default table images to be on the filesystem when the application is started or it will fail to load. These files are required even if using the Critical Data Store (CDS) since LC will fall back to these table images if a table restore from CDS fails (which will happen during a power-on reset). Where LC will look to find these files is dictated by the configuration parameters LC_WDT_FILENAME and LC_ADT_FILENAME.

+

The size of the WDT and ADT tables is dictated by the configuration parameters LC_MAX_WATCHPOINTS and LC_MAX_ACTIONPOINTS. The total size of either table should not exceed the cFE size limit for a single buffered table set by the CFE_TBL_MAX_SNGL_TABLE_SIZE parameter. When considering how many watchpoints and actionpoints are needed, keep in mind the the entire WDT is sequentially searched whenever a message that may contain watchpoints is received. Likewise the entire ADT will be processed whenever a LC_SAMPLE_AP_MID message is recieved. While it is desirable to leave unused entries in both tables for later updates, large tables will increase search time which may be undesirable depending on the telemetry and actionpoint sample rates required. LC defines the performance ID LC_WDT_SEARCH_PERF_ID that can be used to monitor WDT search time. There is not currently a performance ID for ADT processing since the actionpoint sample cycle is not dependent on telemetry rates but set by the configuration of the scheduler (SCH) application.

+

Example source code for these tables sized to the default number of watchpoints and actionpoints are provided in the files lc_def_wdt.c and lc_def_adt.c.

+

LC requires a message with the message ID LC_SAMPLE_AP_MID to sample actionpoints. The CFS scheduler application (SCH) needs to be configured to provide this trigger message at the desired frequency for actionpoint processing to occur.

+

The function /LC_ExecuteRTS in the file lc_custom.c needs to be reviewed for any modifications that may be needed to properly initiate RTS responses to actionpoint failures. This function uses a local declaration of an example stored commanding (SC) message structure which was done to allow LC to be compiled independent of any other external application's data structures. A mission may choose to remove this and use a message structure declared outside LC instead. This also applies to the LC_RTS_REQ_MID and LC_RTS_REQ_CC constants in lc_mission_cfg.h.

+

If custom functions are to be used, the function /LC_CustomFunction in the file lc_custom.c needs to modified appropriately (see CFS Limit Checker Frequently Asked Questions).

+

In the lc_platform_cfg.h file, there are configuration parameters that control use of the Critical Data Store (CDS) and the LC operation mode on application initialization. The default case is not to use the CDS and to set the application state to LC_STATE_DISABLED.

+

Next: CFS Limit Checker Commands
+ Prev: CFS Limit Checker Requirements

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslcfaqs.html b/docs/users_guide/html/cfslcfaqs.html index 004caee..2c83c11 100644 --- a/docs/users_guide/html/cfslcfaqs.html +++ b/docs/users_guide/html/cfslcfaqs.html @@ -1,144 +1,151 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Frequently Asked Questions - - - - -
-
- -

CFS Limit Checker Frequently Asked Questions

Watchpoint Questions

-

- (Q) Watchpoints evaluate to LC_WATCH_TRUE or LC_WATCH_FALSE. When the the watchpoint is defined which should be the error condition?
-
- Watchpoints evaluate to a boolean True or False. So if you setup a comparison < 100 any watchpoint value 0 to 99 will evaluate LC_WATCH_TRUE and 100+ will be LC_WATCH_FALSE.

- You want to construct the watchpoint cases so they evaluate True when you are outside of the acceptable range for a telemetry point. That's why there are cumulative and consecutive true counts in the watchpoint results table, but no corresponding values for False.

- For some examples, see the file lc_def_wdt.c

- (Q) There is only a single comparison value for each watchpoint. How can I have multiple thresholds for a single telemetry point?
-
- Create additional watchpoint definitions that reference the same telemetry point but have different comparison values. The watchpoints will be evaluated in the order they are listed in the WDT when the monitor point arrives.

- Having multiple watchpoints allows different Actionpoints to trigger on each watchpoint state (or combination of states).

- (Q) How do I calculate the watchpoint offset?
-
- The offset is a zero based byte offset from the beginning of the message (including any headers) to the first byte of the watchpoint data. So for a cFE raw command using CCSDS, the offset has to account for the size of the cFE command header (CFE_SB_CMD_HDR_SIZE).

- (Q) When do I need to use the bitmask in a watchpoint definition?
-
- All watchpoints are sized to a 32 bit value when extracted from a message. The specified bitmask value is then applied (as a bitwise AND operation) before the comparison is made or the custom function is called.

- When the watchpoint data is sized, data types smaller than 32 bits are properly sign or zero extended. For this reason, it is not necessary to define a mask for UWORD, WORD or UBYTE, BYTE data types to compare properly. Although it's not needed, a properly constructed bit mask will not cause a problem for these evaluations either.

- When you really need to use a bitmask is when monitoring odd sized data (such as a 24 bit sensor reading) or testing data to see if certain bits have been set (or cleared).

- When no bitmask is needed, be sure to use the constant LC_NO_BITMASK (or it's equivalent value 0xFFFFFFFF) in your WDT tables. Since masking is a bitwise AND, setting the bitmask to zero will have the effect of always clearing the watchpoint data prior to comparison.

- (Q) Why do I need to specify the byte order (big or little endian) of the watchpoint data type?
-
- One enhancement made to the CFS version of LC is that it will properly byte swap watchpoint data prior to masking and comparison if the byte order of the data is different than the order used by the processor running LC. This allows LC to monitor telemetry data that might be constructed by instrument or other subsystem processors that use a different byte order.

- LC determines it's byte order using the _STRUCT_HIGH_BIT_FIRST_ and _STRUCT_LOW_BIT_FIRST_ compiler switches that are set in the cFE header common_types.h according to the platform designated in the cFE platform makefile.

- (Q) When would a watchpoint evalute to LC_WATCH_NOT_MEASURED?
-
- LC_WATCH_NOT_MEASURED is an initialization value for the Watchpoint Results Table. If a watchpoint has this WatchResult then the watchpoint is unused (the DataType in the WDT is set to LC_WATCH_NOT_USED) or a message that contains the watchpoint has not yet been recieved by LC and evaluated.

- (Q) When would a watchpoint evalute to LC_WATCH_ERROR?
-
- LC_WATCH_ERROR is a runtime error indicator for watchpoint processing. Such a result should be rare since most of the causes are invalid watchpoint parameters that should be caught during validation of the Watchpoint Definition Table.

- One notable exception is for floating point watchpoints when the message data is detected to be a floating point NAN (Not-A-Number) that can't be relationally compared to any value.

- In all cases, an error event detailing the cause of the problem will be issued when a WatchResult is set to LC_WATCH_ERROR.

- (Q) What is a custom function and how do I create one?
-
- A custom function is a way to do more complicated processing on a watchpoint when the standard comparison operators are not adequate.

- When the OperatorID in a watchpoint definition is set to LC_OPER_CUSTOM. The function /LC_CustomFunction is called instead of LC doing a comparison. /LC_CustomFunction will then return LC_WATCH_TRUE or LC_WATCH_FALSE that will be used as the WatchResult.

- Although /LC_CustomFunction is the same entry point for all watchpoints with a designated custom function operator, a mission can modify the function body to switch on the watchpoint ID (or CustomFuncArgument specified in the watchpoint definition) and branch to as many different sub-functions as it needs for watchpoint specific processing.

- The /LC_CustomFunction stub is in the source file lc_custom.c

- (Q) How is the WPResults array in the housekeeping packet (LC_HkPacket_t) interpreted?
-
- The WPResults array is a byte array (aligned to the nearest longword boundary) that contains a packed subset of the current contents of the Watchpoint Results Table (see LC_WRTEntry_t).

- It allocates 2 bits per watchpoint for the most recent watchpoint comparison result. The numerical 2 bit values are defined using the following constants:

- LC_HKWR_FALSE, LC_HKWR_TRUE, LC_HKWR_ERROR, LC_HKWR_NOT_MEASURED

- Ordering (up to LC_MAX_WATCHPOINTS) is as follows :

- Byte 0:(Rwp3, Rwp2, Rwp1, Rwp0), Byte 1:(Rwp7, Rwp6, Rwp5, Rwp4), etc...

- The WPResults array is constructed every housekeeping cycle and is not effected by the reset counters (LC_RESET_CC) ground command. It will only get cleared if the Watchpoint Results Table is reset (via a new WDT table load or with a LC_RESET_WP_STATS_CC ground command)

-

Actionpoint Questions

-

- (Q) Actionpoints evaluate to LC_ACTION_PASS or LC_ACTION_FAIL. How should the RPN expression get constructed so it will evaluate to the proper result?
-
- Actionpoint RPN expressions are combinations of watchpoint states and logical operators that evaluate to a boolean True or False.

- Just like a watchpoint evaluation of True indicates a parameter outside acceptable limits, an AP expression that evaluates True is considered to have Failed and will have it's ActionResult set to LC_ACTION_FAIL.

- While the terminology may seem confusing, the key point is to construct both watchpoint and actionpoint expressions to define the error condition LC is looking for and NOT the normal condition of the spacecraft data stream.

- For some examples, see the file lc_def_adt.c

- (Q) When would a actionpoint evalute to LC_ACTION_NOT_MEASURED?
-
- LC_ACTION_NOT_MEASURED is an initialization value for the Actionpoint Results Table. If an actionpoint has this ActionResult then one of three possible conditions are true:

- 1) The actionpoint is unused (the DefaultState in the ADT is set to

- LC_ACTION_NOT_USED).

- 2) An actionpoint sample request (LC_SAMPLE_AP_MID) targeting the AP has not yet been recieved by LC so the AP has not yet been evaluated.

- 3) One or more of the watchpoints that this AP depends on (as defined by the RPN expression) has a current WatchResult of LC_WATCH_NOT_MEASURED so the AP can't be evaluated.

- (Q) When would a actionpoint evalute to LC_ACTION_ERROR?
-
- LC_ACTION_ERROR is a runtime error indicator for actionpoint processing. Such a result should be rare since most of the causes are invalid actionpoint parameters or improperly constructed RPN expressions that should be caught during validation of the Actionpoint Definition Table.

- However, an exception is the case where one or more watchpoints that this AP depends on (as defined by the RPN expression) has a current WatchResult of LC_WATCH_ERROR. Since the AP can't be evaluated, this will cause the ActionResult to be set to LC_ACTION_ERROR.

- In all cases, an error event detailing the cause of the problem will be issued when an ActionResult is set to LC_ACTION_ERROR.

- (Q) How does the Actionpoint state LC_APSTATE_PERMOFF differ from LC_APSTATE_DISABLED?
-
- The AP state LC_APSTATE_PERMOFF is intended to provide a way to disable an AP so it can not easily be turned back on by mistake. Such actionpoints may not be needed after a seperation sequence or only apply to certain mission phases.

- While the two states are treated the same way during actionpoint processing (the AP isn't evaluated), there are a few differences.

- An AP can't be set to LC_APSTATE_PERMOFF with the LC_SET_AP_STATE_CC command, it must be done with the LC_SET_AP_PERMOFF_CC command.

- To set an AP to LC_APSTATE_PERMOFF with the LC_SET_AP_PERMOFF_CC command, the current AP state must be LC_APSTATE_DISABLED.

- The LC_SET_AP_PERMOFF_CC command can only be issued for a single actionpoint, LC_ALL_ACTIONPOINTS is not valid as an argument for this command.

- Once an AP is set to LC_APSTATE_PERMOFF, it can only be changed with a new ADT table load.

- (Q) How is the APResults array in the housekeeping packet (LC_HkPacket_t) interpreted?
-
- The APResults array is a byte array (aligned to the nearest longword boundary) that contains a packed subset of the current contents of the Actionpoint Results Table (see LC_ARTEntry_t).

- It allocates 4 bits per actionpoint, with 2 bits representing the current state, and 2 bits for the most recent evaluation result.

- The numerical 2 bit values for current state are defined using the following constants:

- LC_HKAR_STATE_NOT_USED, LC_HKAR_STATE_ACTIVE, LC_HKAR_STATE_PASSIVE, LC_HKAR_STATE_DISABLED

- An actionpoint whose current state is LC_APSTATE_PERMOFF will have it's state reported in the APResults as LC_HKAR_STATE_NOT_USED.

- The numerical 2 bit values for evaluation results are defined using the following constants:

- LC_HKAR_PASS, LC_HKAR_FAIL, LC_HKAR_ERROR, LC_HKAR_NOT_MEASURED

- Ordering (up to LC_MAX_ACTIONPOINTS) is as follows :

- Byte 0:(Sap1, Rap1, Sap0, Rap0), Byte 1:(Sap3, Rap3, Sap2, Rap2), etc...

- The APResults array is constructed every housekeeping cycle and is not effected by the reset counters (LC_RESET_CC) ground command. It will only get cleared if the Actionpoint Results Table is reset (via a new ADT table load or with a LC_RESET_AP_STATS_CC ground command)

- (Q) Will an RTS get requested more than once if an AP stays in the LC_ACTION_FAIL state?
-
- No. Assuming the current state of an actionpoint is LC_APSTATE_ACTIVE, then when the actionpoint fails enough times to trigger an RTS, the state is set to LC_APSTATE_PASSIVE.

- In the passive state, the AP will continue to be sampled and statistics updated, but no RTS requests will be initiated.

- (Q) Can we filter event messages per actionpoint?
-
- Not in the current implementation. Transition event messages for actionpoints are of type CFE_EVS_DEBUG and enabling them will turn on events for all actionpoint transitions.

- However, it is planned to add event message limits and event message counts to the ADT and ART tables that would allow this type of filtering in a future version of LC.

- (Q) Can I send a single actionpoint evaluation message for multiple actionpoints (eg. 1,2,5,6,7)?
-
- No. You can send individual messages for each action point or a single message to evaluate ALL (xFFFF) actionpoints.

- (Q) What if most of my actionpoints need to be evaluated at 1HZ but one needs to be evaluated at 10HZ. How would I setup the Scheduler table to do this?
-
- In order to evaluate an actionpoint, an evaluation message must be placed in the scheduler table. Since the scheduler table is evaluated at 1HZ, the suggested way to accomplish this is to place 9 entries for the 10HZ actionpoint and a single entry to evaluate ALL actionpoints. Note that the ALL actionpoints message needs to be placed 100ms away from the other 9.

-

General Questions

-

- (Q) When do results tables get cleared?
-
- When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is reset to initialization values. For each entry in the WRT, WatchResult is set to LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, ActionResult is set to LC_ACTION_NOT_MEASURED, the CurrentState is set to the value of the actionpoint's DefaultState specified in the ADT, and all other values are zeroed.

- These are also the values used (for the entries specified in the command) when the LC_RESET_AP_STATS_CC or LC_RESET_WP_STATS_CC ground command is received.

- (Q) Where can I find some examples of watchpoint and actionpoint table definitions?
-
- The files lc_def_wdt.c and lc_def_adt.c provide example source code files that can be used to build LC tables and contain some sample table entries in the comment blocks.

- Since the CFS LC was based upon the LC implementation for LRO, LRO limit checker tables may also provide guidance though there are some minor differences in syntax between the two implementations.

- (Q) When using the CDS, what is restored and when will defaults be used?
-
- When the platform configuration parameter LC_SAVE_TO_CDS is defined, LC will attempt to use the critical data store (CDS) to save and restore data across application restarts. The data that LC will save are:

- Watchpoint and Actionpoint Definition Tables Watchpoint and Actionpoint Results Tables LC Housekeeping Data

- While the definition tables only need to be updated in the CDS when new ones are loaded, it is not practical from a performance standpoint to update the CDS every time the housekeeping data or results data changes. For this reason, results tables and housekeeping are only updated in the CDS if the application is shut down by cFE Executive Services and exits cleanly. When the application starts, it will check a "saved on exit" flag in the data restored from CDS to see if the data is good. If not, it will be reset to initialization values.

- The detailed sequence for a CDS restore on application startup (with failure cases) is as follows:

- 1) Try to restore Watchpoint Definition Table from CDS If FAILS Load default Watchpoint Definition Table from filesystem Load default Actionpoint Definition Table from filesystem Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

- 2) If 1 succeeded, try to restore Actionpoint Definition Table from CDS If FAILS Load default Watchpoint Definition Table from filesystem Load default Actionpoint Definition Table from filesystem Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

- 3) If 1 and 2 succeeded, try to restore Watchpoint Results Table from CDS If FAILS Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

- 4) If 1 - 3 succeeded, try to restore Actionpoint Results Table from CDS If FAILS Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

- 5) If 1 - 4 succeeded, try to restore Application data (housekeeping variables) from CDS If FAILS Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

- 6) If 1 - 5 succeeded, check "save on exit" flag in application data restored in 5 IF not set to "SAVED" (meaning we updated on exit) Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

-Prev: CFS Limit Checker Operational Constraints


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Frequently Asked Questions + + + + + + +
+ + +

CFS Limit Checker Frequently Asked Questions

Watchpoint Questions

+

(Q) Watchpoints evaluate to LC_WATCH_TRUE or LC_WATCH_FALSE. When the the watchpoint is defined which should be the error condition?
+
+ Watchpoints evaluate to a boolean True or False. So if you setup a comparison < 100 any watchpoint value 0 to 99 will evaluate LC_WATCH_TRUE and 100+ will be LC_WATCH_FALSE.

+

You want to construct the watchpoint cases so they evaluate True when you are outside of the acceptable range for a telemetry point. That's why there are cumulative and consecutive true counts in the watchpoint results table, but no corresponding values for False.

+

For some examples, see the file lc_def_wdt.c

+

(Q) There is only a single comparison value for each watchpoint. How can I have multiple thresholds for a single telemetry point?
+
+ Create additional watchpoint definitions that reference the same telemetry point but have different comparison values. The watchpoints will be evaluated in the order they are listed in the WDT when the monitor point arrives.

+

Having multiple watchpoints allows different Actionpoints to trigger on each watchpoint state (or combination of states).

+

(Q) How do I calculate the watchpoint offset?
+
+ The offset is a zero based byte offset from the beginning of the message (including any headers) to the first byte of the watchpoint data. So for a cFE raw command using CCSDS, the offset has to account for the size of the cFE command header (CFE_SB_CMD_HDR_SIZE).

+

(Q) When do I need to use the bitmask in a watchpoint definition?
+
+ All watchpoints are sized to a 32 bit value when extracted from a message. The specified bitmask value is then applied (as a bitwise AND operation) before the comparison is made or the custom function is called.

+

When the watchpoint data is sized, data types smaller than 32 bits are properly sign or zero extended. For this reason, it is not necessary to define a mask for UWORD, WORD or UBYTE, BYTE data types to compare properly. Although it's not needed, a properly constructed bit mask will not cause a problem for these evaluations either.

+

When you really need to use a bitmask is when monitoring odd sized data (such as a 24 bit sensor reading) or testing data to see if certain bits have been set (or cleared).

+

When no bitmask is needed, be sure to use the constant LC_NO_BITMASK (or it's equivalent value 0xFFFFFFFF) in your WDT tables. Since masking is a bitwise AND, setting the bitmask to zero will have the effect of always clearing the watchpoint data prior to comparison.

+

(Q) Why do I need to specify the byte order (big or little endian) of the watchpoint data type?
+
+ One enhancement made to the CFS version of LC is that it will properly byte swap watchpoint data prior to masking and comparison if the byte order of the data is different than the order used by the processor running LC. This allows LC to monitor telemetry data that might be constructed by instrument or other subsystem processors that use a different byte order.

+

LC determines it's byte order using the _STRUCT_HIGH_BIT_FIRST_ and _STRUCT_LOW_BIT_FIRST_ compiler switches that are set in the cFE header common_types.h according to the platform designated in the cFE platform makefile.

+

(Q) When would a watchpoint evalute to LC_WATCH_NOT_MEASURED?
+
+ LC_WATCH_NOT_MEASURED is an initialization value for the Watchpoint Results Table. If a watchpoint has this WatchResult then the watchpoint is unused (the DataType in the WDT is set to LC_WATCH_NOT_USED) or a message that contains the watchpoint has not yet been recieved by LC and evaluated.

+

(Q) When would a watchpoint evalute to LC_WATCH_ERROR?
+
+ LC_WATCH_ERROR is a runtime error indicator for watchpoint processing. Such a result should be rare since most of the causes are invalid watchpoint parameters that should be caught during validation of the Watchpoint Definition Table.

+

One notable exception is for floating point watchpoints when the message data is detected to be a floating point NAN (Not-A-Number) that can't be relationally compared to any value.

+

In all cases, an error event detailing the cause of the problem will be issued when a WatchResult is set to LC_WATCH_ERROR.

+

(Q) What is a custom function and how do I create one?
+
+ A custom function is a way to do more complicated processing on a watchpoint when the standard comparison operators are not adequate.

+

When the OperatorID in a watchpoint definition is set to LC_OPER_CUSTOM. The function /LC_CustomFunction is called instead of LC doing a comparison. /LC_CustomFunction will then return LC_WATCH_TRUE or LC_WATCH_FALSE that will be used as the WatchResult.

+

Although /LC_CustomFunction is the same entry point for all watchpoints with a designated custom function operator, a mission can modify the function body to switch on the watchpoint ID (or CustomFuncArgument specified in the watchpoint definition) and branch to as many different sub-functions as it needs for watchpoint specific processing.

+

The /LC_CustomFunction stub is in the source file lc_custom.c

+

(Q) How is the WPResults array in the housekeeping packet (LC_HkPacket_t) interpreted?
+
+ The WPResults array is a byte array (aligned to the nearest longword boundary) that contains a packed subset of the current contents of the Watchpoint Results Table (see LC_WRTEntry_t).

+

It allocates 2 bits per watchpoint for the most recent watchpoint comparison result. The numerical 2 bit values are defined using the following constants:

+

LC_HKWR_FALSE, LC_HKWR_TRUE, LC_HKWR_ERROR, LC_HKWR_NOT_MEASURED

+

Ordering (up to LC_MAX_WATCHPOINTS) is as follows :

+

Byte 0:(Rwp3, Rwp2, Rwp1, Rwp0), Byte 1:(Rwp7, Rwp6, Rwp5, Rwp4), etc...

+

The WPResults array is constructed every housekeeping cycle and is not effected by the reset counters (LC_RESET_CC) ground command. It will only get cleared if the Watchpoint Results Table is reset (via a new WDT table load or with a LC_RESET_WP_STATS_CC ground command)

+

Actionpoint Questions

+

(Q) Actionpoints evaluate to LC_ACTION_PASS or LC_ACTION_FAIL. How should the RPN expression get constructed so it will evaluate to the proper result?
+
+ Actionpoint RPN expressions are combinations of watchpoint states and logical operators that evaluate to a boolean True or False.

+

Just like a watchpoint evaluation of True indicates a parameter outside acceptable limits, an AP expression that evaluates True is considered to have Failed and will have it's ActionResult set to LC_ACTION_FAIL.

+

While the terminology may seem confusing, the key point is to construct both watchpoint and actionpoint expressions to define the error condition LC is looking for and NOT the normal condition of the spacecraft data stream.

+

For some examples, see the file lc_def_adt.c

+

(Q) When would a actionpoint evalute to LC_ACTION_NOT_MEASURED?
+
+ LC_ACTION_NOT_MEASURED is an initialization value for the Actionpoint Results Table. If an actionpoint has this ActionResult then one of three possible conditions are true:

+

1) The actionpoint is unused (the DefaultState in the ADT is set to LC_ACTION_NOT_USED).

+

2) An actionpoint sample request (LC_SAMPLE_AP_MID) targeting the AP has not yet been recieved by LC so the AP has not yet been evaluated.

+

3) One or more of the watchpoints that this AP depends on (as defined by the RPN expression) has a current WatchResult of LC_WATCH_NOT_MEASURED so the AP can't be evaluated.

+

(Q) When would a actionpoint evalute to LC_ACTION_ERROR?
+
+ LC_ACTION_ERROR is a runtime error indicator for actionpoint processing. Such a result should be rare since most of the causes are invalid actionpoint parameters or improperly constructed RPN expressions that should be caught during validation of the Actionpoint Definition Table.

+

However, an exception is the case where one or more watchpoints that this AP depends on (as defined by the RPN expression) has a current WatchResult of LC_WATCH_ERROR. Since the AP can't be evaluated, this will cause the ActionResult to be set to LC_ACTION_ERROR.

+

In all cases, an error event detailing the cause of the problem will be issued when an ActionResult is set to LC_ACTION_ERROR.

+

(Q) How does the Actionpoint state LC_APSTATE_PERMOFF differ from LC_APSTATE_DISABLED?
+
+ The AP state LC_APSTATE_PERMOFF is intended to provide a way to disable an AP so it can not easily be turned back on by mistake. Such actionpoints may not be needed after a seperation sequence or only apply to certain mission phases.

+

While the two states are treated the same way during actionpoint processing (the AP isn't evaluated), there are a few differences.

+

An AP can't be set to LC_APSTATE_PERMOFF with the LC_SET_AP_STATE_CC command, it must be done with the LC_SET_AP_PERMOFF_CC command.

+

To set an AP to LC_APSTATE_PERMOFF with the LC_SET_AP_PERMOFF_CC command, the current AP state must be LC_APSTATE_DISABLED.

+

The LC_SET_AP_PERMOFF_CC command can only be issued for a single actionpoint, LC_ALL_ACTIONPOINTS is not valid as an argument for this command.

+

Once an AP is set to LC_APSTATE_PERMOFF, it can only be changed with a new ADT table load.

+

(Q) How is the APResults array in the housekeeping packet (LC_HkPacket_t) interpreted?
+
+ The APResults array is a byte array (aligned to the nearest longword boundary) that contains a packed subset of the current contents of the Actionpoint Results Table (see LC_ARTEntry_t).

+

It allocates 4 bits per actionpoint, with 2 bits representing the current state, and 2 bits for the most recent evaluation result.

+

The numerical 2 bit values for current state are defined using the following constants:

+

LC_HKAR_STATE_NOT_USED, LC_HKAR_STATE_ACTIVE, LC_HKAR_STATE_PASSIVE, LC_HKAR_STATE_DISABLED

+

An actionpoint whose current state is LC_APSTATE_PERMOFF will have it's state reported in the APResults as LC_HKAR_STATE_NOT_USED.

+

The numerical 2 bit values for evaluation results are defined using the following constants:

+

LC_HKAR_PASS, LC_HKAR_FAIL, LC_HKAR_ERROR, LC_HKAR_NOT_MEASURED

+

Ordering (up to LC_MAX_ACTIONPOINTS) is as follows :

+

Byte 0:(Sap1, Rap1, Sap0, Rap0), Byte 1:(Sap3, Rap3, Sap2, Rap2), etc...

+

The APResults array is constructed every housekeeping cycle and is not effected by the reset counters (LC_RESET_CC) ground command. It will only get cleared if the Actionpoint Results Table is reset (via a new ADT table load or with a LC_RESET_AP_STATS_CC ground command)

+

(Q) Will an RTS get requested more than once if an AP stays in the LC_ACTION_FAIL state?
+
+ No. Assuming the current state of an actionpoint is LC_APSTATE_ACTIVE, then when the actionpoint fails enough times to trigger an RTS, the state is set to LC_APSTATE_PASSIVE.

+

In the passive state, the AP will continue to be sampled and statistics updated, but no RTS requests will be initiated.

+

(Q) Can we filter event messages per actionpoint?
+
+ Not in the current implementation. Transition event messages for actionpoints are of type CFE_EVS_DEBUG and enabling them will turn on events for all actionpoint transitions.

+

However, it is planned to add event message limits and event message counts to the ADT and ART tables that would allow this type of filtering in a future version of LC.

+

(Q) Can I send a single actionpoint evaluation message for multiple actionpoints (eg. 1,2,5,6,7)?
+
+ No. You can send individual messages for each action point or a single message to evaluate ALL (xFFFF) actionpoints.

+

(Q) What if most of my actionpoints need to be evaluated at 1HZ but one needs to be evaluated at 10HZ. How would I setup the Scheduler table to do this?
+
+ In order to evaluate an actionpoint, an evaluation message must be placed in the scheduler table. Since the scheduler table is evaluated at 1HZ, the suggested way to accomplish this is to place 9 entries for the 10HZ actionpoint and a single entry to evaluate ALL actionpoints. Note that the ALL actionpoints message needs to be placed 100ms away from the other 9.

+

General Questions

+

(Q) When do results tables get cleared?
+
+ When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is reset to initialization values. For each entry in the WRT, WatchResult is set to LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, ActionResult is set to LC_ACTION_NOT_MEASURED, the CurrentState is set to the value of the actionpoint's DefaultState specified in the ADT, and all other values are zeroed.

+

These are also the values used (for the entries specified in the command) when the LC_RESET_AP_STATS_CC or LC_RESET_WP_STATS_CC ground command is received.

+

(Q) Where can I find some examples of watchpoint and actionpoint table definitions?
+
+ The files lc_def_wdt.c and lc_def_adt.c provide example source code files that can be used to build LC tables and contain some sample table entries in the comment blocks.

+

Since the CFS LC was based upon the LC implementation for LRO, LRO limit checker tables may also provide guidance though there are some minor differences in syntax between the two implementations.

+

(Q) When using the CDS, what is restored and when will defaults be used?
+
+ When the platform configuration parameter LC_SAVE_TO_CDS is defined, LC will attempt to use the critical data store (CDS) to save and restore data across application restarts. The data that LC will save are:

+

Watchpoint and Actionpoint Definition Tables Watchpoint and Actionpoint Results Tables LC Housekeeping Data

+

While the definition tables only need to be updated in the CDS when new ones are loaded, it is not practical from a performance standpoint to update the CDS every time the housekeeping data or results data changes. For this reason, results tables and housekeeping are only updated in the CDS if the application is shut down by cFE Executive Services and exits cleanly. When the application starts, it will check a "saved on exit" flag in the data restored from CDS to see if the data is good. If not, it will be reset to initialization values.

+

The detailed sequence for a CDS restore on application startup (with failure cases) is as follows:

+

1) Try to restore Watchpoint Definition Table from CDS If FAILS Load default Watchpoint Definition Table from filesystem Load default Actionpoint Definition Table from filesystem Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

+

2) If 1 succeeded, try to restore Actionpoint Definition Table from CDS If FAILS Load default Watchpoint Definition Table from filesystem Load default Actionpoint Definition Table from filesystem Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

+

3) If 1 and 2 succeeded, try to restore Watchpoint Results Table from CDS If FAILS Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

+

4) If 1 - 3 succeeded, try to restore Actionpoint Results Table from CDS If FAILS Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

+

5) If 1 - 4 succeeded, try to restore Application data (housekeeping variables) from CDS If FAILS Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

+

6) If 1 - 5 succeeded, check "save on exit" flag in application data restored in 5 IF not set to "SAVED" (meaning we updated on exit) Clear Watchpoint Results Table to init values Clear Actionpoint Results Table to init values Clear Housekeeping variables to init values

+

Prev: CFS Limit Checker Operational Constraints

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslcintro.html b/docs/users_guide/html/cfslcintro.html index 1db4846..1788e03 100644 --- a/docs/users_guide/html/cfslcintro.html +++ b/docs/users_guide/html/cfslcintro.html @@ -1,120 +1,214 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Introduction - - - - -
-
- -

CFS Limit Checker Introduction

Scope

-

-This document provides a complete specification for the commands and telemetry associated with the CFS Limit Checker (LC) application software. The document is intended primarily for users of the software (operations personal, test engineers, and maintenance personnel). The last section of the document, the deployment guide section, is intended for mission developers when deploying and configuring the FM application software for a mission flight software build environment.

-

Applicable Documents

-

- - - - - - - - - -
Document ID Document Title
582-2008-011 CFS Limit Checker Application Requirements Document
TBD CFS Limit Checker Heritage Analysis Document
TBD CFS Limit Checker Design Document
-

-

Acronyms

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Acronym Description
API Application Programming Interface
ATP Absolute Time Processor
ATS Absolute Time tagged command Sequence
CCSDS Consultative Committee for Space Data Systems
C&DH Command and Data Handling
CFE Core Flight Executive
CFS Core Flight System
CI Command Ingest
Cmd Command
CPU Central Processing Unit
EDAC Error Detection and Correction
FDS Flight Data System
FM File Manager
FSW Flight Software
GN&C Guidance Navigation & Control
GSFC Goddard Space Flight Center
HK Housekeeping
HW, H/W Hardware
ICD Interface Control Document
ISR Interrupt Service Routine
LC CFS Limit Checker
OS Operating System
OSAL Operating System Abstraction Layer
Pkts Packets
RAM Random-Access Memory
RTOS Real Time Operating System
RTP Relative Time Processor
RTS Relative Time tagged command Sequence
SB Software Bus Service
SBC Single Board Computer
SC Stored Commands task
SW, S/W Software
TBD To Be Determined
TBL Table
TDM Time Data Multiplex
TLM Telemetry
UTC Universal time code
-

-Next: CFS Limit Checker Overview
- Prev: CFS Limit Checker User's Guide Revision History


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Introduction + + + + + + +
+ + +

CFS Limit Checker Introduction

Scope

+

This document provides a complete specification for the commands and telemetry associated with the CFS Limit Checker (LC) application software. The document is intended primarily for users of the software (operations personal, test engineers, and maintenance personnel). The last section of the document, the deployment guide section, is intended for mission developers when deploying and configuring the LC application software for a mission flight software build environment.

+

Applicable Documents

+ + + + + + + + + + + +

Document ID

+

Document Title

+

582-2008-011

+

CFS Limit Checker Application Requirements Document

+

TBD

+

CFS Limit Checker Heritage Analysis Document

+

TBD

+

CFS Limit Checker Design Document

+

582-2012-004

+

CFS Limit Checker Application User's Guide

+
+

Acronyms

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Acronym

+

Description

+

API

+

Application Programming Interface

+

ATP

+

Absolute Time Processor

+

ATS

+

Absolute Time tagged command Sequence

+

CCSDS

+

Consultative Committee for Space Data Systems

+

C&DH

+

Command and Data Handling

+

CFE

+

Core Flight Executive

+

CFS

+

Core Flight System

+

CI

+

Command Ingest

+

Cmd

+

Command

+

CPU

+

Central Processing Unit

+

EDAC

+

Error Detection and Correction

+

FDS

+

Flight Data System

+

FM

+

File Manager

+

FSW

+

Flight Software

+

GN&C

+

Guidance Navigation & Control

+

GSFC

+

Goddard Space Flight Center

+

HK

+

Housekeeping

+

HW, H/W

+

Hardware

+

ICD

+

Interface Control Document

+

ISR

+

Interrupt Service Routine

+

LC

+

CFS Limit Checker

+

OS

+

Operating System

+

OSAL

+

Operating System Abstraction Layer

+

Pkts

+

Packets

+

RAM

+

Random-Access Memory

+

RTOS

+

Real Time Operating System

+

RTP

+

Relative Time Processor

+

RTS

+

Relative Time tagged command Sequence

+

SB

+

Software Bus Service

+

SBC

+

Single Board Computer

+

SC

+

Stored Commands task

+

SW, S/W

+

Software

+

TBD

+

To Be Determined

+

TBL

+

Table

+

TDM

+

Time Data Multiplex

+

TLM

+

Telemetry

+

UTC

+

Universal time code

+
+

Next: CFS Limit Checker Overview
+ Prev: CFS Limit Checker User's Guide Revision History

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslcopr.html b/docs/users_guide/html/cfslcopr.html index 78f225e..b0119fb 100644 --- a/docs/users_guide/html/cfslcopr.html +++ b/docs/users_guide/html/cfslcopr.html @@ -1,38 +1,50 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Operation - - - - -
-
- -

CFS Limit Checker Operation

The CFS Limit Checker has three modes of operation, set by the LC_SET_LC_STATE_CC ground command and echoed in the CurrentLCState housekeeping variable.

-Active - Active mode is the normal operation mode. In Active mode, the LC task performs all limit tests defined in the watchpoint definition table and will invoke stored command sequences if the results of watchpoint evaluations trigger an actionpoint condition as defined in the actionpoint definition table.

-Passive - In Passive mode, the LC task behaves just like in Active mode except no stored command sequences will be invoked as a result of actionpoint triggers.

-Disabled - When disabled, the LC task will perform no watchpoint or actionpoint limit tests.

-Watchpoints are evaluated whenever a message containing the telemetry point is received by LC. Watchpoints may evaluate to LC_WATCH_TRUE, LC_WATCH_FALSE, LC_WATCH_NOT_MEASURED or LC_WATCH_ERROR. Watchpoints can not be individually disabled. The only ways to keep Watchpoints from being evaluated are to squelch the telemetry packet on which they trigger, load a WDT that undefines a Watchpoint or disable the entire LC task.

-Actionpoints are evaluated whenever LC receives a message with the LC_SAMPLE_AP_MID message ID. This message contains a parameter indicating which actionpoint to evaluate. A single actionpoint can be specified by using the actionpoint ID (0 to LC_MAX_ACTIONPOINTS). All actionpoints can be evaluated by specifying xFFFF as the parameter. There is no way to evaluate multiple actionpoints other than ALL within a single message. An Actionpoint defines a logical relationship between one or more Watchpoint results. This logical relationship is defined in the form of a Reverse Polish Notation (RPN) expression in the actionpoint definition specified in the ADT. The result of this RPN evaluation is either LC_ACTION_PASS, LC_ACTION_FAIL, LC_ACTION_NOT_MEASURED or LC_ACTION_ERROR. In the Actionpoint definition, a maximum number of consecutive fails is specified. If an Actionpoint fails the specified number of times consecutively, LC sends a request to the Stored Command (SC) application to execute a RTS (Relative Time Sequence) of commands as a response to this condition.

-Actionpoints can be individually enabled/disabled with the LC_SET_AP_STATE_CC ground command. The state of an actionpoint may be set to LC_APSTATE_ACTIVE, LC_APSTATE_PASSIVE, or LC_APSTATE_DISABLED. These states operate in the same way as the application operating modes described above. LC_APSTATE_PASSIVE will just disable RTS requests, while LC_APSTATE_DISABLED will stop evaluation of the actionpoint all together. An additional state LC_APSTATE_PERMOFF which functions the same as LC_APSTATE_DISABLED but can only be changed via table load, can be set using the LC_SET_AP_PERMOFF_CC ground command (see CFS Limit Checker Frequently Asked Questions).

-An example of this watchpoint/actionpoint relationship is shown in the following diagram:

-LC_Monitor_Process.png -

LC Monitoring Process Example Diagram

-
-

-Since LC is a table driven application, it's behavior is dictated by the contents of the WDT and ADT configuration tables. To change this behavior is simply a matter of loading a new table with modified parameters. LC will check for any pending table updates whenever it processes a housekeeping request. If the table passes validation it will go into effect right away before the next message is read from the software bus. It is not necessary to disable LC before updating a table, however since the watchpoint and actionpoint definitions use two separate tables, careful attention needs to be paid to ensure that the tables are consistent with each other whenever LC is active. For this reason, a mission may choose to always disable LC prior to any table updates and then re-enable monitoring.

-When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is reset to initialization values.

-Ideally, LC should require no intervention from the ground on a routine basis. Once monitoring is enabled, it will keep processing data and checking for threshold violations (assuming regular scheduler input).

-Next: CFS Limit Checker Requirements
- Prev: CFS Limit Checker Overview


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Operation + + + + + + +
+ + +

CFS Limit Checker Operation

The CFS Limit Checker has three modes of operation, set by the LC_SET_LC_STATE_CC ground command and echoed in the CurrentLCState housekeeping variable.

+

Active - Active mode is the normal operation mode. In Active mode, the LC task performs all limit tests defined in the watchpoint definition table and will invoke stored command sequences if the results of watchpoint evaluations trigger an actionpoint condition as defined in the actionpoint definition table.

+

Passive - In Passive mode, the LC task behaves just like in Active mode except no stored command sequences will be invoked as a result of actionpoint triggers.

+

Disabled - When disabled, the LC task will perform no watchpoint or actionpoint limit tests.

+

Watchpoints are evaluated whenever a message containing the telemetry point is received by LC. Watchpoints may evaluate to LC_WATCH_TRUE, LC_WATCH_FALSE, LC_WATCH_NOT_MEASURED or LC_WATCH_ERROR. Watchpoints can not be individually disabled. The only ways to keep Watchpoints from being evaluated are to squelch the telemetry packet on which they trigger, load a WDT that undefines a Watchpoint or disable the entire LC task.

+

Actionpoints are evaluated whenever LC receives a message with the LC_SAMPLE_AP_MID message ID. This message contains a parameter indicating which actionpoint to evaluate. A single actionpoint can be specified by using the actionpoint ID (0 to LC_MAX_ACTIONPOINTS). All actionpoints can be evaluated by specifying xFFFF as the parameter. There is no way to evaluate multiple actionpoints other than ALL within a single message. An Actionpoint defines a logical relationship between one or more Watchpoint results. This logical relationship is defined in the form of a Reverse Polish Notation (RPN) expression in the actionpoint definition specified in the ADT. The result of this RPN evaluation is either LC_ACTION_PASS, LC_ACTION_FAIL, LC_ACTION_NOT_MEASURED or LC_ACTION_ERROR. In the Actionpoint definition, a maximum number of consecutive fails is specified. If an Actionpoint fails the specified number of times consecutively, LC sends a request to the Stored Command (SC) application to execute a RTS (Relative Time Sequence) of commands as a response to this condition.

+

Actionpoints can be individually enabled/disabled with the LC_SET_AP_STATE_CC ground command. The state of an actionpoint may be set to LC_APSTATE_ACTIVE, LC_APSTATE_PASSIVE, or LC_APSTATE_DISABLED. These states operate in the same way as the application operating modes described above. LC_APSTATE_PASSIVE will just disable RTS requests, while LC_APSTATE_DISABLED will stop evaluation of the actionpoint all together. An additional state LC_APSTATE_PERMOFF which functions the same as LC_APSTATE_DISABLED but can only be changed via table load, can be set using the LC_SET_AP_PERMOFF_CC ground command (see CFS Limit Checker Frequently Asked Questions).

+

An example of this watchpoint/actionpoint relationship is shown in the following diagram:

+
+LC_Monitor_Process.png +

LC Monitoring Process Example Diagram

+


+

+

Since LC is a table driven application, it's behavior is dictated by the contents of the WDT and ADT configuration tables. To change this behavior is simply a matter of loading a new table with modified parameters. LC will check for any pending table updates whenever it processes a housekeeping request. If the table passes validation it will go into effect right away before the next message is read from the software bus. It is not necessary to disable LC before updating a table, however since the watchpoint and actionpoint definitions use two separate tables, careful attention needs to be paid to ensure that the tables are consistent with each other whenever LC is active. For this reason, a mission may choose to always disable LC prior to any table updates and then re-enable monitoring.

+

When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is reset to initialization values.

+

Ideally, LC should require no intervention from the ground on a routine basis. Once monitoring is enabled, it will keep processing data and checking for threshold violations (assuming regular scheduler input).

+

Next: CFS Limit Checker Requirements
+ Prev: CFS Limit Checker Overview

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslcovr.html b/docs/users_guide/html/cfslcovr.html index 84ae161..c1b9986 100644 --- a/docs/users_guide/html/cfslcovr.html +++ b/docs/users_guide/html/cfslcovr.html @@ -1,35 +1,47 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Overview - - - - -
-
- -

CFS Limit Checker Overview

The CFS Limit Checker (LC) application monitors telemetry data points in the flight system and compares the values against predefined threshold limits. When a threshold condition is encountered, an event message is issued and a Relative Time Sequence (RTS) command script may be initiated to respond to the threshold violation.

-LC is a table driven application. Monitoring and response configuration data is stored in definition tables that can be updated by the ground operators, while statistics on threshold violations are stored in dump-only results tables and summarized in housekeeping data.

-When processing beyond the standard comparison operators is needed, LC supports the use of custom evaluation functions that can be modified by a software patch or application update.

-Design Overview

-The LC design is built around two fundamental constructs. The Watchpoint and the Actionpoint.

-A Watchpoint defines a comparison between a piece of telemetry data and a pre-defined constant. Watchpoints are defined in the Watchpoint Definition Table (WDT). Statistics on watchpoint evaluations are stored in the Watchpoint Results Table (WRT) (see CFS Limit Checker Table Definitions). Watchpoints are evaluated whenever a message containing the telemetry point is received over the software bus by LC.

-An Actionpoint defines the response LC will take based upon the current state of one or more watchpoints. Actionpoints are defined in the Actionpoint Definition Table (ADT). Statistics on actionpoint evaluations are stored in the Actionpoint Results Table (ART) (see CFS Limit Checker Table Definitions). Actionpoints are evaluated whenever LC receives a message with the LC_SAMPLE_AP_MID message ID. This is not a ground command but an internal message that will normally come from the CFS scheduler (SCH) application.

-

-LC_Context.png -

LC Context Diagram

-
-

-Next: CFS Limit Checker Operation
- Prev: CFS Limit Checker Introduction


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Overview + + + + + + +
+ + +

CFS Limit Checker Overview

The CFS Limit Checker (LC) application monitors telemetry data points in the flight system and compares the values against predefined threshold limits. When a threshold condition is encountered, an event message is issued and a Relative Time Sequence (RTS) command script may be initiated to respond to the threshold violation.

+

LC is a table driven application. Monitoring and response configuration data is stored in definition tables that can be updated by the ground operators, while statistics on threshold violations are stored in dump-only results tables and summarized in housekeeping data.

+

When processing beyond the standard comparison operators is needed, LC supports the use of custom evaluation functions that can be modified by a software patch or application update.

+

+Design Overview

+

The LC design is built around two fundamental constructs. The Watchpoint and the Actionpoint.

+

A Watchpoint defines a comparison between a piece of telemetry data and a pre-defined constant. Watchpoints are defined in the Watchpoint Definition Table (WDT). Statistics on watchpoint evaluations are stored in the Watchpoint Results Table (WRT) (see CFS Limit Checker Table Definitions). Watchpoints are evaluated whenever a message containing the telemetry point is received over the software bus by LC.

+

An Actionpoint defines the response LC will take based upon the current state of one or more watchpoints. Actionpoints are defined in the Actionpoint Definition Table (ADT). Statistics on actionpoint evaluations are stored in the Actionpoint Results Table (ART) (see CFS Limit Checker Table Definitions). Actionpoints are evaluated whenever LC receives a message with the LC_SAMPLE_AP_MID message ID. This is not a ground command but an internal message that will normally come from the CFS scheduler (SCH) application.

+
+LC_Context.png +

LC Context Diagram

+


+

+

Next: CFS Limit Checker Operation
+ Prev: CFS Limit Checker Introduction

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslcreq.html b/docs/users_guide/html/cfslcreq.html index 083d73a..84894bc 100644 --- a/docs/users_guide/html/cfslcreq.html +++ b/docs/users_guide/html/cfslcreq.html @@ -1,24 +1,36 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Requirements - - - - -
-
- -

CFS Limit Checker Requirements

For detailed LC requirements, please see the "Core Flight System (CFS) Limit Checker Application Requirements" Document Number:582-2008-011

-Next: CFS Limit Checker Deployment Guide
- Prev: CFS Limit Checker Operation


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Requirements + + + + + + +
+ + +

CFS Limit Checker Requirements

For detailed LC requirements, please see the "Core Flight System (CFS) Limit + Checker Application Requirements" Document Number:582-2008-011

+

Next: CFS Limit Checker Deployment Guide
+ Prev: CFS Limit Checker Operation

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslcrevhist.html b/docs/users_guide/html/cfslcrevhist.html index 64b73fd..5f0f249 100644 --- a/docs/users_guide/html/cfslcrevhist.html +++ b/docs/users_guide/html/cfslcrevhist.html @@ -1,41 +1,57 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker User's Guide Revision History - - - - -
-
- -

CFS Limit Checker User's Guide Revision History

  $Log: cfslcrevhist.html  $
-

CFS Limit Checker User's Guide Revision History

  Revision 1.1 2015/03/04 16:48:54EST sstrege 
-

CFS Limit Checker User's Guide Revision History

  Initial revision
-

CFS Limit Checker User's Guide Revision History

  Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-  Revision 1.1 2012/07/31 16:53:28EDT nschweis 
-  Initial revision
-  Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/dox_src/users_guide/project.pj
-  Revision 1.7 2011/07/27 14:15:15EDT wmoleski 
-  Updated the Operation section to add more detail about actionpoint evaluation and added 2 new FAQs about 
-  ActionPoints.
-  Revision 1.6 2010/03/08 08:28:12EST wmoleski 
-  Updated the telemetry mnemonic mapping file and the User's Guide file.
-  Revision 1.5 2009/04/18 14:50:43EDT dkobe 
-  Cleaned up comments for users guide generation
-  Revision 1.4 2009/04/18 13:49:37EDT dkobe 
-  Corrected image links
-  Revision 1.3 2009/04/18 13:30:21EDT dkobe 
-  Standardized some content
-  

-Next: CFS Limit Checker Introduction


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker User's Guide Revision History + + + + + + +
+ + +

CFS Limit Checker User's Guide Revision History

+  $Log: cfslcrevhist.html  $
+  Revision 1.1 2017/08/25 14:44:15EDT sstrege 
+  Initial revision
+  Member added to project /CFS-APPs-PROJECT/lcx/docs/users_guide/html/project.pj
+  Revision 1.1.2.1 2017/08/07 14:38:03EDT sstrege 
+  
+  Revision 1.1 2015/07/26 15:40:18EDT rperera 
+  Initial revision
+  Member added to project /CFS-APPs-PROJECT/lcx/docs/dox_src/users_guide/project.pj
+  Revision 1.1 2012/07/31 16:53:28EDT nschweis 
+  Initial revision
+  Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/dox_src/users_guide/project.pj
+  Revision 1.7 2011/07/27 14:15:15EDT wmoleski 
+  Updated the Operation section to add more detail about actionpoint evaluation and added 2 new FAQs about 
+  ActionPoints.
+  Revision 1.6 2010/03/08 08:28:12EST wmoleski 
+  Updated the telemetry mnemonic mapping file and the User's Guide file.
+  Revision 1.5 2009/04/18 14:50:43EDT dkobe 
+  Cleaned up comments for users guide generation
+  Revision 1.4 2009/04/18 13:49:37EDT dkobe 
+  Corrected image links
+  Revision 1.3 2009/04/18 13:30:21EDT dkobe 
+  Standardized some content
+  

Next: CFS Limit Checker Introduction

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslctbl.html b/docs/users_guide/html/cfslctbl.html index aa78d59..812103d 100644 --- a/docs/users_guide/html/cfslctbl.html +++ b/docs/users_guide/html/cfslctbl.html @@ -1,206 +1,336 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Table Definitions - - - - - - -

CFS Limit Checker Table Definitions

Next: CFS Limit Checker Configuration Parameters
- Prev: CFS Limit Checker Telemetry
-

- - - -
CFS Limit Checker Commands CFS Limit Checker Telemetry CFS Limit Checker Configuration Parameters
-

-
-
-

Watchpoint Definition Table (WDT)

-

-The structure of a single watchpoint definition is defined by LC_WDTEntry_t. The WDT is an array of these entries sized by the configuration parameter LC_MAX_WATCHPOINTS. The zero based index into this table is used by LC as the Watchpoint ID.

-Brief description of WDT fields: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DataType Watchpoint Data Type. Enumerated type that must be one of the following:
LC_WATCH_NOT_USED Used to mark unused entries
LC_DATA_BYTE, LC_DATA_UBYTE Signed or unsigned byte
LC_DATA_WORD_BE, LC_DATA_WORD_LE Signed word, big or little endian
LC_DATA_UWORD_BE, LC_DATA_UWORD_LE Unsigned word, big or little endian
LC_DATA_DWORD_BE, LC_DATA_DWORD_LE Signed double word, big or little endian
LC_DATA_UDWORD_BE, LC_DATA_UDWORD_LE Unsized double word, big or little endian
LC_DATA_FLOAT_BE, LC_DATA_FLOAT_BE 32 bit float, big or little endian

-

OperatorIDComparison type. Enumerated type that must be one of the following:
LC_NO_OPER Can be used for unused entries (optional)
LC_OPER_LT, LC_OPER_LE Less Than, Less Than or Equal
LC_OPER_NE, LC_OPER_EQ Not Equal, Equal
LC_OPER_GT, LC_OPER_GE Greater Than, Greater Than or Equal
LC_OPER_CUSTOM No compare, call custom function

-

MessageIDMessage ID for the message containing the watchpoint

-

WatchpointOffsetZero based byte offset from the beginning of the message (including any headers) to the first byte of the watchpoint data

-

BitMaskValue to be masked with watchpoint data prior to comparison. Use the constant LC_NO_BITMASK when no masking is desired

-

ComparisonValueValue watchpoint data is to be compared against. This field uses the LC_MultiType_t union to store different data types in a fixed 32-bit field. See lc_def_wdt.c for examples of how to set this value.

-

CustomFuncArgumentOptional 32 bit data to be passed to the custom function. Can be used for any mission-defined purpose.
-

-
-
-

Actionpoint Definition Table (ADT)

-

-The structure of a single actionpoint definition is defined by LC_ADTEntry_t. The ADT is an array of these entries sized by the configuration parameter LC_MAX_ACTIONPOINTS. The zero based index into this table is used by LC as the Actionpoint ID.

-Brief description of ADT fields:
-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DefaultState Default (initial) state for this AP. Enumerated type that must be one of the following:
LC_ACTION_NOT_USEDUsed to mark unused entries
LC_APSTATE_ACTIVE, LC_APSTATE_PASSIVE, LC_APSTATE_DISABLED

-

MaxPassiveEventsHow may events to issue before filtering occurs for an RTS not started because the AP is Passive

-

MaxPassFailEventsHow may events to issue before filtering occurs for the AP result transition from pass to fail

-

MaxFailPassEventsHow may events to issue before filtering occurs for the AP result transition from fail to pass

-

RTSIdRTS to request if this AP fails

-

MaxFailsBeforeRTSHow may consecutive failures before an RTS request is sent

-

RPNEquation [LC_MAX_RPN_EQU_SIZE]Reverse Polish Equation that specifies when this actionpoint should fail. Combination of Watchpoint IDs and the following enumerated RPN operators:
LC_RPN_AND, LC_RPN_OR, LC_RPN_XOR, LC_RPN_NOT, LC_RPN_EQUAL
See lc_def_adt.c for examples of how to construct this expression

-

EventTypeEvent type used for event message if AP fails. Enumerated type that must be one of the following:
CFE_EVS_INFORMATION, CFE_EVS_DEBUG, CFE_EVS_ERROR, CFE_EVS_CRITICAL

-

EventIDEvent ID used for event message if AP fails

-

EventText[LC_MAX_ACTION_TEXT]Text used for the event msg when this AP fails LC appends the trailer text /LC_AP_EVENT_TAIL_STR to this string when reporting actionpoint failures.
-

-
-
-

Watchpoint Results Table (WRT)

-

-The structure of a single watchpoint results table entry is defined by LC_WRTEntry_t. The WRT is an array of these entries sized by the configuration parameter LC_MAX_WATCHPOINTS. The index into this table is the same Watchpoint ID used for the corresponding definition table entry.

-Brief description of WRT fields:
- - - - - - - - - - - - - - - - - -
WatchResultResult for the last evaluation of this watchpoint. Enumerated type that will be one of the following:
LC_WATCH_TRUE, LC_WATCH_FALSE, LC_WATCH_NOT_MEASURED, LC_WATCH_ERROR

-

EvaluationCountHow many times this watchpoint has been evaluated

-

FalseToTrueCountHow many times this watchpoint has transitioned from LC_WATCH_FALSE to LC_WATCH_TRUE

-

ConsecutiveTrueCountNumber of consecutive times this watchpoint has evaluated to LC_WATCH_TRUE

-

CumulativeTrueCountTotal number of times this watchpoint has evaluated to LC_WATCH_TRUE

-

LastFalseToTrueWatchpoint value and timestamp at the last transition from LC_WATCH_FALSE (or LC_WATCH_NOT_MEASURED) to LC_WATCH_TRUE

-

LastTrueToFalseWatchpoint value and timestamp at the last transition from LC_WATCH_TRUE to LC_WATCH_FALSE
-

-The timestamp used for the LastFalseToTrue and LastTrueToFalse fields is taken from the header of the message that contained the watchpoint. If the message timestamp is zero, LC will use the time returned by the CFE_TIME_GetTime function instead.

-
-
-

Actionpoint Results Table (ART)

-

-The structure of a single actionpoint results table entry is defined by LC_ARTEntry_t. The ART is an array of these entries sized by the configuration parameter LC_MAX_ACTIONPOINTS. The index into this table is the same Actionpoint ID used for the corresponding definition table entry.

-Brief description of ART fields:
-

- - - - - - - - - - - - - - - - - - - - - -
ActionResultResult for the last sample of this actionpoint. Enumerated type that will be one of the following:
LC_ACTION_PASS, LC_ACTION_FAIL, LC_ACTION_NOT_MEASURED, LC_ACTION_ERROR

-

CurrentStateCurrent state of this actionpoint. Enumerated type that will be one of the following:
LC_ACTION_NOT_USED, LC_APSTATE_ACTIVE, LC_APSTATE_PASSIVE, LC_APSTATE_DISABLED, LC_APSTATE_PERMOFF

-

PassiveAPCountHow many times this actionpoint's RTS has not been invoked because the AP was passive.

-

FailToPassCountHow many times this actionpoint has transitioned from LC_ACTION_FAIL to LC_ACTION_PASS

-

PassToFailCountHow many times this actionpoint has transitioned from LC_ACTION_PASS to LC_ACTION_FAIL

-

ConsecutiveFailCountNumber of consecutive times this actionpoint has evaluated LC_ACTION_FAIL

-

CumulativeFailCountTotal number of times this actionpoint has evaluated to LC_ACTION_FAIL

-

CumulativeRTSExecCountTotal number of times an RTS request has been sent for this actionpoint
-

-
-
-

-The entire WDT is searched anytime a message is received that may contain watchpoints. For this reason, it is important that unused entries are properly marked by setting the WDT parameter DataType to LC_WATCH_NOT_USED.

-The entire ADT is processed anytime a sample request is received that specifies an actionpoint equal to LC_ALL_ACTIONPOINTS. For this reason, it is important that unused entries are properly marked by setting the ADT parameter DefaultState to LC_ACTION_NOT_USED.

-When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is reset to initialization values. For each entry in the WRT, WatchResult is set to LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, ActionResult is set to LC_ACTION_NOT_MEASURED, the CurrentState is set to the value of the actionpoint's DefaultState specified in the ADT, and all other values are zeroed.

-These are also the values used (for the entries specified in the command) when the LC_RESET_AP_STATS_CC or LC_RESET_WP_STATS_CC ground command is received.


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Table Definitions + + + + + + +
+ + +

CFS Limit Checker Table Definitions

Next: CFS Limit Checker Configuration Parameters
+ Prev: CFS Limit Checker Telemetry
+

+ + + +

CFS Limit Checker Commands

+

CFS Limit Checker Telemetry

+

CFS Limit Checker Configuration Parameters

+
+


+
+

+

Watchpoint Definition Table (WDT)

+

The structure of a single watchpoint definition is defined by LC_WDTEntry_t. The WDT is an array of these entries sized by the configuration parameter LC_MAX_WATCHPOINTS. The zero based index into this table is used by LC as the Watchpoint ID.

+

Brief description of WDT fields:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

DataType

+

Watchpoint Data Type. Enumerated type that must be one of the following:

+

+

+

LC_WATCH_NOT_USED

+

Used to mark unused entries

+

+

LC_DATA_BYTE, LC_DATA_UBYTE

+

Signed or unsigned byte

+

+

LC_DATA_WORD_BE, LC_DATA_WORD_LE

+

Signed word, big or little endian

+

+

LC_DATA_UWORD_BE, LC_DATA_UWORD_LE

+

Unsigned word, big or little endian

+

+

LC_DATA_DWORD_BE, LC_DATA_DWORD_LE

+

Signed double word, big or little endian

+

+

LC_DATA_UDWORD_BE, LC_DATA_UDWORD_LE

+

Unsized double word, big or little endian

+

+

LC_DATA_FLOAT_BE, LC_DATA_FLOAT_BE

+

32 bit float, big or little endian

+

+

OperatorID

+

Comparison type. Enumerated type that must be one of the following:

+

+

LC_NO_OPER

+

Can be used for unused entries (optional)

+

+

LC_OPER_LT, LC_OPER_LE

+

Less Than, Less Than or Equal

+

+

LC_OPER_NE, LC_OPER_EQ

+

Not Equal, Equal

+

+

LC_OPER_GT, LC_OPER_GE

+

Greater Than, Greater Than or Equal

+

+

LC_OPER_CUSTOM

+

No compare, call custom function

+

+

MessageID

+

Message ID for the message containing the watchpoint

+

+

WatchpointOffset

+

Zero based byte offset from the beginning of the message (including any headers) to the first byte of the watchpoint data

+

+

BitMask

+

Value to be masked with watchpoint data prior to comparison. Use the constant LC_NO_BITMASK when no masking is desired

+

+

ComparisonValue

+

Value watchpoint data is to be compared against. This field uses the LC_MultiType_t union to store different data types in a fixed 32-bit field. See lc_def_wdt.c for examples of how to set this value.

+

+

CustomFuncArgument

+

Optional 32 bit data to be passed to the custom function. Can be used for any mission-defined purpose.

+
+


+
+

+

Actionpoint Definition Table (ADT)

+

The structure of a single actionpoint definition is defined by LC_ADTEntry_t. The ADT is an array of these entries sized by the configuration parameter LC_MAX_ACTIONPOINTS. The zero based index into this table is used by LC as the Actionpoint ID.

+

Brief description of ADT fields:
+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

DefaultState

+

Default (initial) state for this AP. Enumerated type that must be one of the following:

+

+

+

LC_ACTION_NOT_USED

+

Used to mark unused entries

+

+

LC_APSTATE_ACTIVE, LC_APSTATE_PASSIVE, LC_APSTATE_DISABLED

+

+

MaxPassiveEvents

+

How may events to issue before filtering occurs for an RTS not started because the AP is Passive

+

+

MaxPassFailEvents

+

How may events to issue before filtering occurs for the AP result transition from pass to fail

+

+

MaxFailPassEvents

+

How may events to issue before filtering occurs for the AP result transition from fail to pass

+

+

RTSId

+

RTS to request if this AP fails

+

+

MaxFailsBeforeRTS

+

How may consecutive failures before an RTS request is sent

+

+

RPNEquation [LC_MAX_RPN_EQU_SIZE]

+

Reverse Polish Equation that specifies when this actionpoint should fail. Combination of Watchpoint IDs and the following enumerated RPN operators:

+

+

LC_RPN_AND, LC_RPN_OR, LC_RPN_XOR, LC_RPN_NOT, LC_RPN_EQUAL

+

+

See lc_def_adt.c for examples of how to construct this expression

+

+

EventType

+

Event type used for event message if AP fails. Enumerated type that must be one of the following:

+

+

CFE_EVS_INFORMATION, CFE_EVS_DEBUG, CFE_EVS_ERROR, CFE_EVS_CRITICAL

+

+

EventID

+

Event ID used for event message if AP fails

+

+

EventText[LC_MAX_ACTION_TEXT]

+

Text used for the event msg when this AP fails LC appends the trailer text /LC_AP_EVENT_TAIL_STR to this string when reporting actionpoint failures.

+
+


+
+

+

Watchpoint Results Table (WRT)

+

The structure of a single watchpoint results table entry is defined by LC_WRTEntry_t. The WRT is an array of these entries sized by the configuration parameter LC_MAX_WATCHPOINTS. The index into this table is the same Watchpoint ID used for the corresponding definition table entry.

+

Brief description of WRT fields:
+

+ + + + + + + + + + + + + + + + + +

WatchResult

+

Result for the last evaluation of this watchpoint. Enumerated type that will be one of the following:

+

+

LC_WATCH_TRUE, LC_WATCH_FALSE, LC_WATCH_NOT_MEASURED, LC_WATCH_ERROR

+

+

EvaluationCount

+

How many times this watchpoint has been evaluated

+

+

FalseToTrueCount

+

How many times this watchpoint has transitioned from LC_WATCH_FALSE to LC_WATCH_TRUE

+

+

ConsecutiveTrueCount

+

Number of consecutive times this watchpoint has evaluated to LC_WATCH_TRUE

+

+

CumulativeTrueCount

+

Total number of times this watchpoint has evaluated to LC_WATCH_TRUE

+

+

LastFalseToTrue

+

Watchpoint value and timestamp at the last transition from LC_WATCH_FALSE (or LC_WATCH_NOT_MEASURED) to LC_WATCH_TRUE

+

+

LastTrueToFalse

+

Watchpoint value and timestamp at the last transition from LC_WATCH_TRUE to LC_WATCH_FALSE

+
+

The timestamp used for the LastFalseToTrue and LastTrueToFalse fields is taken from the header of the message that contained the watchpoint. If the message timestamp is zero, LC will use the time returned by the CFE_TIME_GetTime function instead.

+


+
+

+

Actionpoint Results Table (ART)

+

The structure of a single actionpoint results table entry is defined by LC_ARTEntry_t. The ART is an array of these entries sized by the configuration parameter LC_MAX_ACTIONPOINTS. The index into this table is the same Actionpoint ID used for the corresponding definition table entry.

+

Brief description of ART fields:
+

+ + + + + + + + + + + + + + + + + + + + + +

ActionResult

+

Result for the last sample of this actionpoint. Enumerated type that will be one of the following:

+

+

LC_ACTION_PASS, LC_ACTION_FAIL, LC_ACTION_NOT_MEASURED, LC_ACTION_ERROR

+

+

CurrentState

+

Current state of this actionpoint. Enumerated type that will be one of the following:

+

+

LC_ACTION_NOT_USED, LC_APSTATE_ACTIVE, LC_APSTATE_PASSIVE, LC_APSTATE_DISABLED, LC_APSTATE_PERMOFF

+

+

PassiveAPCount

+

How many times this actionpoint's RTS has not been invoked because the AP was passive.

+

+

FailToPassCount

+

How many times this actionpoint has transitioned from LC_ACTION_FAIL to LC_ACTION_PASS

+

+

PassToFailCount

+

How many times this actionpoint has transitioned from LC_ACTION_PASS to LC_ACTION_FAIL

+

+

ConsecutiveFailCount

+

Number of consecutive times this actionpoint has evaluated LC_ACTION_FAIL

+

+

CumulativeFailCount

+

Total number of times this actionpoint has evaluated to LC_ACTION_FAIL

+

+

CumulativeRTSExecCount

+

Total number of times an RTS request has been sent for this actionpoint

+
+


+
+

+

The entire WDT is searched anytime a message is received that may contain watchpoints. For this reason, it is important that unused entries are properly marked by setting the WDT parameter DataType to LC_WATCH_NOT_USED.

+

The entire ADT is processed anytime a sample request is received that specifies an actionpoint equal to LC_ALL_ACTIONPOINTS. For this reason, it is important that unused entries are properly marked by setting the ADT parameter DefaultState to LC_ACTION_NOT_USED.

+

When either the WDT or ADT are updated, the corresponding results table (WRT or ART) is reset to initialization values. For each entry in the WRT, WatchResult is set to LC_WATCH_NOT_MEASURED and all other values are zeroed. For each entry in the ART, ActionResult is set to LC_ACTION_NOT_MEASURED, the CurrentState is set to the value of the actionpoint's DefaultState specified in the ADT, and all other values are zeroed.

+

These are also the values used (for the entries specified in the command) when the LC_RESET_AP_STATS_CC or LC_RESET_WP_STATS_CC ground command is received.

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslctlm.html b/docs/users_guide/html/cfslctlm.html index f75d830..bfb4e63 100644 --- a/docs/users_guide/html/cfslctlm.html +++ b/docs/users_guide/html/cfslctlm.html @@ -1,35 +1,48 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker Telemetry - - - - - - -

CFS Limit Checker Telemetry

Next: CFS Limit Checker Table Definitions
- Prev: CFS Limit Checker Commands
-

- - - -
CFS Limit Checker Commands CFS Limit Checker Table Definitions CFS Limit Checker Configuration Parameters
-

-The following is a list of telemetry that is generated by the CFS Limit Checker Application:

-

-
Class LC_HkPacket_t
-
Housekeeping Packet Structure
-
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker Telemetry + + + + + + +
+ + +

CFS Limit Checker Telemetry

Next: CFS Limit Checker Table Definitions
+ Prev: CFS Limit Checker Commands
+

+ + + +

CFS Limit Checker Commands

+

CFS Limit Checker Table Definitions

+

CFS Limit Checker Configuration Parameters

+
+

The following is a list of telemetry that is generated by the CFS Limit Checker Application:

+

+
+
Class LC_HkPacket_t
+
Housekeeping Packet Structure
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/cfslctlmmnems.html b/docs/users_guide/html/cfslctlmmnems.html index 447e043..e206b94 100644 --- a/docs/users_guide/html/cfslctlmmnems.html +++ b/docs/users_guide/html/cfslctlmmnems.html @@ -1,74 +1,85 @@ - - -CFS Limit Checker Application on User's Guide: LC Telemetry Mnemonic Cross Reference - - - - - -

LC Telemetry Mnemonic Cross Reference

-
Global LC_HkPacket_t::ActiveAPs
-
$sc_$cpu_LC_ActiveAPs
-
-

-

-
Global LC_HkPacket_t::APResults [LC_HKAR_NUM_BYTES]
-
$sc_$cpu_LC_APResults
-
-

-

-
Global LC_HkPacket_t::APSampleCount
-
$sc_$cpu_LC_APSampleCnt
-
-

-

-
Global LC_HkPacket_t::CmdCount
-
$sc_$cpu_LC_CMDPC
-
-

-

-
Global LC_HkPacket_t::CmdErrCount
-
$sc_$cpu_LC_CMDEC
-
-

-

-
Global LC_HkPacket_t::CurrentLCState
-
$sc_$cpu_LC_CurrentLCState
-
-

-

-
Global LC_HkPacket_t::MonitoredMsgCount
-
$sc_$cpu_LC_MonMsgCnt
-
-

-

-
Global LC_HkPacket_t::PassiveRTSExecCount
-
$sc_$cpu_LC_PassRTSCnt
-
-

-

-
Global LC_HkPacket_t::RTSExecCount
-
$sc_$cpu_LC_RTSCnt
-
-

-

-
Global LC_HkPacket_t::WPResults [LC_HKWR_NUM_BYTES]
-
$sc_$cpu_LC_WPResults
-
-

-

-
Global LC_HkPacket_t::WPsInUse
-
$sc_$cpu_LC_WPsInUse
-
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC Telemetry Mnemonic Cross Reference + + + + + + +
+ + +

LC Telemetry Mnemonic Cross Reference

+
+
Global LC_HkPacket_t::ActiveAPs
+
$sc_$cpu_LC_ActiveAPs
+
+

+
+
Global LC_HkPacket_t::APResults [LC_HKAR_NUM_BYTES]
+
$sc_$cpu_LC_APResults
+
+

+
+
Global LC_HkPacket_t::APSampleCount
+
$sc_$cpu_LC_APSampleCnt
+
+

+
+
Global LC_HkPacket_t::CmdCount
+
$sc_$cpu_LC_CMDPC
+
+

+
+
Global LC_HkPacket_t::CmdErrCount
+
$sc_$cpu_LC_CMDEC
+
+

+
+
Global LC_HkPacket_t::CurrentLCState
+
$sc_$cpu_LC_CurrentLCState
+
+

+
+
Global LC_HkPacket_t::MonitoredMsgCount
+
$sc_$cpu_LC_MonMsgCnt
+
+

+
+
Global LC_HkPacket_t::PassiveRTSExecCount
+
$sc_$cpu_LC_PassRTSCnt
+
+

+
+
Global LC_HkPacket_t::RTSExecCount
+
$sc_$cpu_LC_RTSCnt
+
+

+
+
Global LC_HkPacket_t::WPResults [LC_HKWR_NUM_BYTES]
+
$sc_$cpu_LC_WPResults
+
+

+
+
Global LC_HkPacket_t::WPsInUse
+
$sc_$cpu_LC_WPsInUse
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/classes.html b/docs/users_guide/html/classes.html index c4589e2..b2bd72c 100644 --- a/docs/users_guide/html/classes.html +++ b/docs/users_guide/html/classes.html @@ -1,30 +1,39 @@ - - -CFS Limit Checker Application on User's Guide: Alphabetical List - - - - - - -

CFS Limit Checker Application on User's Guide Data Structure Index

- -
  L  
-
LC_HkPacket_t   LC_ResetAPStats_t   LC_SetAPPermOff_t   LC_WDTEntry_t   
LC_ADTEntry_t   LC_MultiType_t   LC_ResetWPStats_t   LC_SetAPState_t   LC_WRTEntry_t   
LC_ARTEntry_t   LC_NoArgsCmd_t   LC_SampleAP_t   LC_SetLCState_t   LC_WRTTransition_t   

-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: Alphabetical List + + + + + + + +
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_000001_000003.html b/docs/users_guide/html/dir_000001_000003.html index 994b69a..229085c 100644 --- a/docs/users_guide/html/dir_000001_000003.html +++ b/docs/users_guide/html/dir_000001_000003.html @@ -1,22 +1,30 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/ -> mnt Relation - - - - - - -

fsw → mnt Relation

File in lc » fswIncludes file in mnt
src / lc_msgdefs.hdisk2 / sstrege / MissionX / build / cpu1 / inc / lc_platform_cfg.h
src / lc_tbl.hdisk2 / sstrege / MissionX / build / cpu1 / inc / lc_platform_cfg.h

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/ -> mnt Relation + + + + + + +
+ +

fsw → mnt Relation

File in lc » fswIncludes file in mnt
src / lc_msgdefs.hdisk2 / sstrege / cFE650 / build / cpu1 / inc / lc_platform_cfg.h
src / lc_tbl.hdisk2 / sstrege / cFE650 / build / cpu1 / inc / lc_platform_cfg.h
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_000002_000003.html b/docs/users_guide/html/dir_000002_000003.html index fc7e633..72b8f09 100644 --- a/docs/users_guide/html/dir_000002_000003.html +++ b/docs/users_guide/html/dir_000002_000003.html @@ -1,22 +1,30 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/ -> mnt Relation - - - - - - -

src → mnt Relation

File in lc » fsw » srcIncludes file in mnt
lc_msgdefs.hdisk2 / sstrege / MissionX / build / cpu1 / inc / lc_platform_cfg.h
lc_tbl.hdisk2 / sstrege / MissionX / build / cpu1 / inc / lc_platform_cfg.h

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/ -> mnt Relation + + + + + + +
+ +

src → mnt Relation

File in lc » fsw » srcIncludes file in mnt
lc_msgdefs.hdisk2 / sstrege / cFE650 / build / cpu1 / inc / lc_platform_cfg.h
lc_tbl.hdisk2 / sstrege / cFE650 / build / cpu1 / inc / lc_platform_cfg.h
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_0a55bcd9e2b7de1e40fcc60b39c8ed56.html b/docs/users_guide/html/dir_0a55bcd9e2b7de1e40fcc60b39c8ed56.html deleted file mode 100644 index 92cd196..0000000 --- a/docs/users_guide/html/dir_0a55bcd9e2b7de1e40fcc60b39c8ed56.html +++ /dev/null @@ -1,38 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: lc/ Directory Reference - - - - - - -

lc Directory Reference

-

-

lc/
- - - - - - - - - - - - -

Directories

directory  fsw
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/dir_0a55bcd9e2b7de1e40fcc60b39c8ed56_dep.map b/docs/users_guide/html/dir_0a55bcd9e2b7de1e40fcc60b39c8ed56_dep.map deleted file mode 100644 index f3269bd..0000000 --- a/docs/users_guide/html/dir_0a55bcd9e2b7de1e40fcc60b39c8ed56_dep.map +++ /dev/null @@ -1,6 +0,0 @@ -base referer -rect dir_9e683df0e82342f54348f0f7e5c8ebad.html 27,37 99,85 -rect dir_b8d1739202f65d59e58cdec119e32197.html 27,133 99,181 -rect dir_000001_000003.html 59,129 67,137 -rect dir_000001_000003.html 67,107 75,122 -rect dir_0a55bcd9e2b7de1e40fcc60b39c8ed56.html 16,16 205,96 diff --git a/docs/users_guide/html/dir_0a55bcd9e2b7de1e40fcc60b39c8ed56_dep.png b/docs/users_guide/html/dir_0a55bcd9e2b7de1e40fcc60b39c8ed56_dep.png deleted file mode 100644 index 9b3102a..0000000 Binary files a/docs/users_guide/html/dir_0a55bcd9e2b7de1e40fcc60b39c8ed56_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_29e708ef10c4f27f99058ea13e4a7fb6.html b/docs/users_guide/html/dir_29e708ef10c4f27f99058ea13e4a7fb6.html new file mode 100644 index 0000000..c6e1825 --- /dev/null +++ b/docs/users_guide/html/dir_29e708ef10c4f27f99058ea13e4a7fb6.html @@ -0,0 +1,44 @@ + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/ Directory Reference + + + + + + +
+

src Directory Reference

+

+
+
+
+

+ + + + + + + +

Files

file  lc_events.h [code]
file  lc_msg.h [code]
file  lc_msgdefs.h [code]
file  lc_tbl.h [code]
file  lc_tbldefs.h [code]
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_29e708ef10c4f27f99058ea13e4a7fb6_dep.dot b/docs/users_guide/html/dir_29e708ef10c4f27f99058ea13e4a7fb6_dep.dot new file mode 100644 index 0000000..7abc3c7 --- /dev/null +++ b/docs/users_guide/html/dir_29e708ef10c4f27f99058ea13e4a7fb6_dep.dot @@ -0,0 +1,11 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_6ae45a2d4d8d4578dc813a6adc58d2d1 { + graph [ bgcolor="#ddddee", pencolor="black", label="fsw" fontname="FreeSans", fontsize="10", URL="dir_6ae45a2d4d8d4578dc813a6adc58d2d1.html"] + dir_29e708ef10c4f27f99058ea13e4a7fb6 [shape=box, label="src", style="filled", fillcolor="#eeeeff", pencolor="black", URL="dir_29e708ef10c4f27f99058ea13e4a7fb6.html"]; + } + dir_b8d1739202f65d59e58cdec119e32197 [shape=box label="mnt" fillcolor="white" style="filled" color="red" URL="dir_b8d1739202f65d59e58cdec119e32197.html"]; + dir_29e708ef10c4f27f99058ea13e4a7fb6->dir_b8d1739202f65d59e58cdec119e32197 [headlabel="2", labeldistance=1.5 headhref="dir_000002_000003.html"]; +} diff --git a/docs/users_guide/html/dir_2febe1bb0c221d1bdee545ca06dffea9.html b/docs/users_guide/html/dir_2febe1bb0c221d1bdee545ca06dffea9.html deleted file mode 100644 index cceef5b..0000000 --- a/docs/users_guide/html/dir_2febe1bb0c221d1bdee545ca06dffea9.html +++ /dev/null @@ -1,36 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/cpu1/ Directory Reference - - - - - - -

cpu1 Directory Reference

-

-

/mnt/disk2/sstrege/MissionX/build/cpu1/
- - - - - - - - - - -

Directories

directory  inc
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/dir_2febe1bb0c221d1bdee545ca06dffea9_dep.map b/docs/users_guide/html/dir_2febe1bb0c221d1bdee545ca06dffea9_dep.map deleted file mode 100644 index 993867e..0000000 --- a/docs/users_guide/html/dir_2febe1bb0c221d1bdee545ca06dffea9_dep.map +++ /dev/null @@ -1,4 +0,0 @@ -base referer -rect dir_b1f4d8b4dc8a83783c5fb27d56df8cd2.html 37,76 109,124 -rect dir_2febe1bb0c221d1bdee545ca06dffea9.html 27,55 216,135 -rect dir_547f1bcf83be6b5cb2c837107c1bcf18.html 16,16 227,145 diff --git a/docs/users_guide/html/dir_2febe1bb0c221d1bdee545ca06dffea9_dep.png b/docs/users_guide/html/dir_2febe1bb0c221d1bdee545ca06dffea9_dep.png deleted file mode 100644 index 5237e2e..0000000 Binary files a/docs/users_guide/html/dir_2febe1bb0c221d1bdee545ca06dffea9_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3.html b/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3.html index e180195..e965ccb 100644 --- a/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3.html +++ b/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3.html @@ -1,36 +1,40 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/ Directory Reference - - - - - - -

disk2 Directory Reference

-

-

/mnt/disk2/
- - - - - - - - - - -

Directories

directory  sstrege
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/ Directory Reference + + + + + + +
+

disk2 Directory Reference

+

+
+
+
+

+ + + +

Directories

directory  sstrege
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3_dep.dot b/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3_dep.dot new file mode 100644 index 0000000..b854853 --- /dev/null +++ b/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3_dep.dot @@ -0,0 +1,13 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_b8d1739202f65d59e58cdec119e32197 { + graph [ bgcolor="#ddddee", pencolor="black", label="mnt" fontname="FreeSans", fontsize="10", URL="dir_b8d1739202f65d59e58cdec119e32197.html"] + subgraph clusterdir_35def2882668f95914f1fd60fe8204e3 { + graph [ bgcolor="#eeeeff", pencolor="black", label="" URL="dir_35def2882668f95914f1fd60fe8204e3.html"]; + dir_35def2882668f95914f1fd60fe8204e3 [shape=plaintext label="disk2"]; + dir_5b47e9dc76266c8a2322068895bf2d86 [shape=box label="sstrege" color="red" fillcolor="white" style="filled" URL="dir_5b47e9dc76266c8a2322068895bf2d86.html"]; + } + } +} diff --git a/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3_dep.map b/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3_dep.map deleted file mode 100644 index b1f96ba..0000000 --- a/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3_dep.map +++ /dev/null @@ -1,4 +0,0 @@ -base referer -rect dir_5b47e9dc76266c8a2322068895bf2d86.html 37,76 109,124 -rect dir_35def2882668f95914f1fd60fe8204e3.html 27,55 216,135 -rect dir_b8d1739202f65d59e58cdec119e32197.html 16,16 227,145 diff --git a/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3_dep.png b/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3_dep.png deleted file mode 100644 index 6b3df42..0000000 Binary files a/docs/users_guide/html/dir_35def2882668f95914f1fd60fe8204e3_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_38017bb67386fc992b358f4a105dede2.html b/docs/users_guide/html/dir_38017bb67386fc992b358f4a105dede2.html new file mode 100644 index 0000000..5c06326 --- /dev/null +++ b/docs/users_guide/html/dir_38017bb67386fc992b358f4a105dede2.html @@ -0,0 +1,41 @@ + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/cpu1/inc/ Directory Reference + + + + + + +
+

inc Directory Reference

+

+
+
+
+

+ + + + +

Files

file  lc_msgids.h [code]
file  lc_platform_cfg.h [code]
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_38017bb67386fc992b358f4a105dede2_dep.dot b/docs/users_guide/html/dir_38017bb67386fc992b358f4a105dede2_dep.dot new file mode 100644 index 0000000..55de213 --- /dev/null +++ b/docs/users_guide/html/dir_38017bb67386fc992b358f4a105dede2_dep.dot @@ -0,0 +1,9 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_64dbcd1c3b53a6923a777e59188b2295 { + graph [ bgcolor="#ddddee", pencolor="black", label="cpu1" fontname="FreeSans", fontsize="10", URL="dir_64dbcd1c3b53a6923a777e59188b2295.html"] + dir_38017bb67386fc992b358f4a105dede2 [shape=box, label="inc", style="filled", fillcolor="#eeeeff", pencolor="black", URL="dir_38017bb67386fc992b358f4a105dede2.html"]; + } +} diff --git a/docs/users_guide/html/dir_53103ade7cfd4735c29f173207dfabcb.html b/docs/users_guide/html/dir_53103ade7cfd4735c29f173207dfabcb.html deleted file mode 100644 index 61a59ae..0000000 --- a/docs/users_guide/html/dir_53103ade7cfd4735c29f173207dfabcb.html +++ /dev/null @@ -1,37 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/mission_inc/ Directory Reference - - - - - - -

mission_inc Directory Reference

-

-

/mnt/disk2/sstrege/MissionX/build/mission_inc/
- - - - - - - - - - - -

Files

file  lc_mission_cfg.h [code]
file  lc_perfids.h [code]
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/dir_53103ade7cfd4735c29f173207dfabcb_dep.map b/docs/users_guide/html/dir_53103ade7cfd4735c29f173207dfabcb_dep.map deleted file mode 100644 index 37817ad..0000000 --- a/docs/users_guide/html/dir_53103ade7cfd4735c29f173207dfabcb_dep.map +++ /dev/null @@ -1,3 +0,0 @@ -base referer -rect dir_53103ade7cfd4735c29f173207dfabcb.html 27,55 123,103 -rect dir_547f1bcf83be6b5cb2c837107c1bcf18.html 16,16 133,113 diff --git a/docs/users_guide/html/dir_53103ade7cfd4735c29f173207dfabcb_dep.png b/docs/users_guide/html/dir_53103ade7cfd4735c29f173207dfabcb_dep.png deleted file mode 100644 index 72e425b..0000000 Binary files a/docs/users_guide/html/dir_53103ade7cfd4735c29f173207dfabcb_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_547f1bcf83be6b5cb2c837107c1bcf18.html b/docs/users_guide/html/dir_547f1bcf83be6b5cb2c837107c1bcf18.html deleted file mode 100644 index 692d94a..0000000 --- a/docs/users_guide/html/dir_547f1bcf83be6b5cb2c837107c1bcf18.html +++ /dev/null @@ -1,39 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/ Directory Reference - - - - - - -

build Directory Reference

-

-

/mnt/disk2/sstrege/MissionX/build/
- - - - - - - - - - - - - -

Directories

directory  cpu1
directory  mission_inc
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/dir_547f1bcf83be6b5cb2c837107c1bcf18_dep.map b/docs/users_guide/html/dir_547f1bcf83be6b5cb2c837107c1bcf18_dep.map deleted file mode 100644 index d7f47a3..0000000 --- a/docs/users_guide/html/dir_547f1bcf83be6b5cb2c837107c1bcf18_dep.map +++ /dev/null @@ -1,5 +0,0 @@ -base referer -rect dir_2febe1bb0c221d1bdee545ca06dffea9.html 157,76 229,124 -rect dir_53103ade7cfd4735c29f173207dfabcb.html 37,76 133,124 -rect dir_547f1bcf83be6b5cb2c837107c1bcf18.html 27,55 336,135 -rect dir_a0108e23c9261e484d576d30b20b3402.html 16,16 347,145 diff --git a/docs/users_guide/html/dir_547f1bcf83be6b5cb2c837107c1bcf18_dep.png b/docs/users_guide/html/dir_547f1bcf83be6b5cb2c837107c1bcf18_dep.png deleted file mode 100644 index f9a4172..0000000 Binary files a/docs/users_guide/html/dir_547f1bcf83be6b5cb2c837107c1bcf18_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_564057e99f82d0b145c681727cc5e426.html b/docs/users_guide/html/dir_564057e99f82d0b145c681727cc5e426.html deleted file mode 100644 index 7d8adf8..0000000 --- a/docs/users_guide/html/dir_564057e99f82d0b145c681727cc5e426.html +++ /dev/null @@ -1,46 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/ Directory Reference - - - - - - -

src Directory Reference

-

-

lc/fsw/src/
- - - - - - - - - - - - - - - - - - - - -

Files

file  lc_events.h [code]
file  lc_msg.h [code]
file  lc_msgdefs.h [code]
file  lc_tbl.h [code]
file  lc_tbldefs.h [code]
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/dir_564057e99f82d0b145c681727cc5e426_dep.map b/docs/users_guide/html/dir_564057e99f82d0b145c681727cc5e426_dep.map deleted file mode 100644 index 3925672..0000000 --- a/docs/users_guide/html/dir_564057e99f82d0b145c681727cc5e426_dep.map +++ /dev/null @@ -1,6 +0,0 @@ -base referer -rect dir_564057e99f82d0b145c681727cc5e426.html 27,55 99,103 -rect dir_b8d1739202f65d59e58cdec119e32197.html 27,151 99,199 -rect dir_000002_000003.html 59,147 67,155 -rect dir_000002_000003.html 67,125 75,139 -rect dir_9e683df0e82342f54348f0f7e5c8ebad.html 16,16 109,113 diff --git a/docs/users_guide/html/dir_564057e99f82d0b145c681727cc5e426_dep.png b/docs/users_guide/html/dir_564057e99f82d0b145c681727cc5e426_dep.png deleted file mode 100644 index 2c3cd50..0000000 Binary files a/docs/users_guide/html/dir_564057e99f82d0b145c681727cc5e426_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86.html b/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86.html index f16e65a..3697bb3 100644 --- a/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86.html +++ b/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86.html @@ -1,36 +1,40 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/ Directory Reference - - - - - - -

sstrege Directory Reference

-

-

/mnt/disk2/sstrege/
- - - - - - - - - - -

Directories

directory  MissionX
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/ Directory Reference + + + + + + +
+

sstrege Directory Reference

+

+
+
+
+

+ + + +

Directories

directory  cFE650
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86_dep.dot b/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86_dep.dot new file mode 100644 index 0000000..ff06ceb --- /dev/null +++ b/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86_dep.dot @@ -0,0 +1,13 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_35def2882668f95914f1fd60fe8204e3 { + graph [ bgcolor="#ddddee", pencolor="black", label="disk2" fontname="FreeSans", fontsize="10", URL="dir_35def2882668f95914f1fd60fe8204e3.html"] + subgraph clusterdir_5b47e9dc76266c8a2322068895bf2d86 { + graph [ bgcolor="#eeeeff", pencolor="black", label="" URL="dir_5b47e9dc76266c8a2322068895bf2d86.html"]; + dir_5b47e9dc76266c8a2322068895bf2d86 [shape=plaintext label="sstrege"]; + dir_92618ad86ada5fe3d1bb29cea9d6893a [shape=box label="cFE650" color="red" fillcolor="white" style="filled" URL="dir_92618ad86ada5fe3d1bb29cea9d6893a.html"]; + } + } +} diff --git a/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86_dep.map b/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86_dep.map deleted file mode 100644 index bd2c118..0000000 --- a/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86_dep.map +++ /dev/null @@ -1,4 +0,0 @@ -base referer -rect dir_a0108e23c9261e484d576d30b20b3402.html 37,76 112,124 -rect dir_5b47e9dc76266c8a2322068895bf2d86.html 27,55 219,135 -rect dir_35def2882668f95914f1fd60fe8204e3.html 16,16 229,145 diff --git a/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86_dep.png b/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86_dep.png deleted file mode 100644 index b780430..0000000 Binary files a/docs/users_guide/html/dir_5b47e9dc76266c8a2322068895bf2d86_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_64dbcd1c3b53a6923a777e59188b2295.html b/docs/users_guide/html/dir_64dbcd1c3b53a6923a777e59188b2295.html new file mode 100644 index 0000000..b3a103c --- /dev/null +++ b/docs/users_guide/html/dir_64dbcd1c3b53a6923a777e59188b2295.html @@ -0,0 +1,40 @@ + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/cpu1/ Directory Reference + + + + + + +
+

cpu1 Directory Reference

+

+
+
+
+

+ + + +

Directories

directory  inc
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_64dbcd1c3b53a6923a777e59188b2295_dep.dot b/docs/users_guide/html/dir_64dbcd1c3b53a6923a777e59188b2295_dep.dot new file mode 100644 index 0000000..a0d8a28 --- /dev/null +++ b/docs/users_guide/html/dir_64dbcd1c3b53a6923a777e59188b2295_dep.dot @@ -0,0 +1,13 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_f473c9662fcb97abdbb8f9248bfd3ea0 { + graph [ bgcolor="#ddddee", pencolor="black", label="build" fontname="FreeSans", fontsize="10", URL="dir_f473c9662fcb97abdbb8f9248bfd3ea0.html"] + subgraph clusterdir_64dbcd1c3b53a6923a777e59188b2295 { + graph [ bgcolor="#eeeeff", pencolor="black", label="" URL="dir_64dbcd1c3b53a6923a777e59188b2295.html"]; + dir_64dbcd1c3b53a6923a777e59188b2295 [shape=plaintext label="cpu1"]; + dir_38017bb67386fc992b358f4a105dede2 [shape=box label="inc" color="black" fillcolor="white" style="filled" URL="dir_38017bb67386fc992b358f4a105dede2.html"]; + } + } +} diff --git a/docs/users_guide/html/dir_6ae45a2d4d8d4578dc813a6adc58d2d1.html b/docs/users_guide/html/dir_6ae45a2d4d8d4578dc813a6adc58d2d1.html new file mode 100644 index 0000000..bd20d30 --- /dev/null +++ b/docs/users_guide/html/dir_6ae45a2d4d8d4578dc813a6adc58d2d1.html @@ -0,0 +1,40 @@ + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/ Directory Reference + + + + + + +
+

fsw Directory Reference

+

+
+
+
+

+ + + +

Directories

directory  src
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_6ae45a2d4d8d4578dc813a6adc58d2d1_dep.dot b/docs/users_guide/html/dir_6ae45a2d4d8d4578dc813a6adc58d2d1_dep.dot new file mode 100644 index 0000000..0d87146 --- /dev/null +++ b/docs/users_guide/html/dir_6ae45a2d4d8d4578dc813a6adc58d2d1_dep.dot @@ -0,0 +1,15 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_f660c480fc2ce9a795ccdc3cf5749f47 { + graph [ bgcolor="#ddddee", pencolor="black", label="lc" fontname="FreeSans", fontsize="10", URL="dir_f660c480fc2ce9a795ccdc3cf5749f47.html"] + subgraph clusterdir_6ae45a2d4d8d4578dc813a6adc58d2d1 { + graph [ bgcolor="#eeeeff", pencolor="black", label="" URL="dir_6ae45a2d4d8d4578dc813a6adc58d2d1.html"]; + dir_6ae45a2d4d8d4578dc813a6adc58d2d1 [shape=plaintext label="fsw"]; + dir_29e708ef10c4f27f99058ea13e4a7fb6 [shape=box label="src" color="black" fillcolor="white" style="filled" URL="dir_29e708ef10c4f27f99058ea13e4a7fb6.html"]; + } + } + dir_b8d1739202f65d59e58cdec119e32197 [shape=box label="mnt" fillcolor="white" style="filled" color="red" URL="dir_b8d1739202f65d59e58cdec119e32197.html"]; + dir_29e708ef10c4f27f99058ea13e4a7fb6->dir_b8d1739202f65d59e58cdec119e32197 [headlabel="2", labeldistance=1.5 headhref="dir_000002_000003.html"]; +} diff --git a/docs/users_guide/html/dir_8fe474c46955d59e5993ab1d108ad711.html b/docs/users_guide/html/dir_8fe474c46955d59e5993ab1d108ad711.html new file mode 100644 index 0000000..a9a9018 --- /dev/null +++ b/docs/users_guide/html/dir_8fe474c46955d59e5993ab1d108ad711.html @@ -0,0 +1,41 @@ + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/mission_inc/ Directory Reference + + + + + + +
+

mission_inc Directory Reference

+

+
+
+
+

+ + + + +

Files

file  lc_mission_cfg.h [code]
file  lc_perfids.h [code]
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_8fe474c46955d59e5993ab1d108ad711_dep.dot b/docs/users_guide/html/dir_8fe474c46955d59e5993ab1d108ad711_dep.dot new file mode 100644 index 0000000..fc51788 --- /dev/null +++ b/docs/users_guide/html/dir_8fe474c46955d59e5993ab1d108ad711_dep.dot @@ -0,0 +1,9 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_f473c9662fcb97abdbb8f9248bfd3ea0 { + graph [ bgcolor="#ddddee", pencolor="black", label="build" fontname="FreeSans", fontsize="10", URL="dir_f473c9662fcb97abdbb8f9248bfd3ea0.html"] + dir_8fe474c46955d59e5993ab1d108ad711 [shape=box, label="mission_inc", style="filled", fillcolor="#eeeeff", pencolor="black", URL="dir_8fe474c46955d59e5993ab1d108ad711.html"]; + } +} diff --git a/docs/users_guide/html/dir_92618ad86ada5fe3d1bb29cea9d6893a.html b/docs/users_guide/html/dir_92618ad86ada5fe3d1bb29cea9d6893a.html new file mode 100644 index 0000000..bfc4b59 --- /dev/null +++ b/docs/users_guide/html/dir_92618ad86ada5fe3d1bb29cea9d6893a.html @@ -0,0 +1,40 @@ + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/ Directory Reference + + + + + + +
+

cFE650 Directory Reference

+

+
+
+
+

+ + + +

Directories

directory  build
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_92618ad86ada5fe3d1bb29cea9d6893a_dep.dot b/docs/users_guide/html/dir_92618ad86ada5fe3d1bb29cea9d6893a_dep.dot new file mode 100644 index 0000000..d54e105 --- /dev/null +++ b/docs/users_guide/html/dir_92618ad86ada5fe3d1bb29cea9d6893a_dep.dot @@ -0,0 +1,13 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_5b47e9dc76266c8a2322068895bf2d86 { + graph [ bgcolor="#ddddee", pencolor="black", label="sstrege" fontname="FreeSans", fontsize="10", URL="dir_5b47e9dc76266c8a2322068895bf2d86.html"] + subgraph clusterdir_92618ad86ada5fe3d1bb29cea9d6893a { + graph [ bgcolor="#eeeeff", pencolor="black", label="" URL="dir_92618ad86ada5fe3d1bb29cea9d6893a.html"]; + dir_92618ad86ada5fe3d1bb29cea9d6893a [shape=plaintext label="cFE650"]; + dir_f473c9662fcb97abdbb8f9248bfd3ea0 [shape=box label="build" color="red" fillcolor="white" style="filled" URL="dir_f473c9662fcb97abdbb8f9248bfd3ea0.html"]; + } + } +} diff --git a/docs/users_guide/html/dir_9e683df0e82342f54348f0f7e5c8ebad.html b/docs/users_guide/html/dir_9e683df0e82342f54348f0f7e5c8ebad.html deleted file mode 100644 index b9bea4d..0000000 --- a/docs/users_guide/html/dir_9e683df0e82342f54348f0f7e5c8ebad.html +++ /dev/null @@ -1,39 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/ Directory Reference - - - - - - -

fsw Directory Reference

-

-

lc/fsw/
- - - - - - - - - - - - - -

Directories

directory  src
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/dir_9e683df0e82342f54348f0f7e5c8ebad_dep.map b/docs/users_guide/html/dir_9e683df0e82342f54348f0f7e5c8ebad_dep.map deleted file mode 100644 index 42db447..0000000 --- a/docs/users_guide/html/dir_9e683df0e82342f54348f0f7e5c8ebad_dep.map +++ /dev/null @@ -1,7 +0,0 @@ -base referer -rect dir_564057e99f82d0b145c681727cc5e426.html 37,76 109,124 -rect dir_b8d1739202f65d59e58cdec119e32197.html 37,172 109,220 -rect dir_000002_000003.html 69,168 77,176 -rect dir_000002_000003.html 77,146 85,161 -rect dir_9e683df0e82342f54348f0f7e5c8ebad.html 27,55 216,135 -rect dir_0a55bcd9e2b7de1e40fcc60b39c8ed56.html 16,16 227,145 diff --git a/docs/users_guide/html/dir_9e683df0e82342f54348f0f7e5c8ebad_dep.png b/docs/users_guide/html/dir_9e683df0e82342f54348f0f7e5c8ebad_dep.png deleted file mode 100644 index 07df9cf..0000000 Binary files a/docs/users_guide/html/dir_9e683df0e82342f54348f0f7e5c8ebad_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_a0108e23c9261e484d576d30b20b3402.html b/docs/users_guide/html/dir_a0108e23c9261e484d576d30b20b3402.html deleted file mode 100644 index 407b550..0000000 --- a/docs/users_guide/html/dir_a0108e23c9261e484d576d30b20b3402.html +++ /dev/null @@ -1,36 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/ Directory Reference - - - - - - -

MissionX Directory Reference

-

-

/mnt/disk2/sstrege/MissionX/
- - - - - - - - - - -

Directories

directory  build
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/dir_a0108e23c9261e484d576d30b20b3402_dep.map b/docs/users_guide/html/dir_a0108e23c9261e484d576d30b20b3402_dep.map deleted file mode 100644 index dd03bec..0000000 --- a/docs/users_guide/html/dir_a0108e23c9261e484d576d30b20b3402_dep.map +++ /dev/null @@ -1,4 +0,0 @@ -base referer -rect dir_547f1bcf83be6b5cb2c837107c1bcf18.html 37,76 109,124 -rect dir_a0108e23c9261e484d576d30b20b3402.html 27,55 219,135 -rect dir_5b47e9dc76266c8a2322068895bf2d86.html 16,16 229,145 diff --git a/docs/users_guide/html/dir_a0108e23c9261e484d576d30b20b3402_dep.png b/docs/users_guide/html/dir_a0108e23c9261e484d576d30b20b3402_dep.png deleted file mode 100644 index e0a453a..0000000 Binary files a/docs/users_guide/html/dir_a0108e23c9261e484d576d30b20b3402_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_b1f4d8b4dc8a83783c5fb27d56df8cd2.html b/docs/users_guide/html/dir_b1f4d8b4dc8a83783c5fb27d56df8cd2.html deleted file mode 100644 index 4d8054e..0000000 --- a/docs/users_guide/html/dir_b1f4d8b4dc8a83783c5fb27d56df8cd2.html +++ /dev/null @@ -1,37 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/cpu1/inc/ Directory Reference - - - - - - -

inc Directory Reference

-

-

/mnt/disk2/sstrege/MissionX/build/cpu1/inc/
- - - - - - - - - - - -

Files

file  lc_msgids.h [code]
file  lc_platform_cfg.h [code]
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/dir_b1f4d8b4dc8a83783c5fb27d56df8cd2_dep.map b/docs/users_guide/html/dir_b1f4d8b4dc8a83783c5fb27d56df8cd2_dep.map deleted file mode 100644 index 3907628..0000000 --- a/docs/users_guide/html/dir_b1f4d8b4dc8a83783c5fb27d56df8cd2_dep.map +++ /dev/null @@ -1,3 +0,0 @@ -base referer -rect dir_b1f4d8b4dc8a83783c5fb27d56df8cd2.html 27,55 99,103 -rect dir_2febe1bb0c221d1bdee545ca06dffea9.html 16,16 109,113 diff --git a/docs/users_guide/html/dir_b1f4d8b4dc8a83783c5fb27d56df8cd2_dep.png b/docs/users_guide/html/dir_b1f4d8b4dc8a83783c5fb27d56df8cd2_dep.png deleted file mode 100644 index 46b4801..0000000 Binary files a/docs/users_guide/html/dir_b1f4d8b4dc8a83783c5fb27d56df8cd2_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197.html b/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197.html index aada71f..a8bf9ce 100644 --- a/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197.html +++ b/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197.html @@ -1,35 +1,40 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/ Directory Reference - - - - - - -

mnt Directory Reference

-

-

/mnt/
- - - - - - - - - -

Directories

directory  disk2
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: /mnt/ Directory Reference + + + + + + +
+

mnt Directory Reference

+

+
+
+
+

+ + + +

Directories

directory  disk2
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197_dep.dot b/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197_dep.dot new file mode 100644 index 0000000..50723bc --- /dev/null +++ b/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197_dep.dot @@ -0,0 +1,10 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_b8d1739202f65d59e58cdec119e32197 { + graph [ bgcolor="#eeeeff", pencolor="black", label="" URL="dir_b8d1739202f65d59e58cdec119e32197.html"]; + dir_b8d1739202f65d59e58cdec119e32197 [shape=plaintext label="mnt"]; + dir_35def2882668f95914f1fd60fe8204e3 [shape=box label="disk2" color="red" fillcolor="white" style="filled" URL="dir_35def2882668f95914f1fd60fe8204e3.html"]; + } +} diff --git a/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197_dep.map b/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197_dep.map deleted file mode 100644 index 6ad1c66..0000000 --- a/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197_dep.map +++ /dev/null @@ -1,3 +0,0 @@ -base referer -rect dir_35def2882668f95914f1fd60fe8204e3.html 27,37 99,85 -rect dir_b8d1739202f65d59e58cdec119e32197.html 16,16 205,96 diff --git a/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197_dep.png b/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197_dep.png deleted file mode 100644 index 5580bf4..0000000 Binary files a/docs/users_guide/html/dir_b8d1739202f65d59e58cdec119e32197_dep.png and /dev/null differ diff --git a/docs/users_guide/html/dir_f473c9662fcb97abdbb8f9248bfd3ea0.html b/docs/users_guide/html/dir_f473c9662fcb97abdbb8f9248bfd3ea0.html new file mode 100644 index 0000000..bda6c53 --- /dev/null +++ b/docs/users_guide/html/dir_f473c9662fcb97abdbb8f9248bfd3ea0.html @@ -0,0 +1,41 @@ + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/ Directory Reference + + + + + + +
+

build Directory Reference

+

+
+
+
+

+ + + + +

Directories

directory  cpu1
directory  mission_inc
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_f473c9662fcb97abdbb8f9248bfd3ea0_dep.dot b/docs/users_guide/html/dir_f473c9662fcb97abdbb8f9248bfd3ea0_dep.dot new file mode 100644 index 0000000..138cc88 --- /dev/null +++ b/docs/users_guide/html/dir_f473c9662fcb97abdbb8f9248bfd3ea0_dep.dot @@ -0,0 +1,14 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_92618ad86ada5fe3d1bb29cea9d6893a { + graph [ bgcolor="#ddddee", pencolor="black", label="cFE650" fontname="FreeSans", fontsize="10", URL="dir_92618ad86ada5fe3d1bb29cea9d6893a.html"] + subgraph clusterdir_f473c9662fcb97abdbb8f9248bfd3ea0 { + graph [ bgcolor="#eeeeff", pencolor="black", label="" URL="dir_f473c9662fcb97abdbb8f9248bfd3ea0.html"]; + dir_f473c9662fcb97abdbb8f9248bfd3ea0 [shape=plaintext label="build"]; + dir_64dbcd1c3b53a6923a777e59188b2295 [shape=box label="cpu1" color="red" fillcolor="white" style="filled" URL="dir_64dbcd1c3b53a6923a777e59188b2295.html"]; + dir_8fe474c46955d59e5993ab1d108ad711 [shape=box label="mission_inc" color="black" fillcolor="white" style="filled" URL="dir_8fe474c46955d59e5993ab1d108ad711.html"]; + } + } +} diff --git a/docs/users_guide/html/dir_f660c480fc2ce9a795ccdc3cf5749f47.html b/docs/users_guide/html/dir_f660c480fc2ce9a795ccdc3cf5749f47.html new file mode 100644 index 0000000..66e0f71 --- /dev/null +++ b/docs/users_guide/html/dir_f660c480fc2ce9a795ccdc3cf5749f47.html @@ -0,0 +1,40 @@ + + + + +CFS Limit Checker Application on User's Guide: lc/ Directory Reference + + + + + + +
+

lc Directory Reference

+

+
+
+
+

+ + + +

Directories

directory  fsw
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/dir_f660c480fc2ce9a795ccdc3cf5749f47_dep.dot b/docs/users_guide/html/dir_f660c480fc2ce9a795ccdc3cf5749f47_dep.dot new file mode 100644 index 0000000..3b925b4 --- /dev/null +++ b/docs/users_guide/html/dir_f660c480fc2ce9a795ccdc3cf5749f47_dep.dot @@ -0,0 +1,12 @@ +digraph G { + compound=true + node [ fontsize="10", fontname="FreeSans"]; + edge [ labelfontsize="10", labelfontname="FreeSans"]; + subgraph clusterdir_f660c480fc2ce9a795ccdc3cf5749f47 { + graph [ bgcolor="#eeeeff", pencolor="black", label="" URL="dir_f660c480fc2ce9a795ccdc3cf5749f47.html"]; + dir_f660c480fc2ce9a795ccdc3cf5749f47 [shape=plaintext label="lc"]; + dir_6ae45a2d4d8d4578dc813a6adc58d2d1 [shape=box label="fsw" color="red" fillcolor="white" style="filled" URL="dir_6ae45a2d4d8d4578dc813a6adc58d2d1.html"]; + } + dir_b8d1739202f65d59e58cdec119e32197 [shape=box label="mnt" fillcolor="white" style="filled" color="red" URL="dir_b8d1739202f65d59e58cdec119e32197.html"]; + dir_6ae45a2d4d8d4578dc813a6adc58d2d1->dir_b8d1739202f65d59e58cdec119e32197 [headlabel="2", labeldistance=1.5 headhref="dir_000001_000003.html"]; +} diff --git a/docs/users_guide/html/dirs.html b/docs/users_guide/html/dirs.html index ab8a3ff..8d6019d 100644 --- a/docs/users_guide/html/dirs.html +++ b/docs/users_guide/html/dirs.html @@ -1,49 +1,57 @@ - - -CFS Limit Checker Application on User's Guide: Directory Hierarchy - - - - - -

CFS Limit Checker Application on User's Guide Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: Directory Hierarchy + + + + + + +
+

Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/doxygen.css b/docs/users_guide/html/doxygen.css index 5d58369..1c4cbf9 100644 --- a/docs/users_guide/html/doxygen.css +++ b/docs/users_guide/html/doxygen.css @@ -1,358 +1,498 @@ -BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { - font-family: Geneva, Arial, Helvetica, sans-serif; -} -BODY,TD { - font-size: 90%; -} -H1 { - text-align: center; - font-size: 160%; -} -H2 { - font-size: 120%; -} -H3 { - font-size: 100%; -} -CAPTION { font-weight: bold } -DIV.qindex { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.nav { - width: 100%; - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; -} -DIV.navtab { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -TD.navtab { - font-size: 70%; -} -A.qindex { - text-decoration: none; - font-weight: bold; - color: #1A419D; -} -A.qindex:visited { - text-decoration: none; - font-weight: bold; - color: #1A419D -} -A.qindex:hover { - text-decoration: none; - background-color: #ddddff; -} -A.qindexHL { - text-decoration: none; - font-weight: bold; - background-color: #6666cc; - color: #ffffff; - border: 1px double #9295C2; -} -A.qindexHL:hover { - text-decoration: none; - background-color: #6666cc; - color: #ffffff; -} -A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} -A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} -A.codeRef:link { font-weight: normal; color: #0000FF} -A.codeRef:visited { font-weight: normal; color: #0000FF} -A:hover { text-decoration: none; background-color: #f2f2ff } -DL.el { margin-left: -1cm } -.fragment { - font-family: monospace, fixed; - font-size: 95%; -} -PRE.fragment { - border: 1px solid #CCCCCC; - background-color: #f5f5f5; - margin-top: 4px; - margin-bottom: 4px; - margin-left: 2px; - margin-right: 8px; - padding-left: 6px; - padding-right: 6px; - padding-top: 4px; - padding-bottom: 4px; -} -DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } - -DIV.groupHeader { - margin-left: 16px; - margin-top: 12px; - margin-bottom: 6px; - font-weight: bold; -} -DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } -BODY { - background: white; - color: black; - margin-right: 20px; - margin-left: 20px; -} -TD.indexkey { - background-color: #e8eef2; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TD.indexvalue { - background-color: #e8eef2; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px; - border: 1px solid #CCCCCC; -} -TR.memlist { - background-color: #f0f0f0; -} -P.formulaDsp { text-align: center; } -IMG.formulaDsp { } -IMG.formulaInl { vertical-align: middle; } -SPAN.keyword { color: #008000 } -SPAN.keywordtype { color: #604020 } -SPAN.keywordflow { color: #e08000 } -SPAN.comment { color: #800000 } -SPAN.preprocessor { color: #806020 } -SPAN.stringliteral { color: #002080 } -SPAN.charliteral { color: #008080 } -.mdescLeft { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.mdescRight { - padding: 0px 8px 4px 8px; - font-size: 80%; - font-style: italic; - background-color: #FAFAFA; - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; -} -.memItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplItemRight { - padding: 1px 8px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: none; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - background-color: #FAFAFA; - font-size: 80%; -} -.memTemplParams { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #E0E0E0; - border-right-color: #E0E0E0; - border-bottom-color: #E0E0E0; - border-left-color: #E0E0E0; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - color: #606060; - background-color: #FAFAFA; - font-size: 80%; -} -.search { color: #003399; - font-weight: bold; -} -FORM.search { - margin-bottom: 0px; - margin-top: 0px; -} -INPUT.search { font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -TD.tiny { font-size: 75%; -} -a { - color: #1A41A8; -} -a:visited { - color: #2A3798; -} -.dirtab { padding: 4px; - border-collapse: collapse; - border: 1px solid #84b0c7; -} -TH.dirtab { background: #e8eef2; - font-weight: bold; -} -HR { height: 1px; - border: none; - border-top: 1px solid black; -} - -/* Style for detailed member documentation */ -.memtemplate { - font-size: 80%; - color: #606060; - font-weight: normal; -} -.memnav { - background-color: #e8eef2; - border: 1px solid #84b0c7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} -.memitem { - padding: 4px; - background-color: #eef3f5; - border-width: 1px; - border-style: solid; - border-color: #dedeee; - -moz-border-radius: 8px 8px 8px 8px; -} -.memname { - white-space: nowrap; - font-weight: bold; -} -.memdoc{ - padding-left: 10px; -} -.memproto { - background-color: #d5e1e8; - width: 100%; - border-width: 1px; - border-style: solid; - border-color: #84b0c7; - font-weight: bold; - -moz-border-radius: 8px 8px 8px 8px; -} -.paramkey { - text-align: right; -} -.paramtype { - white-space: nowrap; -} -.paramname { - color: #602020; - font-style: italic; -} -/* End Styling for detailed member documentation */ - -/* for the tree view */ -.ftvtree { - font-family: sans-serif; - margin:0.5em; -} -.directory { font-size: 9pt; font-weight: bold; } -.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } -.directory > h3 { margin-top: 0; } -.directory p { margin: 0px; white-space: nowrap; } -.directory div { display: none; margin: 0px; } -.directory img { vertical-align: -30%; } - +/* The standard CSS for doxygen */ + +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 12px; +} + +/* @group Heading Levels */ + +h1 { + text-align: center; + font-size: 150%; +} + +h2 { + font-size: 120%; +} + +h3 { + font-size: 100%; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #153788; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #1b77c5; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code { +} + +a.codeRef { +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + padding: 4px 6px; + margin: 4px 8px 4px 2px; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} + +td.indexkey { + background-color: #e8eef2; + font-weight: bold; + border: 1px solid #CCCCCC; + margin: 2px 0px 2px 0; + padding: 2px 10px; +} + +td.indexvalue { + background-color: #e8eef2; + border: 1px solid #CCCCCC; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #f0f0f0; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +/* @end */ + +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} + +th.dirtab { + background: #e8eef2; + font-weight: bold; +} + +hr { + height: 0; + border: none; + border-top: 1px solid #666; +} + +/* @group Member Descriptions */ + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #FAFAFA; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #ccc; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memTemplParams { + color: #606060; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; + margin-left: 3px; +} + +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.memitem { + padding: 0; + margin-bottom: 10px; +} + +.memname { + white-space: nowrap; + font-weight: bold; +} + +.memproto, .memdoc { + border: 1px solid #84b0c7; +} + +.memproto { + padding: 0; + background-color: #d5e1e8; + font-weight: bold; + -webkit-border-top-left-radius: 8px; + -webkit-border-top-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -moz-border-radius-topleft: 8px; + -moz-border-radius-topright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + +} + +.memdoc { + padding: 2px 5px; + background-color: #eef3f5; + border-top-width: 0; + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0.5em; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +address { + font-style: normal; + color: #333; +} diff --git a/docs/users_guide/html/files.html b/docs/users_guide/html/files.html index 9c4afb7..8a72d04 100644 --- a/docs/users_guide/html/files.html +++ b/docs/users_guide/html/files.html @@ -1,36 +1,45 @@ - - -CFS Limit Checker Application on User's Guide: File Index - - - - - - -

CFS Limit Checker Application on User's Guide File List

Here is a list of all files with brief descriptions: - - - - - - - - - -
lc/fsw/src/lc_events.h [code]
lc/fsw/src/lc_msg.h [code]
lc/fsw/src/lc_msgdefs.h [code]
lc/fsw/src/lc_tbl.h [code]
lc/fsw/src/lc_tbldefs.h [code]
/mnt/disk2/sstrege/MissionX/build/cpu1/inc/lc_msgids.h [code]
/mnt/disk2/sstrege/MissionX/build/cpu1/inc/lc_platform_cfg.h [code]
/mnt/disk2/sstrege/MissionX/build/mission_inc/lc_mission_cfg.h [code]
/mnt/disk2/sstrege/MissionX/build/mission_inc/lc_perfids.h [code]
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: File Index + + + + + + +
+

File List

Here is a list of all files with brief descriptions: + + + + + + + + + +
lc/fsw/src/lc_events.h [code]
lc/fsw/src/lc_msg.h [code]
lc/fsw/src/lc_msgdefs.h [code]
lc/fsw/src/lc_tbl.h [code]
lc/fsw/src/lc_tbldefs.h [code]
/mnt/disk2/sstrege/cFE650/build/cpu1/inc/lc_msgids.h [code]
/mnt/disk2/sstrege/cFE650/build/cpu1/inc/lc_platform_cfg.h [code]
/mnt/disk2/sstrege/cFE650/build/mission_inc/lc_mission_cfg.h [code]
/mnt/disk2/sstrege/cFE650/build/mission_inc/lc_perfids.h [code]
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/functions.html b/docs/users_guide/html/functions.html index 24cde78..8bfc0cc 100644 --- a/docs/users_guide/html/functions.html +++ b/docs/users_guide/html/functions.html @@ -1,157 +1,349 @@ - - -CFS Limit Checker Application on User's Guide: Data Fields - - - - - - -
- -
-
- -
- -

-Here is a list of all struct and union fields with links to the structures/unions they belong to: -

-

- a -

-

- b -

-

- c -

-

- d -

-

- e -

-

- f -

-

- l -

-

- m -

-

- n -

-

- o -

-

- p -

-

- r -

-

- s -

-

- t -

-

- u -

-

- v -

-

- w -

-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: Data Fields + + + + + + +
+Here is a list of all struct and union fields with links to the structures/unions they belong to: + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- w -

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/functions_vars.html b/docs/users_guide/html/functions_vars.html index 828b496..89b2782 100644 --- a/docs/users_guide/html/functions_vars.html +++ b/docs/users_guide/html/functions_vars.html @@ -1,157 +1,349 @@ - - -CFS Limit Checker Application on User's Guide: Data Fields - Variables - - - - - - -
- -
-
- -
- -

-  -

-

- a -

-

- b -

-

- c -

-

- d -

-

- e -

-

- f -

-

- l -

-

- m -

-

- n -

-

- o -

-

- p -

-

- r -

-

- s -

-

- t -

-

- u -

-

- v -

-

- w -

-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: Data Fields - Variables + + + + + + +
+  + +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- v -

+ + +

- w -

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/globals.html b/docs/users_guide/html/globals.html index 1bf45bc..c43a26e 100644 --- a/docs/users_guide/html/globals.html +++ b/docs/users_guide/html/globals.html @@ -1,212 +1,559 @@ - - -CFS Limit Checker Application on User's Guide: Data Fields - - - - - - -
- -
-
-
    -
  • l
  • -
-
- -

-Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: -

-

- l -

-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: Data Fields + + + + + + +
+Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to: + +

- l -

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/globals_defs.html b/docs/users_guide/html/globals_defs.html index ab1f3d5..89b79bd 100644 --- a/docs/users_guide/html/globals_defs.html +++ b/docs/users_guide/html/globals_defs.html @@ -1,212 +1,559 @@ - - -CFS Limit Checker Application on User's Guide: Data Fields - - - - - - -
- -
-
-
    -
  • l
  • -
-
- -

-  -

-

- l -

-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: Data Fields + + + + + + +
+  + +

- l -

+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/graph_legend.dot b/docs/users_guide/html/graph_legend.dot index fa6cc55..c53360c 100644 --- a/docs/users_guide/html/graph_legend.dot +++ b/docs/users_guide/html/graph_legend.dot @@ -1,22 +1,22 @@ digraph G { - edge [fontname="FreeSans.ttf",fontsize=10,labelfontname="FreeSans.ttf",labelfontsize=10]; - node [fontname="FreeSans.ttf",fontsize=10,shape=record]; - Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",fillcolor="grey75",style="filled" fontcolor="black"]; - Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans.ttf"]; - Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classPublicBase.html"]; - Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans.ttf"]; - Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="red",URL="$classTruncated.html"]; - Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="FreeSans.ttf"]; - Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classProtectedBase.html"]; - Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="FreeSans.ttf"]; - Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classPrivateBase.html"]; - Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans.ttf"]; - Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="grey75"]; - Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="FreeSans.ttf"]; - Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classTempl.html"]; - Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="FreeSans.ttf"]; - Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classTempl.html"]; - Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="FreeSans.ttf"]; - Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="FreeSans.ttf",color="black",URL="$classUsed.html"]; + edge [fontname="FreeSans",fontsize="10",labelfontname="FreeSans",labelfontsize="10"]; + node [fontname="FreeSans",fontsize="10",shape=record]; + Node9 [shape="box",label="Inherited",fontsize="10",height=0.2,width=0.4,fontname="FreeSans",fillcolor="grey75",style="filled" fontcolor="black"]; + Node10 -> Node9 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"]; + Node10 [shape="box",label="PublicBase",fontsize="10",height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPublicBase.html"]; + Node11 -> Node10 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"]; + Node11 [shape="box",label="Truncated",fontsize="10",height=0.2,width=0.4,fontname="FreeSans",color="red",URL="$classTruncated.html"]; + Node13 -> Node9 [dir=back,color="darkgreen",fontsize="10",style="solid",fontname="FreeSans"]; + Node13 [shape="box",label="ProtectedBase",fontsize="10",height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classProtectedBase.html"]; + Node14 -> Node9 [dir=back,color="firebrick4",fontsize="10",style="solid",fontname="FreeSans"]; + Node14 [shape="box",label="PrivateBase",fontsize="10",height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classPrivateBase.html"]; + Node15 -> Node9 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"]; + Node15 [shape="box",label="Undocumented",fontsize="10",height=0.2,width=0.4,fontname="FreeSans",color="grey75"]; + Node16 -> Node9 [dir=back,color="midnightblue",fontsize="10",style="solid",fontname="FreeSans"]; + Node16 [shape="box",label="Templ< int >",fontsize="10",height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; + Node17 -> Node16 [dir=back,color="orange",fontsize="10",style="dashed",label="< int >",fontname="FreeSans"]; + Node17 [shape="box",label="Templ< T >",fontsize="10",height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classTempl.html"]; + Node18 -> Node9 [dir=back,color="darkorchid3",fontsize="10",style="dashed",label="m_usedClass",fontname="FreeSans"]; + Node18 [shape="box",label="Used",fontsize="10",height=0.2,width=0.4,fontname="FreeSans",color="black",URL="$classUsed.html"]; } diff --git a/docs/users_guide/html/graph_legend.html b/docs/users_guide/html/graph_legend.html index cb84df0..4b7d26f 100644 --- a/docs/users_guide/html/graph_legend.html +++ b/docs/users_guide/html/graph_legend.html @@ -1,82 +1,92 @@ - - -CFS Limit Checker Application on User's Guide: Graph Legend - - - - - -

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

-Consider the following example:

/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph:

-

-graph_legend.png -
-

-The boxes in the above graph have the following meaning:

    -
  • -A filled black box represents the struct or class for which the graph is generated.
  • -
  • -A box with a black border denotes a documented struct or class.
  • -
  • -A box with a grey border denotes an undocumented struct or class.
  • -
  • -A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • -
-The arrows have the following meaning:
    -
  • -A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • -
  • -A dark green arrow is used for protected inheritance.
  • -
  • -A dark red arrow is used for private inheritance.
  • -
  • -A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • -
  • -A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: Graph Legend + + + + + + +
+

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

+

Consider the following example:

+
/*! Invisible class because of truncation */
+class Invisible { };
+
+/*! Truncated class, inheritance relation is hidden */
+class Truncated : public Invisible { };
+
+/* Class not documented with doxygen comments */
+class Undocumented { };
+
+/*! Class that is inherited using public inheritance */
+class PublicBase : public Truncated { };
+
+/*! A template class */
+template<class T> class Templ { };
+
+/*! Class that is inherited using protected inheritance */
+class ProtectedBase { };
+
+/*! Class that is inherited using private inheritance */
+class PrivateBase { };
+
+/*! Class that is used by the Inherited class */
+class Used { };
+
+/*! Super class that inherits a number of other classes */
+class Inherited : public PublicBase,
+                  protected ProtectedBase,
+                  private PrivateBase,
+                  public Undocumented,
+                  public Templ<int>
+{
+  private:
+    Used *m_usedClass;
+};
+

This will result in the following graph:

+
+graph_legend.png +
+

The boxes in the above graph have the following meaning:

+
    +
  • +A filled gray box represents the struct or class for which the graph is generated.
  • +
  • +A box with a black border denotes a documented struct or class.
  • +
  • +A box with a grey border denotes an undocumented struct or class.
  • +
  • +A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.
  • +
+

The arrows have the following meaning:

+
    +
  • +A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • +
  • +A dark green arrow is used for protected inheritance.
  • +
  • +A dark red arrow is used for private inheritance.
  • +
  • +A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • +
  • +A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • +
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/graph_legend.png b/docs/users_guide/html/graph_legend.png deleted file mode 100644 index 9fc7433..0000000 Binary files a/docs/users_guide/html/graph_legend.png and /dev/null differ diff --git a/docs/users_guide/html/index.html b/docs/users_guide/html/index.html index 29b6bdb..8edb9c0 100644 --- a/docs/users_guide/html/index.html +++ b/docs/users_guide/html/index.html @@ -1,51 +1,57 @@ - - -CFS Limit Checker Application on User's Guide: CFS Limit Checker (LC) User's Guide - - - - - -

CFS Limit Checker (LC) User's Guide

-

-

-
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: CFS Limit Checker (LC) User's Guide + + + + + + + +
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__events_8h-source.html b/docs/users_guide/html/lc__events_8h-source.html deleted file mode 100644 index fb6cbeb..0000000 --- a/docs/users_guide/html/lc__events_8h-source.html +++ /dev/null @@ -1,226 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_events.h Source File - - - - - - - -

lc_events.h

Go to the documentation of this file.
00001 /************************************************************************
-00002 ** File:
-00003 **   $Id: lc__events_8h-source.html 1.1 2015/03/04 16:51:29EST sstrege Exp  $
-00004 **
-00005 **  Copyright © 2007-2014 United States Government as represented by the 
-00006 **  Administrator of the National Aeronautics and Space Administration. 
-00007 **  All Other Rights Reserved.  
-00008 **
-00009 **  This software was created at NASA's Goddard Space Flight Center.
-00010 **  This software is governed by the NASA Open Source Agreement and may be 
-00011 **  used, distributed and modified only pursuant to the terms of that 
-00012 **  agreement.
-00013 **
-00014 ** Purpose: 
-00015 **   Specification for the CFS Limit Checker (LC) event identifers.
-00016 **
-00017 ** Notes:
-00018 **
-00019 **   $Log: lc__events_8h-source.html  $
-00019 **   Revision 1.1 2015/03/04 16:51:29EST sstrege 
-00019 **   Initial revision
-00019 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-00020 **   Revision 1.2 2015/03/04 16:09:56EST sstrege 
-00021 **   Added copyright information
-00022 **   Revision 1.1 2012/07/31 16:53:38EDT nschweis 
-00023 **   Initial revision
-00024 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj
-00025 **   Revision 1.11 2011/03/10 14:13:18EST lwalling 
-00026 **   Cleanup use of debug events during task startup
-00027 **   Revision 1.10 2011/03/01 09:36:38EST lwalling 
-00028 **   Modified startup logic re use of CDS and critical tables, remove unused event IDs
-00029 **   Revision 1.9 2011/02/07 17:57:58EST lwalling 
-00030 **   Modify sample AP commands to target groups of AP's
-00031 **   Revision 1.8 2010/03/03 15:17:17EST lwalling 
-00032 **   Removed pound symbols from some Doxygen names
-00033 **   Revision 1.7 2010/02/25 11:45:22EST lwalling 
-00034 **   Defined LC_BASE_AP_EID for use in actionpoint definition table
-00035 **   Revision 1.6 2009/12/28 14:51:15EST lwalling 
-00036 **   Change limited events from debug to info
-00037 **   Revision 1.5 2009/02/23 11:17:10EST dahardis 
-00038 **   Added two event messages and modified two others for
-00039 **   consistency when addressing DCR 7084
-00040 **   Revision 1.4 2009/01/29 15:39:21EST dahardis 
-00041 **   Changed an event message from INFO to DEBUG as documented
-00042 **   in DCR #6811
-00043 **   Revision 1.3 2008/12/10 15:34:47EST dahardis 
-00044 **   Added an event message needed for 
-00045 **   DCR 4680
-00046 **   Revision 1.2 2008/12/03 13:59:47EST dahardis 
-00047 **   Corrections from peer code review
-00048 **   Revision 1.1 2008/10/29 14:19:27EDT dahardison 
-00049 **   Initial revision
-00050 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj
-00051 ** 
-00052 *************************************************************************/
-00053 #ifndef _lc_events_
-00054 #define _lc_events_
-00055 
-00069 #define LC_TASK_EXIT_EID                         1    
-00070 
-00086 #define LC_INIT_INF_EID                          2    
-00087 
-00102 #define LC_CR_PIPE_ERR_EID                       3
-00103 
-00120 #define LC_SUB_HK_REQ_ERR_EID                    4
-00121 
-00138 #define LC_SUB_GND_CMD_ERR_EID                   5
-00139 
-00156 #define LC_SUB_SAMPLE_CMD_ERR_EID                6
-00157 
-00171 #define LC_WDT_REGISTER_ERR_EID                  7
-00172 
-00190 #define LC_WDT_REREGISTER_ERR_EID                8
-00191 
-00205 #define LC_ADT_REGISTER_ERR_EID                  9
-00206 
-00220 #define LC_WRT_REGISTER_ERR_EID                  10
-00221 
-00235 #define LC_ART_REGISTER_ERR_EID                  11
-00236 
-00250 #define LC_WRT_CDS_REGISTER_ERR_EID              12
-00251 
-00265 #define LC_ART_CDS_REGISTER_ERR_EID              13
-00266 
-00280 #define LC_APP_CDS_REGISTER_ERR_EID              14
-00281 
-00297 #define LC_WDT_LOAD_ERR_EID                      15
-00298 
-00314 #define LC_ADT_LOAD_ERR_EID                      16
-00315 
-00329 #define LC_WRT_GETADDR_ERR_EID                   17
-00330 
-00344 #define LC_ART_GETADDR_ERR_EID                   18
-00345 
-00359 #define LC_WDT_GETADDR_ERR_EID                   19
-00360 
-00374 #define LC_ADT_GETADDR_ERR_EID                   20
-00375 
-00396 #define LC_CDS_RESTORED_INF_EID                  21
-00397 
-00430 #define LC_CDS_UPDATED_INF_EID                   22
-00431 
-00458 #define LC_CDS_DISABLED_INF_EID                  23
-00459 
-00473 #define LC_CC_ERR_EID                            24
-00474 
-00488 #define LC_APSAMPLE_APNUM_ERR_EID                25
-00489 
-00504 #define LC_NOOP_INF_EID                          26
-00505 
-00516 #define LC_RESET_DBG_EID                         27
-00517 
-00531 #define LC_LCSTATE_INF_EID                       28
-00532 
-00546 #define LC_LCSTATE_ERR_EID                       29
-00547 
-00562 #define LC_APSTATE_NEW_ERR_EID                   30
-00563 
-00580 #define LC_APSTATE_CURR_ERR_EID                  31
-00581 
-00595 #define LC_APSTATE_APNUM_ERR_EID                 32
-00596 
-00611 #define LC_APSTATE_INF_EID                       33
-00612 
-00626 #define LC_APOFF_APNUM_ERR_EID                   34
-00627 
-00643 #define LC_APOFF_CURR_ERR_EID                    35
-00644 
-00658 #define LC_APOFF_INF_EID                         36
-00659 
-00673 #define LC_APSTATS_APNUM_ERR_EID                 37
-00674 
-00688 #define LC_APSTATS_INF_EID                       38
-00689 
-00703 #define LC_WPSTATS_WPNUM_ERR_EID                 39
-00704 
-00718 #define LC_WPSTATS_INF_EID                       40
-00719 
-00735 #define LC_HKREQ_LEN_ERR_EID                     41
-00736 
-00752 #define LC_APSAMPLE_LEN_ERR_EID                  42
-00753 
-00769 #define LC_LEN_ERR_EID                           43
-00770 
-00784 #define LC_UNSUB_WP_ERR_EID                      44
-00785 
-00799 #define LC_SUB_WP_ERR_EID                        45
-00800 
-00815 #define LC_WRT_NO_SAVE_ERR_EID                   46
-00816 
-00831 #define LC_ART_NO_SAVE_ERR_EID                   47
-00832 
-00846 #define LC_APP_NO_SAVE_START_ERR_EID             48
-00847 
-00861 #define LC_MID_INF_EID                           49
-00862 
-00876 #define LC_WP_DATATYPE_ERR_EID                   50
-00877 
-00891 #define LC_WP_OPERID_ERR_EID                     51
-00892 
-00908 #define LC_WP_NAN_ERR_EID                        52
-00909 
-00926 #define LC_WP_OFFSET_ERR_EID                     53
-00927 
-00946 #define LC_WDTVAL_FPERR_EID                      54
-00947 
-00962 #define LC_WDTVAL_ERR_EID                        55
-00963 
-00979 #define LC_WDTVAL_INF_EID                        56
-00980 
-00995 #define LC_APSAMPLE_CURR_ERR_EID                 57
-00996 
-01009 #define LC_AP_PASSTOFAIL_INF_EID                 58
-01010 
-01025 #define LC_PASSIVE_FAIL_DBG_EID                  59
-01026 
-01041 #define LC_AP_PASSIVE_FAIL_INF_EID               60
-01042 
-01055 #define LC_AP_FAILTOPASS_INF_EID                 61
-01056 
-01070 #define LC_ACTION_ERROR_ERR_EID                  62
-01071 
-01086 #define LC_INVALID_RPN_ERR_EID                   63
-01087 
-01103 #define LC_ADTVAL_RPNERR_EID                     64
-01104 
-01119 #define LC_ADTVAL_ERR_EID                        65
-01120 
-01136 #define LC_ADTVAL_INF_EID                        66
-01137 
-01152 #define LC_CFCALL_ERR_EID                        67
-01153 
-01176 #define LC_BASE_AP_EID                           1000
-01177 
-01178 #endif /* _lc_events_ */
-01179 
-01180 /************************/
-01181 /*  End of File Comment */
-01182 /************************/
-

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/lc__events_8h.html b/docs/users_guide/html/lc__events_8h.html index 69c97ae..1672767 100644 --- a/docs/users_guide/html/lc__events_8h.html +++ b/docs/users_guide/html/lc__events_8h.html @@ -1,1811 +1,1680 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_events.h File Reference - - - - - - - -

lc_events.h File Reference

-

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Defines

#define LC_TASK_EXIT_EID   1
  'Task terminating, err = 0x%08X'
#define LC_INIT_INF_EID   2
  'LC Initialized. Version %d.%d.%d.%d'
#define LC_CR_PIPE_ERR_EID   3
  'Error Creating LC Pipe, RC=0x%08X'
#define LC_SUB_HK_REQ_ERR_EID   4
  'Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X'
#define LC_SUB_GND_CMD_ERR_EID   5
  'Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X'
#define LC_SUB_SAMPLE_CMD_ERR_EID   6
  'Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X'
#define LC_WDT_REGISTER_ERR_EID   7
  'Error registering WDT, RC=0x%08X'
#define LC_WDT_REREGISTER_ERR_EID   8
  'Error re-registering WDT, RC=0x%08X'
#define LC_ADT_REGISTER_ERR_EID   9
  'Error registering ADT, RC=0x%08X'
#define LC_WRT_REGISTER_ERR_EID   10
  'Error registering WRT, RC=0x%08X'
#define LC_ART_REGISTER_ERR_EID   11
  'Error registering ART, RC=0x%08X'
#define LC_WRT_CDS_REGISTER_ERR_EID   12
  'Error registering WRT CDS Area, RC=0x%08X'
#define LC_ART_CDS_REGISTER_ERR_EID   13
  'Error registering ART CDS Area, RC=0x%08X'
#define LC_APP_CDS_REGISTER_ERR_EID   14
  'Error registering application data CDS Area, RC=0x%08X'
#define LC_WDT_LOAD_ERR_EID   15
  'Error (RC=0x%08X) Loading WDT with '%s''
#define LC_ADT_LOAD_ERR_EID   16
  'Error (RC=0x%08X) Loading ADT with '%s''
#define LC_WRT_GETADDR_ERR_EID   17
  'Error getting WRT address, RC=0x%08X'
#define LC_ART_GETADDR_ERR_EID   18
  'Error getting ART address, RC=0x%08X'
#define LC_WDT_GETADDR_ERR_EID   19
  'Error getting WDT address, RC=0x%08X'
#define LC_ADT_GETADDR_ERR_EID   20
  'Error getting ADT address, RC=0x%08X'
#define LC_CDS_RESTORED_INF_EID   21
  'Previous state restored from Critical Data Store'
#define LC_CDS_UPDATED_INF_EID   22
  'Default state loaded and written to CDS, activity mask = 0x%08X'
#define LC_CDS_DISABLED_INF_EID   23
  'LC use of Critical Data Store disabled, activity mask = 0x%08X'
#define LC_CC_ERR_EID   24
  'Invalid command code: ID = 0x%04X, CC = %d'
#define LC_APSAMPLE_APNUM_ERR_EID   25
  'Sample AP error: invalid AP number, start = %d, end = %d'
#define LC_NOOP_INF_EID   26
  'No-op command: Version %d.%d.%d.%d'
#define LC_RESET_DBG_EID   27
  'Reset counters command'
#define LC_LCSTATE_INF_EID   28
  'Set LC state command: new state = %d'
#define LC_LCSTATE_ERR_EID   29
  'Set LC state error: invalid state = %d'
#define LC_APSTATE_NEW_ERR_EID   30
  'Set AP state error: AP = %d, Invalid new state = %d'
#define LC_APSTATE_CURR_ERR_EID   31
  'Set AP state error: AP = %d, Invalid current AP state = %d'
#define LC_APSTATE_APNUM_ERR_EID   32
  'Set AP state error: Invalid AP number = %d'
#define LC_APSTATE_INF_EID   33
  'Set AP state command: AP = %d, New state = %d'
#define LC_APOFF_APNUM_ERR_EID   34
  'Set AP perm off error: Invalid AP number = %d'
#define LC_APOFF_CURR_ERR_EID   35
  'Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d'
#define LC_APOFF_INF_EID   36
  'Set AP permanently off command: AP = %d'
#define LC_APSTATS_APNUM_ERR_EID   37
  'Reset AP stats error: invalid AP number = %d'
#define LC_APSTATS_INF_EID   38
  'Reset AP stats command: AP = %d'
#define LC_WPSTATS_WPNUM_ERR_EID   39
  'Reset WP stats error: invalid WP number = %d'
#define LC_WPSTATS_INF_EID   40
  'Reset WP stats command: WP = %d'
#define LC_HKREQ_LEN_ERR_EID   41
  'Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
#define LC_APSAMPLE_LEN_ERR_EID   42
  'Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
#define LC_LEN_ERR_EID   43
  'Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
#define LC_UNSUB_WP_ERR_EID   44
  'Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X'
#define LC_SUB_WP_ERR_EID   45
  'Error subscribing watchpoint: MID=0x%04X, RC=0x%08X'
#define LC_WRT_NO_SAVE_ERR_EID   46
  'WRT data NOT saved to CDS on exit, RC=0x%08X'
#define LC_ART_NO_SAVE_ERR_EID   47
  'ART data NOT saved to CDS on exit, RC=0x%08X'
#define LC_APP_NO_SAVE_START_ERR_EID   48
  'Application data NOT saved to CDS on startup, RC=0x%08X'
#define LC_MID_INF_EID   49
  'Msg with unreferenced message ID rcvd: ID = 0x%04X'
#define LC_WP_DATATYPE_ERR_EID   50
  'WP has undefined data type: WP = %d, DataType = %d'
#define LC_WP_OPERID_ERR_EID   51
  'WP has invalid operator ID: WP = %d, OperID = %d'
#define LC_WP_NAN_ERR_EID   52
  'WP data value is a float NAN: WP = %d, Value = 0x%08X'
#define LC_WP_OFFSET_ERR_EID   53
  'WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d'
#define LC_WDTVAL_FPERR_EID   54
  'WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X'
#define LC_WDTVAL_ERR_EID   55
  'WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d'
#define LC_WDTVAL_INF_EID   56
  'WDT verify results: good = %d, bad = %d, unused = %d'
#define LC_APSAMPLE_CURR_ERR_EID   57
  'Sample AP error, invalid current AP state: AP = %d, State = %d'
#define LC_AP_PASSTOFAIL_INF_EID   58
  'AP state change from PASS to FAIL: AP = %d'
#define LC_PASSIVE_FAIL_DBG_EID   59
  'AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d'
#define LC_AP_PASSIVE_FAIL_INF_EID   60
  'AP failed while passive: AP = %d, FailCount = %d, RTS = %d'
#define LC_AP_FAILTOPASS_INF_EID   61
  'AP state change from FAIL to PASS: AP = %d'
#define LC_ACTION_ERROR_ERR_EID   62
  'AP evaluated to error: AP = %d, Result = %d'
#define LC_INVALID_RPN_ERR_EID   63
  'AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d'
#define LC_ADTVAL_RPNERR_EID   64
  'ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d'
#define LC_ADTVAL_ERR_EID   65
  'ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d'
#define LC_ADTVAL_INF_EID   66
  'ADT verify results: good = %d, bad = %d, unused = %d'
#define LC_CFCALL_ERR_EID   67
  'Unexpected LC_CustomFunction call: WP = %d'
#define LC_BASE_AP_EID   1000
  'Base event ID for events defined in the Actionpoint Definition Table'
-


Define Documentation

- -
-
- - - - -
#define LC_ACTION_ERROR_ERR_EID   62
-
-
- -

- 'AP evaluated to error: AP = %d, Result = %d' -

-

Event Message:
'AP evaluated to error: AP = %d, Result = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when an actionpoint evaluation results in LC_ACTION_ERROR

-The AP field is the actionpoint number, the Result field is the evaluation value that triggered the error -

-Definition at line 1070 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ADT_GETADDR_ERR_EID   20
-
-
- -

- 'Error getting ADT address, RC=0x%08X' -

-

Event Message:
'Error getting ADT address, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the address can't be obtained from table services for the actionpoint definition table (ADT).

-The RC field is the return code from the CFE_TBL_GetAddress function call that generated the error. -

-Definition at line 374 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ADT_LOAD_ERR_EID   16
-
-
- -

- 'Error (RC=0x%08X) Loading ADT with '%s'' -

-

Event Message:
'Error (RC=0x%08X) Loading ADT with '%s''
-
Type: ERROR
-
Cause:
-This event message is issued when an error is encountered loading the actionpoint definition table (ADT) from the default file image

-The RC field is the return code from the CFE_TBL_Load call that generated the error, the with field is the name of the load file -

-Definition at line 314 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ADT_REGISTER_ERR_EID   9
-
-
- -

- 'Error registering ADT, RC=0x%08X' -

-

Event Message:
'Error registering ADT, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the actionpoint definition table (ADT) could not be registered.

-The RC field is the return code from the CFE_TBL_Register function call that generated the error. -

-Definition at line 205 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ADTVAL_ERR_EID   65
-
-
- -

- 'ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d' -

-

Event Message:
'ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d'
-
Type: ERROR
-
Cause:
-This event message is issued on the first error when a table validation fails for an actioinpoint definition table (ADT) load and the error is NOT a failed RPN equation check.

-The AP field is the actionpoint number and the other fields are from that actionpoint's definition table entry that failed validation -

-Definition at line 1119 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ADTVAL_INF_EID   66
-
-
- -

- 'ADT verify results: good = %d, bad = %d, unused = %d' -

-

Event Message:
'ADT verify results: good = %d, bad = %d, unused = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when a table validation has been completed for an actionpoint definition table (ADT) load

-The good field is number of entries that passed, the bad field is number of entries that failed, the unused field is the number of entries that weren't checked because they were marked unused. -

-Definition at line 1136 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ADTVAL_RPNERR_EID   64
-
-
- -

- 'ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d' -

-

Event Message:
'ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d'
-
Type: ERROR
-
Cause:
-This event message is issued on the first error when a table validation fails for a actionpoint definition table (ADT) load and the error is a failed RPN equation check.

-The AP field is the watchpoint number, the Index field is the index into the equation where the error occurred, and the StackDepth field contains the RPN stack index when the error occurred. -

-Definition at line 1103 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_AP_FAILTOPASS_INF_EID   61
-
-
- -

- 'AP state change from FAIL to PASS: AP = %d' -

-

Event Message:
'AP state change from FAIL to PASS: AP = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when an actionpoint evaluation transitions from LC_ACTION_FAIL to LC_ACTION_PASS

-The AP field is the actionpoint number that transitioned. -

-Definition at line 1055 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_AP_PASSIVE_FAIL_INF_EID   60
-
-
- -

- 'AP failed while passive: AP = %d, FailCount = %d, RTS = %d' -

-

Event Message:
'AP failed while passive: AP = %d, FailCount = %d, RTS = %d'
-
Type: DEBUG
-
Cause:
-This event message is issued when an actionpoint fails evaluation while the actionpoint state is LC_APSTATE_PASSIVE

-The AP field is the actionpoint number, the FailCount field is how many times this actionpoint has failed, the RTS field is the RTS that wasn't initiated because the actionpoint was passive. -

-Definition at line 1041 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_AP_PASSTOFAIL_INF_EID   58
-
-
- -

- 'AP state change from PASS to FAIL: AP = %d' -

-

Event Message:
'AP state change from PASS to FAIL: AP = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when an actionpoint evaluation transitions from LC_ACTION_PASS to LC_ACTION_FAIL

-The AP field is the actionpoint number that transitioned. -

-Definition at line 1009 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APOFF_APNUM_ERR_EID   34
-
-
- -

- 'Set AP perm off error: Invalid AP number = %d' -

-

Event Message:
'Set AP perm off error: Invalid AP number = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_SET_AP_PERMOFF_CC command has been received with an invalid actionpoint number specified

-The Invalid AP number field is the number specified in the command message that triggered the error -

-Definition at line 626 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APOFF_CURR_ERR_EID   35
-
-
- -

- 'Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d' -

-

Event Message:
'Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_SET_AP_PERMOFF_CC command has been received and the current actionpoint state is not LC_APSTATE_DISABLED

-The AP field is the specified actionpoint number and the The Current state field is the current state of the actionpoint -

-Definition at line 643 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APOFF_INF_EID   36
-
-
- -

- 'Set AP permanently off command: AP = %d' -

-

Event Message:
'Set AP permanently off command: AP = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when the LC_SET_AP_PERMOFF_CC command has been successfully executed

-The AP field is the actionpoint number that has been set to permanently off -

-Definition at line 658 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APP_CDS_REGISTER_ERR_EID   14
-
-
- -

- 'Error registering application data CDS Area, RC=0x%08X' -

-

Event Message:
'Error registering application data CDS Area, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the CDS area for the LC application data could not be registered.

-The RC field is the return code from the CFE_ES_RegisterCDS function call that generated the error. -

-Definition at line 280 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APP_NO_SAVE_START_ERR_EID   48
-
-
- -

- 'Application data NOT saved to CDS on startup, RC=0x%08X' -

-

Event Message:
'Application data NOT saved to CDS on startup, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC application data could not be saved to the CDS on application startup.

-The RC field is the return code from the CFE_ES_CopyToCDS call that generated the error. -

-Definition at line 846 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APSAMPLE_APNUM_ERR_EID   25
-
-
- -

- 'Sample AP error: invalid AP number, start = %d, end = %d' -

-

Event Message:
'Sample AP error: invalid AP number, start = %d, end = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_SAMPLE_AP_MID message has been received with an invalid actionpoint start or end number specified

-The invalid AP number fields are the numbers specified in the command message that triggered the error -

-Definition at line 488 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APSAMPLE_CURR_ERR_EID   57
-
-
- -

- 'Sample AP error, invalid current AP state: AP = %d, State = %d' -

-

Event Message:
'Sample AP error, invalid current AP state: AP = %d, State = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_SAMPLE_AP_MID message has been received and the current state for the specified actionpoint state is either LC_ACTION_NOT_USED or LC_APSTATE_PERMOFF.

-The AP field is the actionpoint number, the state field is the current state of the actionpoint -

-Definition at line 995 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APSAMPLE_LEN_ERR_EID   42
-
-
- -

- 'Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d' -

-

Event Message:
'Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when a actionpoint sample request is received with a message length that doesn't match the expected value.

-The ID field contains the message ID, the CC field contains the command code, the Len field is the actual length returned by the CFE_SB_GetTotalMsgLength call, and the Expected field is the expected length for the message. -

-Definition at line 752 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APSTATE_APNUM_ERR_EID   32
-
-
- -

- 'Set AP state error: Invalid AP number = %d' -

-

Event Message:
'Set AP state error: Invalid AP number = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_SET_AP_STATE_CC command has been received with an invalid actionpoint number specified

-The Invalid AP number field is the number specified in the command message that triggered the error -

-Definition at line 595 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APSTATE_CURR_ERR_EID   31
-
-
- -

- 'Set AP state error: AP = %d, Invalid current AP state = %d' -

-

Event Message:
'Set AP state error: AP = %d, Invalid current AP state = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_SET_AP_STATE_CC command has been received and the current actionpoint state is either LC_ACTION_NOT_USED or LC_APSTATE_PERMOFF which can only be changed with a table load.

-The AP field is the specified actionpoint number and the Invalid current AP state field is the current state that was determined invalid. -

-Definition at line 580 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APSTATE_INF_EID   33
-
-
- -

- 'Set AP state command: AP = %d, New state = %d' -

-

Event Message:
'Set AP state command: AP = %d, New state = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when the LC_SET_AP_STATE_CC command has been successfully executed

-The AP field is the actionpoint number, the New state field is the state specified in the command message that the actionpoint state has been set to. -

-Definition at line 611 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APSTATE_NEW_ERR_EID   30
-
-
- -

- 'Set AP state error: AP = %d, Invalid new state = %d' -

-

Event Message:
'Set AP state error: AP = %d, Invalid new state = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_SET_AP_STATE_CC command has been received with an invalid state argument specified

-The AP field is the specified actionpoint number and the Invalid new state field is the state specified in the command message that triggered the error -

-Definition at line 562 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APSTATS_APNUM_ERR_EID   37
-
-
- -

- 'Reset AP stats error: invalid AP number = %d' -

-

Event Message:
'Reset AP stats error: invalid AP number = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_RESET_AP_STATS_CC command has been received with an invalid actionpoint number specified

-The invalid AP number field is the number specified in the command message that triggered the error -

-Definition at line 673 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_APSTATS_INF_EID   38
-
-
- -

- 'Reset AP stats command: AP = %d' -

-

Event Message:
'Reset AP stats command: AP = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when the LC_RESET_AP_STATS_CC command has been successfully executed

-The AP field is the actionpoint number whose stats have been cleared -

-Definition at line 688 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ART_CDS_REGISTER_ERR_EID   13
-
-
- -

- 'Error registering ART CDS Area, RC=0x%08X' -

-

Event Message:
'Error registering ART CDS Area, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the CDS area for the actionpont restuls table (ART) data could not be registered.

-The RC field is the return code from the CFE_ES_RegisterCDS function call that generated the error. -

-Definition at line 265 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ART_GETADDR_ERR_EID   18
-
-
- -

- 'Error getting ART address, RC=0x%08X' -

-

Event Message:
'Error getting ART address, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the address can't be obtained from table services for the actionpoint results table (ART).

-The RC field is the return code from the CFE_TBL_GetAddress function call that generated the error. -

-Definition at line 344 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ART_NO_SAVE_ERR_EID   47
-
-
- -

- 'ART data NOT saved to CDS on exit, RC=0x%08X' -

-

Event Message:
'ART data NOT saved to CDS on exit, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the actionpoint results table (ART) data could not be saved to the CDS on application exit.

-The RC field is the return code from the CFE_ES_CopyToCDS call that generated the error. -

-Definition at line 831 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_ART_REGISTER_ERR_EID   11
-
-
- -

- 'Error registering ART, RC=0x%08X' -

-

Event Message:
'Error registering ART, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the actionpoint results table (ART) could not be registered.

-The RC field is the return code from the CFE_TBL_Register function call that generated the error. -

-Definition at line 235 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_BASE_AP_EID   1000
-
-
- -

- 'Base event ID for events defined in the Actionpoint Definition Table' -

-

Type: User defined in Actionpoint Definition Table
-
Cause:
-The actionpoint base event ID is designed to avoid conflicts between the event ID's defined above for use by the LC application and the user defined event ID's in the actionpoint table.

-These events are generated when the evaluation of an actionpoint results in sending a command to the stored command (SC) processor to start a real time command sequence (RTS). The event text is user defined and specific to the particular actionpoint.

-Note that user defined event ID's can be easily recognized if the base number is easily recognizable. For example, using the value 1000 for the base event ID and using the actionpoint table index as the offset portion creates an obvious correlation. Thus, if an LC event ID is 1025 then it is immediately apparent that the event is the user defined event for actionpoint table index 25. -

-Definition at line 1176 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_CC_ERR_EID   24
-
-
- -

- 'Invalid command code: ID = 0x%04X, CC = %d' -

-

Event Message:
'Invalid command code: ID = 0x%04X, CC = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when a software bus message is received with an invalid command code.

-The ID field contains the message ID, the CC field contains the command code that generated the error. -

-Definition at line 473 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_CDS_DISABLED_INF_EID   23
-
-
- -

- 'LC use of Critical Data Store disabled, activity mask = 0x%08X' -

-

Event Message:
'LC use of Critical Data Store disabled, activity mask = 0x%08X'
-
Type: INFORMATION
-
Cause:
-This event message is issued following LC startup initialization when the entire LC execution state has been set to default values successfully stored to the Critical Data Store (CDS). Application global data, actionpoint results data and watchpoint results data were stored to CDS areas managed directly by LC. Actionpoint and watchpoint definition table data are stored to the CDS area managed by cFE Table Services.

-This event implies that the CDS areas were not created successfully or that LC was unable to write the default values to CDS.

-Refer to the ActivityMask bit field for specific information about which CDS areas were created successfully.

-Note that an attempt to use CDS is only made when the appropriate parameter is enabled in the LC platform configuration header file.

-

See also:
LC_SAVE_TO_CDS, LC_CDS_RESTORED_INF_EID, LC_CDS_UPDATED_INF_EID
- -

-Definition at line 458 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_CDS_RESTORED_INF_EID   21
-
-
- -

- 'Previous state restored from Critical Data Store' -

-

Event Message:
'Previous state restored from Critical Data Store'
-
Type: INFORMATION
-
Cause:
-This event message is issued following a processor reset when the entire LC execution state has been successfully restored from the Critical Data Store (CDS). Application global data, actionpoint results data and watchpoint results data were restored from CDS areas managed directly by LC. Actionpoint definition table data and watchpoint definition table data were restored from the CDS area managed by cFE Table Services.

-Note that an attempt to use CDS is only made when the appropriate parameter is enabled in the LC platform configuration header file.

-

See also:
LC_SAVE_TO_CDS, LC_CDS_UPDATED_INF_EID, LC_CDS_DISABLED_INF_EID
- -

-Definition at line 396 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_CDS_UPDATED_INF_EID   22
-
-
- -

- 'Default state loaded and written to CDS, activity mask = 0x%08X' -

-

Event Message:
'Default state loaded and written to CDS, activity mask = 0x%08X'
-
Type: INFORMATION
-
Cause:
-This event message is issued following LC startup initialization when the entire LC execution state has been set to default values successfully stored to the Critical Data Store (CDS). Application global data, actionpoint results data and watchpoint results data were stored to CDS areas managed directly by LC. Actionpoint and watchpoint definition table data are stored to the CDS area managed by cFE Table Services.

-This event implies that the CDS areas were created successfully. The reason that previous data was not restored may be due to the reset type (warm vs cold) or to a failure to restore the entire set of data described above. If data from any CDS area cannot be restored, then all data is set to defaults and written to CDS.

-Refer to the ActivityMask bit field for specific information about which CDS areas were created and successfully restored if there are any questions about why the previous values were not restored.

-Note that an attempt to use CDS is only made when the appropriate parameter is enabled in the LC platform configuration header file.

-

See also:
LC_SAVE_TO_CDS, LC_CDS_RESTORED_INF_EID, LC_CDS_DISABLED_INF_EID
- -

-Definition at line 430 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_CFCALL_ERR_EID   67
-
-
- -

- 'Unexpected LC_CustomFunction call: WP = %d' -

-

Event Message:
'Unexpected LC_CustomFunction call: WP = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the mission specific custom function /LC_CustomFunction is called with an unexpected watchpoint ID

-The WP field is the watchpoint number that generated the call -

-Definition at line 1152 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_CR_PIPE_ERR_EID   3
-
-
- -

- 'Error Creating LC Pipe, RC=0x%08X' -

-

Event Message:
'Error Creating LC Pipe, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the CFS Limit Checker is unable to create its command pipe via the CFE_SB_CreatePipe API

-The RC field contains the return status from the CFE_SB_CreatePipe call that generated the error -

-Definition at line 102 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_HKREQ_LEN_ERR_EID   41
-
-
- -

- 'Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d' -

-

Event Message:
'Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when a housekeeping request is received with a message length that doesn't match the expected value.

-The ID field contains the message ID, the CC field contains the command code, the Len field is the actual length returned by the CFE_SB_GetTotalMsgLength call, and the Expected field is the expected length for the message. -

-Definition at line 735 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_INIT_INF_EID   2
-
-
- -

- 'LC Initialized. Version %d.%d.%d.%d' -

-

Event Message:
'LC Initialized. Version %d.%d.%d.%d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when the CFS Limit Checker has completed initialization.

-The first d field contains the Application's Major Version Number The second d field contains the Application's Minor Version Number The third d field contains the Application's Revision Number The fourth d field contains the Application's Mission Revision Number -

-Definition at line 86 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_INVALID_RPN_ERR_EID   63
-
-
- -

- 'AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d' -

-

Event Message:
'AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when an illegal Reverse Polish Notation (RPN) expression is detected during an actionpoint evaluation

-The AP field is the actionpoint number, the LastOperand field is the operand when the error occured, the StackPtr field is the value of the equation stack pointer when the error occured. -

-Definition at line 1086 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_LCSTATE_ERR_EID   29
-
-
- -

- 'Set LC state error: invalid state = %d' -

-

Event Message:
'Set LC state error: invalid state = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_SET_LC_STATE_CC command has been received with an invalid state argument specified

-The invalid state field is the state specified in the command message that triggered the error -

-Definition at line 546 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_LCSTATE_INF_EID   28
-
-
- -

- 'Set LC state command: new state = %d' -

-

Event Message:
'Set LC state command: new state = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when the LC_SET_LC_STATE_CC command has been successfully executed

-The new state field is the state specified in the command message that the LC operating state has been set to. -

-Definition at line 531 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_LEN_ERR_EID   43
-
-
- -

- 'Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d' -

-

Event Message:
'Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when a ground command message is received with a message length that doesn't match the expected value.

-The ID field contains the message ID, the CC field contains the command code, the Len field is the actual length returned by the CFE_SB_GetTotalMsgLength call, and the Expected field is the expected length for a message with that command code. -

-Definition at line 769 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_MID_INF_EID   49
-
-
- -

- 'Msg with unreferenced message ID rcvd: ID = 0x%04X' -

-

Event Message:
'Msg with unreferenced message ID rcvd: ID = 0x%04X'
-
Type: INFORMATION
-
Cause:
-This event message is issued when a software bus message has been received that isn't a recognized LC message and has no defined watchpoints referencing it's message ID

-The ID field is the message ID -

-Definition at line 861 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_NOOP_INF_EID   26
-
-
- -

- 'No-op command: Version %d.%d.%d.%d' -

-

Event Message:
'No-op command: Version %d.%d.%d.%d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when a NOOP command has been received.

-The first d field contains the Application's Major Version Number The second d field contains the Application's Minor Version Number The third d field contains the Application's Revision Number The fourth d field contains the Application's Mission Revision Number -

-Definition at line 504 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_PASSIVE_FAIL_DBG_EID   59
-
-
- -

- 'AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d' -

-

Event Message:
'AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d'
-
Type: DEBUG
-
Cause:
-This event message is issued when an actionpoint fails evaluation while the LC task operating state is LC_STATE_PASSIVE

-The AP field is the actionpoint number, the FailCount field is how many times this actionpoint has failed, the RTS field is the RTS that wasn't initiated because LC was passive. -

-Definition at line 1025 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_RESET_DBG_EID   27
-
-
- -

- 'Reset counters command' -

-

Event Message:
'Reset counters command'
-
Type: DEBUG
-
Cause:
-This event message is issued when a reset counters command has been received. -

-Definition at line 516 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_SUB_GND_CMD_ERR_EID   5
-
-
- -

- 'Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X' -

-

Event Message:
'Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the CFS Limit Checker is unable to subscribe to its ground commands via the CFE_SB_Subscribe API

-The MID field contains the Message ID that LC was attempting to subscribe to. The RC field contains the return status from the CFE_SB_Subscribe call that generated the error -

-Definition at line 138 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_SUB_HK_REQ_ERR_EID   4
-
-
- -

- 'Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X' -

-

Event Message:
'Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the CFS Limit Checker is unable to subscribe to its Housekeeping Request message via the CFE_SB_Subscribe API

-The MID field contains the Message ID that LC was attempting to subscribe to. The RC field contains the return status from the CFE_SB_Subscribe call that generated the error -

-Definition at line 120 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_SUB_SAMPLE_CMD_ERR_EID   6
-
-
- -

- 'Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X' -

-

Event Message:
'Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the CFS Limit Checker is unable to subscribe to its actionpoint sample command via the CFE_SB_Subscribe API

-The MID field contains the Message ID that LC was attempting to subscribe to. The RC field contains the return status from the CFE_SB_Subscribe call that generated the error -

-Definition at line 156 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_SUB_WP_ERR_EID   45
-
-
- -

- 'Error subscribing watchpoint: MID=0x%04X, RC=0x%08X' -

-

Event Message:
'Error subscribing watchpoint: MID=0x%04X, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when an error is encountered when subscribing to a watchpoint message iD

-The MID field is the message ID, the RC field is the return code from the CFE_SB_Subscribe call that generated the error. -

-Definition at line 799 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_TASK_EXIT_EID   1
-
-
- -

- 'Task terminating, err = 0x%08X' -

-

Event Message:
'Task terminating, err = 0x%08X'
-
Type: CRITICAL
-
Cause:
-This event message is issued when the CFS Limit Checker exits due to a fatal error condition.

-The err field contains the return status from the cFE call that caused the task to terminate -

-Definition at line 69 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_UNSUB_WP_ERR_EID   44
-
-
- -

- 'Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X' -

-

Event Message:
'Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when an error is encountered unsubscribing to a watchpoint message ID

-The MID field is the message ID, the RC field is the return code from the CFE_SB_Unsubscribe call that generated the error. -

-Definition at line 784 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WDT_GETADDR_ERR_EID   19
-
-
- -

- 'Error getting WDT address, RC=0x%08X' -

-

Event Message:
'Error getting WDT address, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the address can't be obtained from table services for the watchpoint definition table (WDT).

-The RC field is the return code from the CFE_TBL_GetAddress function call that generated the error. -

-Definition at line 359 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WDT_LOAD_ERR_EID   15
-
-
- -

- 'Error (RC=0x%08X) Loading WDT with '%s'' -

-

Event Message:
'Error (RC=0x%08X) Loading WDT with '%s''
-
Type: ERROR
-
Cause:
-This event message is issued when an error is encountered loading the watchpoint definition table (WDT) from the default file image

-The RC field is the return code from the CFE_TBL_Load call that generated the error, the with field is the name of the load file -

-Definition at line 297 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WDT_REGISTER_ERR_EID   7
-
-
- -

- 'Error registering WDT, RC=0x%08X' -

-

Event Message:
'Error registering WDT, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the watchpoint definition table (WDT) could not be registered.

-The RC field is the return code from the CFE_TBL_Register function call that generated the error. -

-Definition at line 171 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WDT_REREGISTER_ERR_EID   8
-
-
- -

- 'Error re-registering WDT, RC=0x%08X' -

-

Event Message:
'Error re-registering WDT, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the watchpoint definition table (WDT) could not be registered non-critical after first registering and then unregistering the table as critical. This sequence can only occur when the WDT succeeds and the ADT fails the attempt to register as a critical table. This error is extremely unlikely to occur.

-The RC field is the return code from the CFE_TBL_Register function call that generated the error. -

-Definition at line 190 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WDTVAL_ERR_EID   55
-
-
- -

- 'WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d' -

-

Event Message:
'WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d'
-
Type: ERROR
-
Cause:
-This event message is issued on the first error when a table validation fails for a watchpoint definition table (WDT) load and the error is NOT a failed floating point check.

-The WP field is the watchpoint number and the other fields are from that watchpoint's definition table entry that failed validation -

-Definition at line 962 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WDTVAL_FPERR_EID   54
-
-
- -

- 'WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X' -

-

Event Message:
'WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued on the first error when a table validation fails for a watchpoint definition table (WDT) load and the error is a failed floating point check. This error is caused when the data type for a wachpoint definition is floating point and the comparison value equates to a floating point NAN (not-a-number) or infinite value.

-The WP field is the watchpoint number, the Err field is an error identifier, the ComparisonValue field contains the data that triggered the error displayed as a 32 bit hexadecimal number -

-Definition at line 946 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WDTVAL_INF_EID   56
-
-
- -

- 'WDT verify results: good = %d, bad = %d, unused = %d' -

-

Event Message:
'WDT verify results: good = %d, bad = %d, unused = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when a table validation has been completed for a watchpoint definition table (WDT) load

-The good field is number of entries that passed, the bad field is number of entries that failed, the unused field is the number of entries that weren't checked because they were marked unused. -

-Definition at line 979 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WP_DATATYPE_ERR_EID   50
-
-
- -

- 'WP has undefined data type: WP = %d, DataType = %d' -

-

Event Message:
'WP has undefined data type: WP = %d, DataType = %d'
-
Type: ERROR
-
Cause:
-This event message is issued whenever an undefined watchpoint data type identifier is detected

-The WP field is the watchpoint number, the DataType field is the data type value that triggered the error -

-Definition at line 876 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WP_NAN_ERR_EID   52
-
-
- -

- 'WP data value is a float NAN: WP = %d, Value = 0x%08X' -

-

Event Message:
'WP data value is a float NAN: WP = %d, Value = 0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when a watchpoint is defined as a float type, but the extracted value would equate to a floating point NAN (not-a-number) value

-The WP field is the watchpoint number, the Value field is the watchpoint value that triggered the error displayed as a 32 bit hexidecimal number. -

-Definition at line 908 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WP_OFFSET_ERR_EID   53
-
-
- -

- 'WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d' -

-

Event Message:
'WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when a watchpoint offset value extends past the end of the message as reported by the CFE_SB_GetTotalMsgLength function

-The MID field is the message ID, the WP field is the watchpoint number, the Offset field is the watchpoint offset, the DataSize field is the size of the watchpoint data in bytes, the MsgLen field is the reported message length from CFE_SB_GetTotalMsgLength. -

-Definition at line 926 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WP_OPERID_ERR_EID   51
-
-
- -

- 'WP has invalid operator ID: WP = %d, OperID = %d' -

-

Event Message:
'WP has invalid operator ID: WP = %d, OperID = %d'
-
Type: ERROR
-
Cause:
-This event message is issued whenever an undefined watchpoint operator identifier is detected

-The WP field is the watchpoint number, the OperID field is the operator ID value that triggered the error -

-Definition at line 891 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WPSTATS_INF_EID   40
-
-
- -

- 'Reset WP stats command: WP = %d' -

-

Event Message:
'Reset WP stats command: WP = %d'
-
Type: INFORMATION
-
Cause:
-This event message is issued when the LC_RESET_WP_STATS_CC command has been successfully executed

-The WP field is the watchpoint number whose stats have been cleared -

-Definition at line 718 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WPSTATS_WPNUM_ERR_EID   39
-
-
- -

- 'Reset WP stats error: invalid WP number = %d' -

-

Event Message:
'Reset WP stats error: invalid WP number = %d'
-
Type: ERROR
-
Cause:
-This event message is issued when the LC_RESET_WP_STATS_CC command has been received with an invalid watchpoint number specified

-The invalid WP number field is the number specified in the command message that triggered the error -

-Definition at line 703 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WRT_CDS_REGISTER_ERR_EID   12
-
-
- -

- 'Error registering WRT CDS Area, RC=0x%08X' -

-

Event Message:
'Error registering WRT CDS Area, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the CDS area for the watchpoint restuls table (WRT) data could not be registered.

-The RC field is the return code from the CFE_ES_RegisterCDS function call that generated the error. -

-Definition at line 250 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WRT_GETADDR_ERR_EID   17
-
-
- -

- 'Error getting WRT address, RC=0x%08X' -

-

Event Message:
'Error getting WRT address, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the address can't be obtained from table services for the watchpoint results table (WRT).

-The RC field is the return code from the CFE_TBL_GetAddress function call that generated the error. -

-Definition at line 329 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WRT_NO_SAVE_ERR_EID   46
-
-
- -

- 'WRT data NOT saved to CDS on exit, RC=0x%08X' -

-

Event Message:
'WRT data NOT saved to CDS on exit, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the watchpoint results table (WRT) data could not be saved to the CDS on application exit.

-The RC field is the return code from the CFE_ES_CopyToCDS call that generated the error. -

-Definition at line 815 of file lc_events.h. -

-

- -

-
- - - - -
#define LC_WRT_REGISTER_ERR_EID   10
-
-
- -

- 'Error registering WRT, RC=0x%08X' -

-

Event Message:
'Error registering WRT, RC=0x%08X'
-
Type: ERROR
-
Cause:
-This event message is issued when the watchpoint results table (WRT) could not be registered.

-The RC field is the return code from the CFE_TBL_Register function call that generated the error. -

-Definition at line 220 of file lc_events.h. -

-

-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_events.h File Reference + + + + + + +
+

lc_events.h File Reference

+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define LC_TASK_EXIT_EID   1
  'Task terminating, err = 0x%08X'
#define LC_INIT_INF_EID   2
  'LC Initialized. Version %d.%d.%d.%d'
#define LC_CR_PIPE_ERR_EID   3
  'Error Creating LC Pipe, RC=0x%08X'
#define LC_SUB_HK_REQ_ERR_EID   4
  'Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X'
#define LC_SUB_GND_CMD_ERR_EID   5
  'Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X'
#define LC_SUB_SAMPLE_CMD_ERR_EID   6
  'Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X'
#define LC_WDT_REGISTER_ERR_EID   7
  'Error registering WDT, RC=0x%08X'
#define LC_WDT_REREGISTER_ERR_EID   8
  'Error re-registering WDT, RC=0x%08X'
#define LC_ADT_REGISTER_ERR_EID   9
  'Error registering ADT, RC=0x%08X'
#define LC_WRT_REGISTER_ERR_EID   10
  'Error registering WRT, RC=0x%08X'
#define LC_ART_REGISTER_ERR_EID   11
  'Error registering ART, RC=0x%08X'
#define LC_WRT_CDS_REGISTER_ERR_EID   12
  'Error registering WRT CDS Area, RC=0x%08X'
#define LC_ART_CDS_REGISTER_ERR_EID   13
  'Error registering ART CDS Area, RC=0x%08X'
#define LC_APP_CDS_REGISTER_ERR_EID   14
  'Error registering application data CDS Area, RC=0x%08X'
#define LC_WDT_LOAD_ERR_EID   15
  'Error (RC=0x%08X) Loading WDT with '%s''
#define LC_ADT_LOAD_ERR_EID   16
  'Error (RC=0x%08X) Loading ADT with '%s''
#define LC_WRT_GETADDR_ERR_EID   17
  'Error getting WRT address, RC=0x%08X'
#define LC_ART_GETADDR_ERR_EID   18
  'Error getting ART address, RC=0x%08X'
#define LC_WDT_GETADDR_ERR_EID   19
  'Error getting WDT address, RC=0x%08X'
#define LC_ADT_GETADDR_ERR_EID   20
  'Error getting ADT address, RC=0x%08X'
#define LC_CDS_RESTORED_INF_EID   21
  'Previous state restored from Critical Data Store'
#define LC_CDS_UPDATED_INF_EID   22
  'Default state loaded and written to CDS, activity mask = 0x%08X'
#define LC_CDS_DISABLED_INF_EID   23
  'LC use of Critical Data Store disabled, activity mask = 0x%08X'
#define LC_CC_ERR_EID   24
  'Invalid command code: ID = 0x%04X, CC = %d'
#define LC_APSAMPLE_APNUM_ERR_EID   25
  'Sample AP error: invalid AP number, start = %d, end = %d'
#define LC_NOOP_INF_EID   26
  'No-op command: Version %d.%d.%d.%d'
#define LC_RESET_DBG_EID   27
  'Reset counters command'
#define LC_LCSTATE_INF_EID   28
  'Set LC state command: new state = %d'
#define LC_LCSTATE_ERR_EID   29
  'Set LC state error: invalid state = %d'
#define LC_APSTATE_NEW_ERR_EID   30
  'Set AP state error: AP = %d, Invalid new state = %d'
#define LC_APSTATE_CURR_ERR_EID   31
  'Set AP state error: AP = %d, Invalid current AP state = %d'
#define LC_APSTATE_APNUM_ERR_EID   32
  'Set AP state error: Invalid AP number = %d'
#define LC_APSTATE_INF_EID   33
  'Set AP state command: AP = %d, New state = %d'
#define LC_APOFF_APNUM_ERR_EID   34
  'Set AP perm off error: Invalid AP number = %d'
#define LC_APOFF_CURR_ERR_EID   35
  'Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d'
#define LC_APOFF_INF_EID   36
  'Set AP permanently off command: AP = %d'
#define LC_APSTATS_APNUM_ERR_EID   37
  'Reset AP stats error: invalid AP number = %d'
#define LC_APSTATS_INF_EID   38
  'Reset AP stats command: AP = %d'
#define LC_WPSTATS_WPNUM_ERR_EID   39
  'Reset WP stats error: invalid WP number = %d'
#define LC_WPSTATS_INF_EID   40
  'Reset WP stats command: WP = %d'
#define LC_HKREQ_LEN_ERR_EID   41
  'Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
#define LC_APSAMPLE_LEN_ERR_EID   42
  'Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
#define LC_LEN_ERR_EID   43
  'Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
#define LC_UNSUB_WP_ERR_EID   44
  'Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X'
#define LC_SUB_WP_ERR_EID   45
  'Error subscribing watchpoint: MID=0x%04X, RC=0x%08X'
#define LC_WRT_NO_SAVE_ERR_EID   46
  'WRT data NOT saved to CDS on exit, RC=0x%08X'
#define LC_ART_NO_SAVE_ERR_EID   47
  'ART data NOT saved to CDS on exit, RC=0x%08X'
#define LC_APP_NO_SAVE_START_ERR_EID   48
  'Application data NOT saved to CDS on startup, RC=0x%08X'
#define LC_MID_INF_EID   49
  'Msg with unreferenced message ID rcvd: ID = 0x%04X'
#define LC_WP_DATATYPE_ERR_EID   50
  'WP has undefined data type: WP = %d, DataType = %d'
#define LC_WP_OPERID_ERR_EID   51
  'WP has invalid operator ID: WP = %d, OperID = %d'
#define LC_WP_NAN_ERR_EID   52
  'WP data value is a float NAN: WP = %d, Value = 0x%08X'
#define LC_WP_OFFSET_ERR_EID   53
  'WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d'
#define LC_WDTVAL_FPERR_EID   54
  'WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X'
#define LC_WDTVAL_ERR_EID   55
  'WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d'
#define LC_WDTVAL_INF_EID   56
  'WDT verify results: good = %d, bad = %d, unused = %d'
#define LC_APSAMPLE_CURR_ERR_EID   57
  'Sample AP error, invalid current AP state: AP = %d, State = %d'
#define LC_AP_PASSTOFAIL_INF_EID   58
  'AP state change from PASS to FAIL: AP = %d'
#define LC_PASSIVE_FAIL_DBG_EID   59
  'AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d'
#define LC_AP_PASSIVE_FAIL_INF_EID   60
  'AP failed while passive: AP = %d, FailCount = %d, RTS = %d'
#define LC_AP_FAILTOPASS_INF_EID   61
  'AP state change from FAIL to PASS: AP = %d'
#define LC_ACTION_ERROR_ERR_EID   62
  'AP evaluated to error: AP = %d, Result = %d'
#define LC_INVALID_RPN_ERR_EID   63
  'AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d'
#define LC_ADTVAL_RPNERR_EID   64
  'ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d'
#define LC_ADTVAL_ERR_EID   65
  'ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d'
#define LC_ADTVAL_INF_EID   66
  'ADT verify results: good = %d, bad = %d, unused = %d'
#define LC_CFCALL_ERR_EID   67
  'Unexpected LC_CustomFunction call: WP = %d'
#define LC_BASE_AP_EID   1000
  'Base event ID for events defined in the Actionpoint Definition Table'
+

Define Documentation

+ +
+
+ + + + +
#define LC_ACTION_ERROR_ERR_EID   62
+
+
+ +

'AP evaluated to error: AP = %d, Result = %d'

+
Event Message:
'AP evaluated to error: AP = %d, Result = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when an actionpoint evaluation results in LC_ACTION_ERROR

+

The AP field is the actionpoint number, the Result field is the evaluation value that triggered the error

+ +

Definition at line 1038 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADT_GETADDR_ERR_EID   20
+
+
+ +

'Error getting ADT address, RC=0x%08X'

+
Event Message:
'Error getting ADT address, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the address can't be obtained from table services for the actionpoint definition table (ADT).

+

The RC field is the return code from the CFE_TBL_GetAddress function call that generated the error.

+ +

Definition at line 342 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADT_LOAD_ERR_EID   16
+
+
+ +

'Error (RC=0x%08X) Loading ADT with '%s''

+
Event Message:
'Error (RC=0x%08X) Loading ADT with '%s''
+
Type: ERROR
+
Cause:
+

This event message is issued when an error is encountered loading the actionpoint definition table (ADT) from the default file image

+

The RC field is the return code from the CFE_TBL_Load call that generated the error, the with field is the name of the load file

+ +

Definition at line 282 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADT_REGISTER_ERR_EID   9
+
+
+ +

'Error registering ADT, RC=0x%08X'

+
Event Message:
'Error registering ADT, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the actionpoint definition table (ADT) could not be registered.

+

The RC field is the return code from the CFE_TBL_Register function call that generated the error.

+ +

Definition at line 173 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADTVAL_ERR_EID   65
+
+
+ +

'ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d'

+
Event Message:
'ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued on the first error when a table validation fails for an actioinpoint definition table (ADT) load and the error is NOT a failed RPN equation check.

+

The AP field is the actionpoint number and the other fields are from that actionpoint's definition table entry that failed validation

+ +

Definition at line 1087 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADTVAL_INF_EID   66
+
+
+ +

'ADT verify results: good = %d, bad = %d, unused = %d'

+
Event Message:
'ADT verify results: good = %d, bad = %d, unused = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when a table validation has been completed for an actionpoint definition table (ADT) load

+

The good field is number of entries that passed, the bad field is number of entries that failed, the unused field is the number of entries that weren't checked because they were marked unused.

+ +

Definition at line 1104 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADTVAL_RPNERR_EID   64
+
+
+ +

'ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d'

+
Event Message:
'ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued on the first error when a table validation fails for a actionpoint definition table (ADT) load and the error is a failed RPN equation check.

+

The AP field is the watchpoint number, the Index field is the index into the equation where the error occurred, and the StackDepth field contains the RPN stack index when the error occurred.

+ +

Definition at line 1071 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_AP_FAILTOPASS_INF_EID   61
+
+
+ +

'AP state change from FAIL to PASS: AP = %d'

+
Event Message:
'AP state change from FAIL to PASS: AP = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when an actionpoint evaluation transitions from LC_ACTION_FAIL to LC_ACTION_PASS

+

The AP field is the actionpoint number that transitioned.

+ +

Definition at line 1023 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_AP_PASSIVE_FAIL_INF_EID   60
+
+
+ +

'AP failed while passive: AP = %d, FailCount = %d, RTS = %d'

+
Event Message:
'AP failed while passive: AP = %d, FailCount = %d, RTS = %d'
+
Type: DEBUG
+
Cause:
+

This event message is issued when an actionpoint fails evaluation while the actionpoint state is LC_APSTATE_PASSIVE

+

The AP field is the actionpoint number, the FailCount field is how many times this actionpoint has failed, the RTS field is the RTS that wasn't initiated because the actionpoint was passive.

+ +

Definition at line 1009 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_AP_PASSTOFAIL_INF_EID   58
+
+
+ +

'AP state change from PASS to FAIL: AP = %d'

+
Event Message:
'AP state change from PASS to FAIL: AP = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when an actionpoint evaluation transitions from LC_ACTION_PASS to LC_ACTION_FAIL

+

The AP field is the actionpoint number that transitioned.

+ +

Definition at line 977 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APOFF_APNUM_ERR_EID   34
+
+
+ +

'Set AP perm off error: Invalid AP number = %d'

+
Event Message:
'Set AP perm off error: Invalid AP number = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_SET_AP_PERMOFF_CC command has been received with an invalid actionpoint number specified

+

The Invalid AP number field is the number specified in the command message that triggered the error

+ +

Definition at line 594 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APOFF_CURR_ERR_EID   35
+
+
+ +

'Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d'

+
Event Message:
'Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_SET_AP_PERMOFF_CC command has been received and the current actionpoint state is not LC_APSTATE_DISABLED

+

The AP field is the specified actionpoint number and the The Current state field is the current state of the actionpoint

+ +

Definition at line 611 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APOFF_INF_EID   36
+
+
+ +

'Set AP permanently off command: AP = %d'

+
Event Message:
'Set AP permanently off command: AP = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when the LC_SET_AP_PERMOFF_CC command has been successfully executed

+

The AP field is the actionpoint number that has been set to permanently off

+ +

Definition at line 626 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APP_CDS_REGISTER_ERR_EID   14
+
+
+ +

'Error registering application data CDS Area, RC=0x%08X'

+
Event Message:
'Error registering application data CDS Area, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the CDS area for the LC application data could not be registered.

+

The RC field is the return code from the CFE_ES_RegisterCDS function call that generated the error.

+ +

Definition at line 248 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APP_NO_SAVE_START_ERR_EID   48
+
+
+ +

'Application data NOT saved to CDS on startup, RC=0x%08X'

+
Event Message:
'Application data NOT saved to CDS on startup, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC application data could not be saved to the CDS on application startup.

+

The RC field is the return code from the CFE_ES_CopyToCDS call that generated the error.

+ +

Definition at line 814 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSAMPLE_APNUM_ERR_EID   25
+
+
+ +

'Sample AP error: invalid AP number, start = %d, end = %d'

+
Event Message:
'Sample AP error: invalid AP number, start = %d, end = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_SAMPLE_AP_MID message has been received with an invalid actionpoint start or end number specified

+

The invalid AP number fields are the numbers specified in the command message that triggered the error

+ +

Definition at line 456 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSAMPLE_CURR_ERR_EID   57
+
+
+ +

'Sample AP error, invalid current AP state: AP = %d, State = %d'

+
Event Message:
'Sample AP error, invalid current AP state: AP = %d, State = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_SAMPLE_AP_MID message has been received and the current state for the specified actionpoint state is either LC_ACTION_NOT_USED or LC_APSTATE_PERMOFF.

+

The AP field is the actionpoint number, the state field is the current state of the actionpoint

+ +

Definition at line 963 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSAMPLE_LEN_ERR_EID   42
+
+
+ +

'Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'

+
Event Message:
'Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when a actionpoint sample request is received with a message length that doesn't match the expected value.

+

The ID field contains the message ID, the CC field contains the command code, the Len field is the actual length returned by the CFE_SB_GetTotalMsgLength call, and the Expected field is the expected length for the message.

+ +

Definition at line 720 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATE_APNUM_ERR_EID   32
+
+
+ +

'Set AP state error: Invalid AP number = %d'

+
Event Message:
'Set AP state error: Invalid AP number = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_SET_AP_STATE_CC command has been received with an invalid actionpoint number specified

+

The Invalid AP number field is the number specified in the command message that triggered the error

+ +

Definition at line 563 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATE_CURR_ERR_EID   31
+
+
+ +

'Set AP state error: AP = %d, Invalid current AP state = %d'

+
Event Message:
'Set AP state error: AP = %d, Invalid current AP state = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_SET_AP_STATE_CC command has been received and the current actionpoint state is either LC_ACTION_NOT_USED or LC_APSTATE_PERMOFF which can only be changed with a table load.

+

The AP field is the specified actionpoint number and the Invalid current AP state field is the current state that was determined invalid.

+ +

Definition at line 548 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATE_INF_EID   33
+
+
+ +

'Set AP state command: AP = %d, New state = %d'

+
Event Message:
'Set AP state command: AP = %d, New state = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when the LC_SET_AP_STATE_CC command has been successfully executed

+

The AP field is the actionpoint number, the New state field is the state specified in the command message that the actionpoint state has been set to.

+ +

Definition at line 579 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATE_NEW_ERR_EID   30
+
+
+ +

'Set AP state error: AP = %d, Invalid new state = %d'

+
Event Message:
'Set AP state error: AP = %d, Invalid new state = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_SET_AP_STATE_CC command has been received with an invalid state argument specified

+

The AP field is the specified actionpoint number and the Invalid new state field is the state specified in the command message that triggered the error

+ +

Definition at line 530 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATS_APNUM_ERR_EID   37
+
+
+ +

'Reset AP stats error: invalid AP number = %d'

+
Event Message:
'Reset AP stats error: invalid AP number = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_RESET_AP_STATS_CC command has been received with an invalid actionpoint number specified

+

The invalid AP number field is the number specified in the command message that triggered the error

+ +

Definition at line 641 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATS_INF_EID   38
+
+
+ +

'Reset AP stats command: AP = %d'

+
Event Message:
'Reset AP stats command: AP = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when the LC_RESET_AP_STATS_CC command has been successfully executed

+

The AP field is the actionpoint number whose stats have been cleared

+ +

Definition at line 656 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ART_CDS_REGISTER_ERR_EID   13
+
+
+ +

'Error registering ART CDS Area, RC=0x%08X'

+
Event Message:
'Error registering ART CDS Area, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the CDS area for the actionpont restuls table (ART) data could not be registered.

+

The RC field is the return code from the CFE_ES_RegisterCDS function call that generated the error.

+ +

Definition at line 233 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ART_GETADDR_ERR_EID   18
+
+
+ +

'Error getting ART address, RC=0x%08X'

+
Event Message:
'Error getting ART address, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the address can't be obtained from table services for the actionpoint results table (ART).

+

The RC field is the return code from the CFE_TBL_GetAddress function call that generated the error.

+ +

Definition at line 312 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ART_NO_SAVE_ERR_EID   47
+
+
+ +

'ART data NOT saved to CDS on exit, RC=0x%08X'

+
Event Message:
'ART data NOT saved to CDS on exit, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the actionpoint results table (ART) data could not be saved to the CDS on application exit.

+

The RC field is the return code from the CFE_ES_CopyToCDS call that generated the error.

+ +

Definition at line 799 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_ART_REGISTER_ERR_EID   11
+
+
+ +

'Error registering ART, RC=0x%08X'

+
Event Message:
'Error registering ART, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the actionpoint results table (ART) could not be registered.

+

The RC field is the return code from the CFE_TBL_Register function call that generated the error.

+ +

Definition at line 203 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_BASE_AP_EID   1000
+
+
+ +

'Base event ID for events defined in the Actionpoint Definition Table'

+
Type: User defined in Actionpoint Definition Table
+
Cause:
+

The actionpoint base event ID is designed to avoid conflicts between the event ID's defined above for use by the LC application and the user defined event ID's in the actionpoint table.

+

These events are generated when the evaluation of an actionpoint results in sending a command to the stored command (SC) processor to start a real time command sequence (RTS). The event text is user defined and specific to the particular actionpoint.

+

Note that user defined event ID's can be easily recognized if the base number is easily recognizable. For example, using the value 1000 for the base event ID and using the actionpoint table index as the offset portion creates an obvious correlation. Thus, if an LC event ID is 1025 then it is immediately apparent that the event is the user defined event for actionpoint table index 25.

+ +

Definition at line 1144 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_CC_ERR_EID   24
+
+
+ +

'Invalid command code: ID = 0x%04X, CC = %d'

+
Event Message:
'Invalid command code: ID = 0x%04X, CC = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when a software bus message is received with an invalid command code.

+

The ID field contains the message ID, the CC field contains the command code that generated the error.

+ +

Definition at line 441 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_CDS_DISABLED_INF_EID   23
+
+
+ +

'LC use of Critical Data Store disabled, activity mask = 0x%08X'

+
Event Message:
'LC use of Critical Data Store disabled, activity mask = 0x%08X'
+
Type: INFORMATION
+
Cause:
+

This event message is issued following LC startup initialization when the entire LC execution state has been set to default values successfully stored to the Critical Data Store (CDS). Application global data, actionpoint results data and watchpoint results data were stored to CDS areas managed directly by LC. Actionpoint and watchpoint definition table data are stored to the CDS area managed by cFE Table Services.

+

This event implies that the CDS areas were not created successfully or that LC was unable to write the default values to CDS.

+

Refer to the ActivityMask bit field for specific information about which CDS areas were created successfully.

+

Note that an attempt to use CDS is only made when the appropriate parameter is enabled in the LC platform configuration header file.

+
See also:
LC_SAVE_TO_CDS, LC_CDS_RESTORED_INF_EID, LC_CDS_UPDATED_INF_EID
+ +

Definition at line 426 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_CDS_RESTORED_INF_EID   21
+
+
+ +

'Previous state restored from Critical Data Store'

+
Event Message:
'Previous state restored from Critical Data Store'
+
Type: INFORMATION
+
Cause:
+

This event message is issued following a processor reset when the entire LC execution state has been successfully restored from the Critical Data Store (CDS). Application global data, actionpoint results data and watchpoint results data were restored from CDS areas managed directly by LC. Actionpoint definition table data and watchpoint definition table data were restored from the CDS area managed by cFE Table Services.

+

Note that an attempt to use CDS is only made when the appropriate parameter is enabled in the LC platform configuration header file.

+
See also:
LC_SAVE_TO_CDS, LC_CDS_UPDATED_INF_EID, LC_CDS_DISABLED_INF_EID
+ +

Definition at line 364 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_CDS_UPDATED_INF_EID   22
+
+
+ +

'Default state loaded and written to CDS, activity mask = 0x%08X'

+
Event Message:
'Default state loaded and written to CDS, activity mask = 0x%08X'
+
Type: INFORMATION
+
Cause:
+

This event message is issued following LC startup initialization when the entire LC execution state has been set to default values successfully stored to the Critical Data Store (CDS). Application global data, actionpoint results data and watchpoint results data were stored to CDS areas managed directly by LC. Actionpoint and watchpoint definition table data are stored to the CDS area managed by cFE Table Services.

+

This event implies that the CDS areas were created successfully. The reason that previous data was not restored may be due to the reset type (warm vs cold) or to a failure to restore the entire set of data described above. If data from any CDS area cannot be restored, then all data is set to defaults and written to CDS.

+

Refer to the ActivityMask bit field for specific information about which CDS areas were created and successfully restored if there are any questions about why the previous values were not restored.

+

Note that an attempt to use CDS is only made when the appropriate parameter is enabled in the LC platform configuration header file.

+
See also:
LC_SAVE_TO_CDS, LC_CDS_RESTORED_INF_EID, LC_CDS_DISABLED_INF_EID
+ +

Definition at line 398 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_CFCALL_ERR_EID   67
+
+
+ +

'Unexpected LC_CustomFunction call: WP = %d'

+
Event Message:
'Unexpected LC_CustomFunction call: WP = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the mission specific custom function /LC_CustomFunction is called with an unexpected watchpoint ID

+

The WP field is the watchpoint number that generated the call

+ +

Definition at line 1120 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_CR_PIPE_ERR_EID   3
+
+
+ +

'Error Creating LC Pipe, RC=0x%08X'

+
Event Message:
'Error Creating LC Pipe, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the CFS Limit Checker is unable to create its command pipe via the CFE_SB_CreatePipe API

+

The RC field contains the return status from the CFE_SB_CreatePipe call that generated the error

+ +

Definition at line 70 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKREQ_LEN_ERR_EID   41
+
+
+ +

'Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'

+
Event Message:
'Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when a housekeeping request is received with a message length that doesn't match the expected value.

+

The ID field contains the message ID, the CC field contains the command code, the Len field is the actual length returned by the CFE_SB_GetTotalMsgLength call, and the Expected field is the expected length for the message.

+ +

Definition at line 703 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_INIT_INF_EID   2
+
+
+ +

'LC Initialized. Version %d.%d.%d.%d'

+
Event Message:
'LC Initialized. Version %d.%d.%d.%d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when the CFS Limit Checker has completed initialization.

+

The first d field contains the Application's Major Version Number The second d field contains the Application's Minor Version Number The third d field contains the Application's Revision Number The fourth d field contains the Application's Mission Revision Number

+ +

Definition at line 54 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_INVALID_RPN_ERR_EID   63
+
+
+ +

'AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d'

+
Event Message:
'AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when an illegal Reverse Polish Notation (RPN) expression is detected during an actionpoint evaluation

+

The AP field is the actionpoint number, the LastOperand field is the operand when the error occured, the StackPtr field is the value of the equation stack pointer when the error occured.

+ +

Definition at line 1054 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_LCSTATE_ERR_EID   29
+
+
+ +

'Set LC state error: invalid state = %d'

+
Event Message:
'Set LC state error: invalid state = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_SET_LC_STATE_CC command has been received with an invalid state argument specified

+

The invalid state field is the state specified in the command message that triggered the error

+ +

Definition at line 514 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_LCSTATE_INF_EID   28
+
+
+ +

'Set LC state command: new state = %d'

+
Event Message:
'Set LC state command: new state = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when the LC_SET_LC_STATE_CC command has been successfully executed

+

The new state field is the state specified in the command message that the LC operating state has been set to.

+ +

Definition at line 499 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_LEN_ERR_EID   43
+
+
+ +

'Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'

+
Event Message:
'Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when a ground command message is received with a message length that doesn't match the expected value.

+

The ID field contains the message ID, the CC field contains the command code, the Len field is the actual length returned by the CFE_SB_GetTotalMsgLength call, and the Expected field is the expected length for a message with that command code.

+ +

Definition at line 737 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_MID_INF_EID   49
+
+
+ +

'Msg with unreferenced message ID rcvd: ID = 0x%04X'

+
Event Message:
'Msg with unreferenced message ID rcvd: ID = 0x%04X'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when a software bus message has been received that isn't a recognized LC message and has no defined watchpoints referencing it's message ID

+

The ID field is the message ID

+ +

Definition at line 829 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_NOOP_INF_EID   26
+
+
+ +

'No-op command: Version %d.%d.%d.%d'

+
Event Message:
'No-op command: Version %d.%d.%d.%d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when a NOOP command has been received.

+

The first d field contains the Application's Major Version Number The second d field contains the Application's Minor Version Number The third d field contains the Application's Revision Number The fourth d field contains the Application's Mission Revision Number

+ +

Definition at line 472 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_PASSIVE_FAIL_DBG_EID   59
+
+
+ +

'AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d'

+
Event Message:
'AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d'
+
Type: DEBUG
+
Cause:
+

This event message is issued when an actionpoint fails evaluation while the LC task operating state is LC_STATE_PASSIVE

+

The AP field is the actionpoint number, the FailCount field is how many times this actionpoint has failed, the RTS field is the RTS that wasn't initiated because LC was passive.

+ +

Definition at line 993 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_RESET_DBG_EID   27
+
+
+ +

'Reset counters command'

+
Event Message:
'Reset counters command'
+
Type: DEBUG
+
Cause:
+

This event message is issued when a reset counters command has been received.

+ +

Definition at line 484 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_SUB_GND_CMD_ERR_EID   5
+
+
+ +

'Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X'

+
Event Message:
'Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the CFS Limit Checker is unable to subscribe to its ground commands via the CFE_SB_Subscribe API

+

The MID field contains the Message ID that LC was attempting to subscribe to. The RC field contains the return status from the CFE_SB_Subscribe call that generated the error

+ +

Definition at line 106 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_SUB_HK_REQ_ERR_EID   4
+
+
+ +

'Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X'

+
Event Message:
'Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the CFS Limit Checker is unable to subscribe to its Housekeeping Request message via the CFE_SB_Subscribe API

+

The MID field contains the Message ID that LC was attempting to subscribe to. The RC field contains the return status from the CFE_SB_Subscribe call that generated the error

+ +

Definition at line 88 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_SUB_SAMPLE_CMD_ERR_EID   6
+
+
+ +

'Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X'

+
Event Message:
'Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the CFS Limit Checker is unable to subscribe to its actionpoint sample command via the CFE_SB_Subscribe API

+

The MID field contains the Message ID that LC was attempting to subscribe to. The RC field contains the return status from the CFE_SB_Subscribe call that generated the error

+ +

Definition at line 124 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_SUB_WP_ERR_EID   45
+
+
+ +

'Error subscribing watchpoint: MID=0x%04X, RC=0x%08X'

+
Event Message:
'Error subscribing watchpoint: MID=0x%04X, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when an error is encountered when subscribing to a watchpoint message iD

+

The MID field is the message ID, the RC field is the return code from the CFE_SB_Subscribe call that generated the error.

+ +

Definition at line 767 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_TASK_EXIT_EID   1
+
+
+ +

'Task terminating, err = 0x%08X'

+
Event Message:
'Task terminating, err = 0x%08X'
+
Type: CRITICAL
+
Cause:
+

This event message is issued when the CFS Limit Checker exits due to a fatal error condition.

+

The err field contains the return status from the cFE call that caused the task to terminate

+ +

Definition at line 37 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_UNSUB_WP_ERR_EID   44
+
+
+ +

'Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X'

+
Event Message:
'Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when an error is encountered unsubscribing to a watchpoint message ID

+

The MID field is the message ID, the RC field is the return code from the CFE_SB_Unsubscribe call that generated the error.

+ +

Definition at line 752 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDT_GETADDR_ERR_EID   19
+
+
+ +

'Error getting WDT address, RC=0x%08X'

+
Event Message:
'Error getting WDT address, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the address can't be obtained from table services for the watchpoint definition table (WDT).

+

The RC field is the return code from the CFE_TBL_GetAddress function call that generated the error.

+ +

Definition at line 327 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDT_LOAD_ERR_EID   15
+
+
+ +

'Error (RC=0x%08X) Loading WDT with '%s''

+
Event Message:
'Error (RC=0x%08X) Loading WDT with '%s''
+
Type: ERROR
+
Cause:
+

This event message is issued when an error is encountered loading the watchpoint definition table (WDT) from the default file image

+

The RC field is the return code from the CFE_TBL_Load call that generated the error, the with field is the name of the load file

+ +

Definition at line 265 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDT_REGISTER_ERR_EID   7
+
+
+ +

'Error registering WDT, RC=0x%08X'

+
Event Message:
'Error registering WDT, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the watchpoint definition table (WDT) could not be registered.

+

The RC field is the return code from the CFE_TBL_Register function call that generated the error.

+ +

Definition at line 139 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDT_REREGISTER_ERR_EID   8
+
+
+ +

'Error re-registering WDT, RC=0x%08X'

+
Event Message:
'Error re-registering WDT, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the watchpoint definition table (WDT) could not be registered non-critical after first registering and then unregistering the table as critical. This sequence can only occur when the WDT succeeds and the ADT fails the attempt to register as a critical table. This error is extremely unlikely to occur.

+

The RC field is the return code from the CFE_TBL_Register function call that generated the error.

+ +

Definition at line 158 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDTVAL_ERR_EID   55
+
+
+ +

'WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d'

+
Event Message:
'WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued on the first error when a table validation fails for a watchpoint definition table (WDT) load and the error is NOT a failed floating point check.

+

The WP field is the watchpoint number and the other fields are from that watchpoint's definition table entry that failed validation

+ +

Definition at line 930 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDTVAL_FPERR_EID   54
+
+
+ +

'WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X'

+
Event Message:
'WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued on the first error when a table validation fails for a watchpoint definition table (WDT) load and the error is a failed floating point check. This error is caused when the data type for a wachpoint definition is floating point and the comparison value equates to a floating point NAN (not-a-number) or infinite value.

+

The WP field is the watchpoint number, the Err field is an error identifier, the ComparisonValue field contains the data that triggered the error displayed as a 32 bit hexadecimal number

+ +

Definition at line 914 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDTVAL_INF_EID   56
+
+
+ +

'WDT verify results: good = %d, bad = %d, unused = %d'

+
Event Message:
'WDT verify results: good = %d, bad = %d, unused = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when a table validation has been completed for a watchpoint definition table (WDT) load

+

The good field is number of entries that passed, the bad field is number of entries that failed, the unused field is the number of entries that weren't checked because they were marked unused.

+ +

Definition at line 947 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WP_DATATYPE_ERR_EID   50
+
+
+ +

'WP has undefined data type: WP = %d, DataType = %d'

+
Event Message:
'WP has undefined data type: WP = %d, DataType = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued whenever an undefined watchpoint data type identifier is detected

+

The WP field is the watchpoint number, the DataType field is the data type value that triggered the error

+ +

Definition at line 844 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WP_NAN_ERR_EID   52
+
+
+ +

'WP data value is a float NAN: WP = %d, Value = 0x%08X'

+
Event Message:
'WP data value is a float NAN: WP = %d, Value = 0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when a watchpoint is defined as a float type, but the extracted value would equate to a floating point NAN (not-a-number) value

+

The WP field is the watchpoint number, the Value field is the watchpoint value that triggered the error displayed as a 32 bit hexidecimal number.

+ +

Definition at line 876 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WP_OFFSET_ERR_EID   53
+
+
+ +

'WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d'

+
Event Message:
'WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when a watchpoint offset value extends past the end of the message as reported by the CFE_SB_GetTotalMsgLength function

+

The MID field is the message ID, the WP field is the watchpoint number, the Offset field is the watchpoint offset, the DataSize field is the size of the watchpoint data in bytes, the MsgLen field is the reported message length from CFE_SB_GetTotalMsgLength.

+ +

Definition at line 894 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WP_OPERID_ERR_EID   51
+
+
+ +

'WP has invalid operator ID: WP = %d, OperID = %d'

+
Event Message:
'WP has invalid operator ID: WP = %d, OperID = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued whenever an undefined watchpoint operator identifier is detected

+

The WP field is the watchpoint number, the OperID field is the operator ID value that triggered the error

+ +

Definition at line 859 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WPSTATS_INF_EID   40
+
+
+ +

'Reset WP stats command: WP = %d'

+
Event Message:
'Reset WP stats command: WP = %d'
+
Type: INFORMATION
+
Cause:
+

This event message is issued when the LC_RESET_WP_STATS_CC command has been successfully executed

+

The WP field is the watchpoint number whose stats have been cleared

+ +

Definition at line 686 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WPSTATS_WPNUM_ERR_EID   39
+
+
+ +

'Reset WP stats error: invalid WP number = %d'

+
Event Message:
'Reset WP stats error: invalid WP number = %d'
+
Type: ERROR
+
Cause:
+

This event message is issued when the LC_RESET_WP_STATS_CC command has been received with an invalid watchpoint number specified

+

The invalid WP number field is the number specified in the command message that triggered the error

+ +

Definition at line 671 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WRT_CDS_REGISTER_ERR_EID   12
+
+
+ +

'Error registering WRT CDS Area, RC=0x%08X'

+
Event Message:
'Error registering WRT CDS Area, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the CDS area for the watchpoint restuls table (WRT) data could not be registered.

+

The RC field is the return code from the CFE_ES_RegisterCDS function call that generated the error.

+ +

Definition at line 218 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WRT_GETADDR_ERR_EID   17
+
+
+ +

'Error getting WRT address, RC=0x%08X'

+
Event Message:
'Error getting WRT address, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the address can't be obtained from table services for the watchpoint results table (WRT).

+

The RC field is the return code from the CFE_TBL_GetAddress function call that generated the error.

+ +

Definition at line 297 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WRT_NO_SAVE_ERR_EID   46
+
+
+ +

'WRT data NOT saved to CDS on exit, RC=0x%08X'

+
Event Message:
'WRT data NOT saved to CDS on exit, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the watchpoint results table (WRT) data could not be saved to the CDS on application exit.

+

The RC field is the return code from the CFE_ES_CopyToCDS call that generated the error.

+ +

Definition at line 783 of file lc_events.h.

+ +
+
+ +
+
+ + + + +
#define LC_WRT_REGISTER_ERR_EID   10
+
+
+ +

'Error registering WRT, RC=0x%08X'

+
Event Message:
'Error registering WRT, RC=0x%08X'
+
Type: ERROR
+
Cause:
+

This event message is issued when the watchpoint results table (WRT) could not be registered.

+

The RC field is the return code from the CFE_TBL_Register function call that generated the error.

+ +

Definition at line 188 of file lc_events.h.

+ +
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__events_8h_source.html b/docs/users_guide/html/lc__events_8h_source.html new file mode 100644 index 0000000..926646d --- /dev/null +++ b/docs/users_guide/html/lc__events_8h_source.html @@ -0,0 +1,200 @@ + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_events.h Source File + + + + + + +
+

lc_events.h

Go to the documentation of this file.
00001 /************************************************************************
+00002 ** File:
+00003 **   $Id: lc__events_8h_source.html 1.1 2017/08/25 14:44:25EDT sstrege Exp  $
+00004 **
+00005 **  Copyright (c) 2007-2014 United States Government as represented by the 
+00006 **  Administrator of the National Aeronautics and Space Administration. 
+00007 **  All Other Rights Reserved.  
+00008 **
+00009 **  This software was created at NASA's Goddard Space Flight Center.
+00010 **  This software is governed by the NASA Open Source Agreement and may be 
+00011 **  used, distributed and modified only pursuant to the terms of that 
+00012 **  agreement.
+00013 **
+00014 ** Purpose: 
+00015 **   Specification for the CFS Limit Checker (LC) event identifers.
+00016 **
+00017 ** Notes:
+00018 **
+00019 ** 
+00020 *************************************************************************/
+00021 #ifndef _lc_events_
+00022 #define _lc_events_
+00023 
+00037 #define LC_TASK_EXIT_EID                         1    
+00038 
+00054 #define LC_INIT_INF_EID                          2    
+00055 
+00070 #define LC_CR_PIPE_ERR_EID                       3
+00071 
+00088 #define LC_SUB_HK_REQ_ERR_EID                    4
+00089 
+00106 #define LC_SUB_GND_CMD_ERR_EID                   5
+00107 
+00124 #define LC_SUB_SAMPLE_CMD_ERR_EID                6
+00125 
+00139 #define LC_WDT_REGISTER_ERR_EID                  7
+00140 
+00158 #define LC_WDT_REREGISTER_ERR_EID                8
+00159 
+00173 #define LC_ADT_REGISTER_ERR_EID                  9
+00174 
+00188 #define LC_WRT_REGISTER_ERR_EID                  10
+00189 
+00203 #define LC_ART_REGISTER_ERR_EID                  11
+00204 
+00218 #define LC_WRT_CDS_REGISTER_ERR_EID              12
+00219 
+00233 #define LC_ART_CDS_REGISTER_ERR_EID              13
+00234 
+00248 #define LC_APP_CDS_REGISTER_ERR_EID              14
+00249 
+00265 #define LC_WDT_LOAD_ERR_EID                      15
+00266 
+00282 #define LC_ADT_LOAD_ERR_EID                      16
+00283 
+00297 #define LC_WRT_GETADDR_ERR_EID                   17
+00298 
+00312 #define LC_ART_GETADDR_ERR_EID                   18
+00313 
+00327 #define LC_WDT_GETADDR_ERR_EID                   19
+00328 
+00342 #define LC_ADT_GETADDR_ERR_EID                   20
+00343 
+00364 #define LC_CDS_RESTORED_INF_EID                  21
+00365 
+00398 #define LC_CDS_UPDATED_INF_EID                   22
+00399 
+00426 #define LC_CDS_DISABLED_INF_EID                  23
+00427 
+00441 #define LC_CC_ERR_EID                            24
+00442 
+00456 #define LC_APSAMPLE_APNUM_ERR_EID                25
+00457 
+00472 #define LC_NOOP_INF_EID                          26
+00473 
+00484 #define LC_RESET_DBG_EID                         27
+00485 
+00499 #define LC_LCSTATE_INF_EID                       28
+00500 
+00514 #define LC_LCSTATE_ERR_EID                       29
+00515 
+00530 #define LC_APSTATE_NEW_ERR_EID                   30
+00531 
+00548 #define LC_APSTATE_CURR_ERR_EID                  31
+00549 
+00563 #define LC_APSTATE_APNUM_ERR_EID                 32
+00564 
+00579 #define LC_APSTATE_INF_EID                       33
+00580 
+00594 #define LC_APOFF_APNUM_ERR_EID                   34
+00595 
+00611 #define LC_APOFF_CURR_ERR_EID                    35
+00612 
+00626 #define LC_APOFF_INF_EID                         36
+00627 
+00641 #define LC_APSTATS_APNUM_ERR_EID                 37
+00642 
+00656 #define LC_APSTATS_INF_EID                       38
+00657 
+00671 #define LC_WPSTATS_WPNUM_ERR_EID                 39
+00672 
+00686 #define LC_WPSTATS_INF_EID                       40
+00687 
+00703 #define LC_HKREQ_LEN_ERR_EID                     41
+00704 
+00720 #define LC_APSAMPLE_LEN_ERR_EID                  42
+00721 
+00737 #define LC_LEN_ERR_EID                           43
+00738 
+00752 #define LC_UNSUB_WP_ERR_EID                      44
+00753 
+00767 #define LC_SUB_WP_ERR_EID                        45
+00768 
+00783 #define LC_WRT_NO_SAVE_ERR_EID                   46
+00784 
+00799 #define LC_ART_NO_SAVE_ERR_EID                   47
+00800 
+00814 #define LC_APP_NO_SAVE_START_ERR_EID             48
+00815 
+00829 #define LC_MID_INF_EID                           49
+00830 
+00844 #define LC_WP_DATATYPE_ERR_EID                   50
+00845 
+00859 #define LC_WP_OPERID_ERR_EID                     51
+00860 
+00876 #define LC_WP_NAN_ERR_EID                        52
+00877 
+00894 #define LC_WP_OFFSET_ERR_EID                     53
+00895 
+00914 #define LC_WDTVAL_FPERR_EID                      54
+00915 
+00930 #define LC_WDTVAL_ERR_EID                        55
+00931 
+00947 #define LC_WDTVAL_INF_EID                        56
+00948 
+00963 #define LC_APSAMPLE_CURR_ERR_EID                 57
+00964 
+00977 #define LC_AP_PASSTOFAIL_INF_EID                 58
+00978 
+00993 #define LC_PASSIVE_FAIL_DBG_EID                  59
+00994 
+01009 #define LC_AP_PASSIVE_FAIL_INF_EID               60
+01010 
+01023 #define LC_AP_FAILTOPASS_INF_EID                 61
+01024 
+01038 #define LC_ACTION_ERROR_ERR_EID                  62
+01039 
+01054 #define LC_INVALID_RPN_ERR_EID                   63
+01055 
+01071 #define LC_ADTVAL_RPNERR_EID                     64
+01072 
+01087 #define LC_ADTVAL_ERR_EID                        65
+01088 
+01104 #define LC_ADTVAL_INF_EID                        66
+01105 
+01120 #define LC_CFCALL_ERR_EID                        67
+01121 
+01144 #define LC_BASE_AP_EID                           1000
+01145 
+01146 #endif /* _lc_events_ */
+01147 
+01148 /************************/
+01149 /*  End of File Comment */
+01150 /************************/
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__mission__cfg_8h-source.html b/docs/users_guide/html/lc__mission__cfg_8h-source.html deleted file mode 100644 index 6db5408..0000000 --- a/docs/users_guide/html/lc__mission__cfg_8h-source.html +++ /dev/null @@ -1,77 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/mission_inc/lc_mission_cfg.h Source File - - - - - - - -

lc_mission_cfg.h

Go to the documentation of this file.
00001 /*************************************************************************
-00002 ** File:
-00003 **   $Id: lc__mission__cfg_8h-source.html 1.1 2015/03/04 16:51:30EST sstrege Exp  $
-00004 **
-00005 **  Copyright © 2007-2014 United States Government as represented by the 
-00006 **  Administrator of the National Aeronautics and Space Administration. 
-00007 **  All Other Rights Reserved.  
-00008 **
-00009 **  This software was created at NASA's Goddard Space Flight Center.
-00010 **  This software is governed by the NASA Open Source Agreement and may be 
-00011 **  used, distributed and modified only pursuant to the terms of that 
-00012 **  agreement.
-00013 **
-00014 ** Purpose: 
-00015 **   CFS Limit Checker (LC) Application Mission Configuration Header File
-00016 **
-00017 ** Notes:
-00018 **
-00019 **   $Log: lc__mission__cfg_8h-source.html  $
-00019 **   Revision 1.1 2015/03/04 16:51:30EST sstrege 
-00019 **   Initial revision
-00019 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-00020 **   Revision 1.2 2015/03/04 16:09:55EST sstrege 
-00021 **   Added copyright information
-00022 **   Revision 1.1 2012/07/31 16:53:34EDT nschweis 
-00023 **   Initial revision
-00024 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/mission_inc/project.pj
-00025 **   Revision 1.4 2010/04/14 11:55:45EDT lwalling 
-00026 **   Update stored command message ID, command code appears OK
-00027 **   Revision 1.3 2010/03/03 15:23:16EST lwalling 
-00028 **   Change RTS command code from 2 to 4, change some Doxygen pound symbols to forward slashes
-00029 **   Revision 1.2 2010/01/07 13:53:10EST lwalling 
-00030 **   Update LC configuration header files and configuration verification header file
-00031 **   Revision 1.1 2008/12/03 13:51:47EST dahardis 
-00032 **   Initial revision
-00033 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/mission_inc/project.pj
-00034 ** 
-00035 *************************************************************************/
-00036 #ifndef _lc_mission_cfg_
-00037 #define _lc_mission_cfg_
-00038 
-00058 #define LC_RTS_REQ_MID                    0x18A9
-00059 
-00080 #define LC_RTS_REQ_CC                     4
-00081 
-00082 #endif /*_lc_mission_cfg_*/
-00083 
-00084 /************************/
-00085 /*  End of File Comment */
-00086 /************************/
-

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/lc__mission__cfg_8h.html b/docs/users_guide/html/lc__mission__cfg_8h.html index b5020ed..eaa1a62 100644 --- a/docs/users_guide/html/lc__mission__cfg_8h.html +++ b/docs/users_guide/html/lc__mission__cfg_8h.html @@ -1,81 +1,83 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/mission_inc/lc_mission_cfg.h File Reference - - - - - - - -

lc_mission_cfg.h File Reference

-

-Go to the source code of this file. - - - - - - -

Defines

#define LC_RTS_REQ_MID   0x18A9
#define LC_RTS_REQ_CC   4
-


Define Documentation

- -
-
- - - - -
#define LC_RTS_REQ_CC   4
-
-
- -

-

Purpose:
RTS Request Command Code
-
Description:
Command code that will be used by the /LC_ExecuteRTS function to construct the RTS request message.
-We define this here to allow the LC application to be built without including headers from the application (e.g. SC) that will receive the command. Obviously, this definition must match the command code expected by the receiving application.

-

Limits:
This parameter can't be larger than an unsigned 16 bit integer (65535). Of course we all know that the preceding limit describes the size of the variable returned by the API function CFE_SB_GetCmdCode. And that for as long as CFE uses the existing CCSDS packet format implementation, command codes are only 7 bits (unsigned) with an upper limit of 127 and a lower limit of zero.
- -

-Definition at line 80 of file lc_mission_cfg.h. -

-

- -

-
- - - - -
#define LC_RTS_REQ_MID   0x18A9
-
-
- -

-

Purpose:
RTS Request Message ID
-
Description:
Message ID that will be used by the /LC_ExecuteRTS function to construct the RTS request message.
-We define this here to allow the LC application to be built without including headers from the application (e.g. SC) that will receive the command. Obviously, this definition must match the message ID expectyed by the receiving application.

-A mission may choose to modify the /LC_ExecuteRTS function not to use this or define it using a message ID constant that is defined numerically elsewhere.

-

Limits:
This parameter shouldn't be larger than the value set for CFE_SB_HIGHEST_VALID_MSGID.
- -

-Definition at line 58 of file lc_mission_cfg.h. -

-

-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/mission_inc/lc_mission_cfg.h File Reference + + + + + + +
+

lc_mission_cfg.h File Reference

+

Go to the source code of this file.

+ + + + +

Defines

#define LC_RTS_REQ_MID   0x18A9
#define LC_RTS_REQ_CC   4
+

Define Documentation

+ +
+
+ + + + +
#define LC_RTS_REQ_CC   4
+
+
+
Purpose:
RTS Request Command Code
+
Description:
Command code that will be used by the /LC_ExecuteRTS function to construct the RTS request message.
+

We define this here to allow the LC application to be built without including headers from the application (e.g. SC) that will receive the command. Obviously, this definition must match the command code expected by the receiving application.

+
Limits:
This parameter can't be larger than an unsigned 16 bit integer (65535). Of course we all know that the preceding limit describes the size of the variable returned by the API function CFE_SB_GetCmdCode. And that for as long as CFE uses the existing CCSDS packet format implementation, command codes are only 7 bits (unsigned) with an upper limit of 127 and a lower limit of zero.
+ +

Definition at line 65 of file lc_mission_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_RTS_REQ_MID   0x18A9
+
+
+
Purpose:
RTS Request Message ID
+
Description:
Message ID that will be used by the /LC_ExecuteRTS function to construct the RTS request message.
+

We define this here to allow the LC application to be built without including headers from the application (e.g. SC) that will receive the command. Obviously, this definition must match the message ID expectyed by the receiving application.

+

A mission may choose to modify the /LC_ExecuteRTS function not to use this or define it using a message ID constant that is defined numerically elsewhere.

+
Limits:
This parameter shouldn't be larger than the value set for CFE_SB_HIGHEST_VALID_MSGID.
+ +

Definition at line 43 of file lc_mission_cfg.h.

+ +
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__mission__cfg_8h_source.html b/docs/users_guide/html/lc__mission__cfg_8h_source.html new file mode 100644 index 0000000..a4a83f2 --- /dev/null +++ b/docs/users_guide/html/lc__mission__cfg_8h_source.html @@ -0,0 +1,68 @@ + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/mission_inc/lc_mission_cfg.h Source File + + + + + + +
+

lc_mission_cfg.h

Go to the documentation of this file.
00001 /*************************************************************************
+00002 ** File:
+00003 **   $Id: lc__mission__cfg_8h_source.html 1.1 2017/08/25 14:44:25EDT sstrege Exp  $
+00004 **
+00005 **  Copyright (c) 2007-2014 United States Government as represented by the 
+00006 **  Administrator of the National Aeronautics and Space Administration. 
+00007 **  All Other Rights Reserved.  
+00008 **
+00009 **  This software was created at NASA's Goddard Space Flight Center.
+00010 **  This software is governed by the NASA Open Source Agreement and may be 
+00011 **  used, distributed and modified only pursuant to the terms of that 
+00012 **  agreement.
+00013 **
+00014 ** Purpose: 
+00015 **   CFS Limit Checker (LC) Application Mission Configuration Header File
+00016 **
+00017 ** Notes:
+00018 **
+00019 ** 
+00020 *************************************************************************/
+00021 #ifndef _lc_mission_cfg_
+00022 #define _lc_mission_cfg_
+00023 
+00043 #define LC_RTS_REQ_MID                    0x18A9
+00044 
+00065 #define LC_RTS_REQ_CC                     4
+00066 
+00067 #endif /*_lc_mission_cfg_*/
+00068 
+00069 /************************/
+00070 /*  End of File Comment */
+00071 /************************/
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__msg_8h-source.html b/docs/users_guide/html/lc__msg_8h-source.html deleted file mode 100644 index b3de490..0000000 --- a/docs/users_guide/html/lc__msg_8h-source.html +++ /dev/null @@ -1,165 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_msg.h Source File - - - - - - - -

lc_msg.h

Go to the documentation of this file.
00001 /************************************************************************
-00002 ** File:
-00003 **   $Id: lc__msg_8h-source.html 1.1 2015/03/04 16:51:31EST sstrege Exp  $
-00004 **
-00005 **  Copyright © 2007-2014 United States Government as represented by the 
-00006 **  Administrator of the National Aeronautics and Space Administration. 
-00007 **  All Other Rights Reserved.  
-00008 **
-00009 **  This software was created at NASA's Goddard Space Flight Center.
-00010 **  This software is governed by the NASA Open Source Agreement and may be 
-00011 **  used, distributed and modified only pursuant to the terms of that 
-00012 **  agreement.
-00013 **
-00014 ** Purpose: 
-00015 **   Specification for the CFS Limit Checker (LC) command and telemetry 
-00016 **   message data types.
-00017 **
-00018 ** Notes:
-00019 **   Constants and enumerated types related to these message structures
-00020 **   are defined in lc_msgdefs.h. They are kept separate to allow easy 
-00021 **   integration with ASIST RDL files which can't handle typedef
-00022 **   declarations (see the main comment block in lc_msgdefs.h for more 
-00023 **   info).
-00024 **
-00025 **   $Log: lc__msg_8h-source.html  $
-00025 **   Revision 1.1 2015/03/04 16:51:31EST sstrege 
-00025 **   Initial revision
-00025 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-00026 **   Revision 1.3 2015/03/04 16:09:57EST sstrege 
-00027 **   Added copyright information
-00028 **   Revision 1.2 2012/08/01 17:02:52EDT lwalling 
-00029 **   Add age WP results option to AP sample command
-00030 **   Revision 1.1 2012/07/31 13:53:38PDT nschweis 
-00031 **   Initial revision
-00032 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj
-00033 **   Revision 1.6 2011/07/04 13:26:54EDT lwalling 
-00034 **   Change cmd counter from 16 to 8 bits, adjust alignment pad fields, sort fields by data type
-00035 **   Revision 1.5 2011/02/07 17:57:48EST lwalling 
-00036 **   Modify sample AP commands to target groups of AP's
-00037 **   Revision 1.4 2010/03/03 15:30:19EST lwalling 
-00038 **   Fixed typo in Doxygen name (changed WPSINUSD to WPSINUSE)
-00039 **   Revision 1.3 2008/12/10 10:17:15EST dahardis 
-00040 **   Fixed HK structure alignment (DCR #4701)
-00041 **   Revision 1.2 2008/12/03 13:59:42EST dahardis 
-00042 **   Corrections from peer code review
-00043 **   Revision 1.1 2008/10/29 14:19:34EDT dahardison 
-00044 **   Initial revision
-00045 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj
-00046 ** 
-00047 *************************************************************************/
-00048 #ifndef _lc_msg_
-00049 #define _lc_msg_
-00050 
-00051 /************************************************************************
-00052 ** Includes
-00053 *************************************************************************/
-00054 #include "cfe.h"
-00055 #include "lc_msgdefs.h"
-00056 
-00057 /************************************************************************
-00058 ** Type Definitions
-00059 *************************************************************************/
-00065 typedef struct
-00066 {
-00067     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
-00068 
-00069 } LC_NoArgsCmd_t;
-00070 
-00075 typedef struct {
-00076     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
-00077 
-00078     uint16         NewLCState;              
-00079     uint16         Padding;                 
-00081 } LC_SetLCState_t;
-00082 
-00087 typedef struct {
-00088     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
-00089 
-00090     uint16         APNumber;                
-00091     uint16         NewAPState;              
-00093 } LC_SetAPState_t;
-00094 
-00099 typedef struct {
-00100     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
-00101 
-00102     uint16         APNumber;                
-00103     uint16         Padding;                 
-00105 } LC_SetAPPermOff_t;
-00106 
-00111 typedef struct {
-00112     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
-00113 
-00114     uint16         APNumber;                
-00115     uint16         Padding;                 
-00117 } LC_ResetAPStats_t;
-00118 
-00123 typedef struct {
-00124     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
-00125 
-00126     uint16         WPNumber;                
-00127     uint16         Padding;                 
-00129 } LC_ResetWPStats_t;
-00130 
-00135 typedef struct {
-00136     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
-00137 
-00138     uint16         StartIndex;              
-00139     uint16         EndIndex;
-00140 
-00141     uint16         UpdateAge;               
-00143 } LC_SampleAP_t;
-00144 
-00148 typedef struct
-00149 {
-00150     uint8          TlmHeader[CFE_SB_TLM_HDR_SIZE];  
-00152     uint8          CmdCount;                        
-00154     uint8          CmdErrCount;                     
-00156     uint8          CurrentLCState;                  
-00159     uint8          Pad8;
-00160     
-00161     uint8          WPResults[LC_HKWR_NUM_BYTES];    
-00165     uint8          APResults[LC_HKAR_NUM_BYTES];    
-00169     uint16         PassiveRTSExecCount;             
-00174     uint16         WPsInUse;                        
-00178     uint16         ActiveAPs;                       
-00181     uint16         Pad16;      
-00182     
-00183     uint32         APSampleCount;                   
-00185     uint32         MonitoredMsgCount;               
-00188     uint32         RTSExecCount;                    
-00191 } LC_HkPacket_t;
-00192 
-00193 #endif /* _lc_msg_ */
-00194 
-00195 /************************/
-00196 /*  End of File Comment */
-00197 /************************/
-00198 
-

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/lc__msg_8h.html b/docs/users_guide/html/lc__msg_8h.html index c0eff14..c34a61c 100644 --- a/docs/users_guide/html/lc__msg_8h.html +++ b/docs/users_guide/html/lc__msg_8h.html @@ -1,58 +1,58 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_msg.h File Reference - - - - - - - -

lc_msg.h File Reference

#include "cfe.h"
-#include "lc_msgdefs.h"
- -

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Structures

struct  LC_NoArgsCmd_t
 No Arguments Command For command details see LC_NOOP_CC, LC_RESET_CC Also see LC_SEND_HK_MID. More...
struct  LC_SetLCState_t
 Set LC Application State Command For command details see LC_SET_LC_STATE_CC. More...
struct  LC_SetAPState_t
 Set AP (Actionpoint) State Command For command details see LC_SET_AP_STATE_CC. More...
struct  LC_SetAPPermOff_t
 Set AP (Actionpoint) Permanently Off For command details see LC_SET_AP_PERMOFF_CC. More...
struct  LC_ResetAPStats_t
 Reset AP (Actionpoint) Statistics For command details see LC_RESET_AP_STATS_CC. More...
struct  LC_ResetWPStats_t
 Reset WP (Watchpoint) Statistics For command details see LC_RESET_WP_STATS_CC. More...
struct  LC_SampleAP_t
 Sample AP (Actionpoint) Request See LC_SAMPLE_AP_MID. More...
struct  LC_HkPacket_t
-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_msg.h File Reference + + + + + + +
+

lc_msg.h File Reference

#include "cfe.h"
+#include "lc_msgdefs.h"
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + +

Data Structures

struct  LC_NoArgsCmd_t
 No Arguments Command For command details see LC_NOOP_CC, LC_RESET_CC Also see LC_SEND_HK_MID. More...
struct  LC_SetLCState_t
 Set LC Application State Command For command details see LC_SET_LC_STATE_CC. More...
struct  LC_SetAPState_t
 Set AP (Actionpoint) State Command For command details see LC_SET_AP_STATE_CC. More...
struct  LC_SetAPPermOff_t
 Set AP (Actionpoint) Permanently Off For command details see LC_SET_AP_PERMOFF_CC. More...
struct  LC_ResetAPStats_t
 Reset AP (Actionpoint) Statistics For command details see LC_RESET_AP_STATS_CC. More...
struct  LC_ResetWPStats_t
 Reset WP (Watchpoint) Statistics For command details see LC_RESET_WP_STATS_CC. More...
struct  LC_SampleAP_t
 Sample AP (Actionpoint) Request See LC_SAMPLE_AP_MID. More...
struct  LC_HkPacket_t
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__msg_8h_source.html b/docs/users_guide/html/lc__msg_8h_source.html new file mode 100644 index 0000000..541f746 --- /dev/null +++ b/docs/users_guide/html/lc__msg_8h_source.html @@ -0,0 +1,150 @@ + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_msg.h Source File + + + + + + +
+

lc_msg.h

Go to the documentation of this file.
00001 /************************************************************************
+00002 ** File:
+00003 **   $Id: lc__msg_8h_source.html 1.1 2017/08/25 14:44:26EDT sstrege Exp  $
+00004 **
+00005 **  Copyright (c) 2007-2014 United States Government as represented by the 
+00006 **  Administrator of the National Aeronautics and Space Administration. 
+00007 **  All Other Rights Reserved.  
+00008 **
+00009 **  This software was created at NASA's Goddard Space Flight Center.
+00010 **  This software is governed by the NASA Open Source Agreement and may be 
+00011 **  used, distributed and modified only pursuant to the terms of that 
+00012 **  agreement.
+00013 **
+00014 ** Purpose: 
+00015 **   Specification for the CFS Limit Checker (LC) command and telemetry 
+00016 **   message data types.
+00017 **
+00018 ** Notes:
+00019 **   Constants and enumerated types related to these message structures
+00020 **   are defined in lc_msgdefs.h. They are kept separate to allow easy 
+00021 **   integration with ASIST RDL files which can't handle typedef
+00022 **   declarations (see the main comment block in lc_msgdefs.h for more 
+00023 **   info).
+00024 **
+00025 ** 
+00026 *************************************************************************/
+00027 #ifndef _lc_msg_
+00028 #define _lc_msg_
+00029 
+00030 /************************************************************************
+00031 ** Includes
+00032 *************************************************************************/
+00033 #include "cfe.h"
+00034 #include "lc_msgdefs.h"
+00035 
+00036 /************************************************************************
+00037 ** Type Definitions
+00038 *************************************************************************/
+00044 typedef struct
+00045 {
+00046     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
+00047 
+00048 } LC_NoArgsCmd_t;
+00049 
+00054 typedef struct {
+00055     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
+00056 
+00057     uint16         NewLCState;              
+00058     uint16         Padding;                 
+00060 } LC_SetLCState_t;
+00061 
+00066 typedef struct {
+00067     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
+00068 
+00069     uint16         APNumber;                
+00070     uint16         NewAPState;              
+00072 } LC_SetAPState_t;
+00073 
+00078 typedef struct {
+00079     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
+00080 
+00081     uint16         APNumber;                
+00082     uint16         Padding;                 
+00084 } LC_SetAPPermOff_t;
+00085 
+00090 typedef struct {
+00091     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
+00092 
+00093     uint16         APNumber;                
+00094     uint16         Padding;                 
+00096 } LC_ResetAPStats_t;
+00097 
+00102 typedef struct {
+00103     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
+00104 
+00105     uint16         WPNumber;                
+00106     uint16         Padding;                 
+00108 } LC_ResetWPStats_t;
+00109 
+00114 typedef struct {
+00115     uint8          CmdHeader[CFE_SB_CMD_HDR_SIZE];
+00116 
+00117     uint16         StartIndex;              
+00118     uint16         EndIndex;
+00119 
+00120     uint16         UpdateAge;               
+00122 } LC_SampleAP_t;
+00123 
+00127 typedef struct
+00128 {
+00129     uint8          TlmHeader[CFE_SB_TLM_HDR_SIZE];  
+00131     uint8          CmdCount;                        
+00133     uint8          CmdErrCount;                     
+00135     uint8          CurrentLCState;                  
+00138     uint8          Pad8;
+00139     
+00140     uint8          WPResults[LC_HKWR_NUM_BYTES];    
+00144     uint8          APResults[LC_HKAR_NUM_BYTES];    
+00148     uint16         PassiveRTSExecCount;             
+00155     uint16         WPsInUse;                        
+00159     uint16         ActiveAPs;                       
+00162     uint16         Pad16;      
+00163     
+00164     uint32         APSampleCount;                   
+00166     uint32         MonitoredMsgCount;               
+00169     uint32         RTSExecCount;                    
+00172 } LC_HkPacket_t;
+00173 
+00174 #endif /* _lc_msg_ */
+00175 
+00176 /************************/
+00177 /*  End of File Comment */
+00178 /************************/
+00179 
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__msgdefs_8h-source.html b/docs/users_guide/html/lc__msgdefs_8h-source.html deleted file mode 100644 index 3ba1a44..0000000 --- a/docs/users_guide/html/lc__msgdefs_8h-source.html +++ /dev/null @@ -1,126 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_msgdefs.h Source File - - - - - - - -

lc_msgdefs.h

Go to the documentation of this file.
00001 /************************************************************************
-00002 ** File:
-00003 **   $Id: lc__msgdefs_8h-source.html 1.1 2015/03/04 16:51:32EST sstrege Exp  $
-00004 **
-00005 **  Copyright © 2007-2014 United States Government as represented by the 
-00006 **  Administrator of the National Aeronautics and Space Administration. 
-00007 **  All Other Rights Reserved.  
-00008 **
-00009 **  This software was created at NASA's Goddard Space Flight Center.
-00010 **  This software is governed by the NASA Open Source Agreement and may be 
-00011 **  used, distributed and modified only pursuant to the terms of that 
-00012 **  agreement.
-00013 **
-00014 ** Purpose: 
-00015 **   Specification for the CFS Limit Checker (LC) command and telemetry 
-00016 **   message constant definitions.
-00017 **
-00018 ** Notes:
-00019 **   These Macro definitions have been put in this file (instead of 
-00020 **   lc_msg.h) so this file can be included directly into ASIST build 
-00021 **   test scripts. ASIST RDL files can accept C language #defines but 
-00022 **   can't handle type definitions. As a result: DO NOT PUT ANY
-00023 **   TYPEDEFS OR STRUCTURE DEFINITIONS IN THIS FILE! 
-00024 **   ADD THEM TO lc_msg.h IF NEEDED! 
-00025 **
-00026 **   $Log: lc__msgdefs_8h-source.html  $
-00026 **   Revision 1.1 2015/03/04 16:51:32EST sstrege 
-00026 **   Initial revision
-00026 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-00027 **   Revision 1.3 2015/03/04 16:09:57EST sstrege 
-00028 **   Added copyright information
-00029 **   Revision 1.2 2012/08/01 14:19:40EDT lwalling 
-00030 **   Change NOT_MEASURED to STALE
-00031 **   Revision 1.1 2012/07/31 13:53:39PDT nschweis 
-00032 **   Initial revision
-00033 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj
-00034 **   Revision 1.3 2011/01/19 12:45:40EST jmdagost 
-00035 **   Moved two message parameters to the message IDs file for scheduler table access.
-00036 **   Revision 1.2 2008/12/10 10:17:17EST dahardis 
-00037 **   Fixed HK structure alignment (DCR #4701)
-00038 **   Revision 1.1 2008/10/29 14:19:37EDT dahardison 
-00039 **   Initial revision
-00040 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj
-00041 ** 
-00042 *************************************************************************/
-00043 #ifndef _lc_msgdefs_
-00044 #define _lc_msgdefs_
-00045 
-00046 /************************************************************************
-00047 ** Includes
-00048 *************************************************************************/
-00049 #include "lc_platform_cfg.h"
-00050 
-00051 /************************************************************************
-00052 ** Macro Definitions
-00053 *************************************************************************/
-00054 
-00058 #define LC_STATE_ACTIVE             1
-00059 #define LC_STATE_PASSIVE            2
-00060 #define LC_STATE_DISABLED           3
-00061 #define LC_STATE_FROM_CDS           4      
-00068 #define LC_ACTION_NOT_USED          0xFF   
-00071 #define LC_APSTATE_ACTIVE           1
-00072 #define LC_APSTATE_PASSIVE          2
-00073 #define LC_APSTATE_DISABLED         3
-00074 #define LC_APSTATE_PERMOFF          4      
-00081 #define LC_HKWR_FALSE               0x00   
-00082 #define LC_HKWR_TRUE                0x01   
-00083 #define LC_HKWR_ERROR               0x02   
-00084 #define LC_HKWR_STALE               0x03   
-00090 #define LC_HKAR_PASS                0x00  
-00091 #define LC_HKAR_FAIL                0x01  
-00092 #define LC_HKAR_ERROR               0x02  
-00093 #define LC_HKAR_STALE               0x03  
-00099 #define LC_HKAR_STATE_NOT_USED      0x00  
-00101 #define LC_HKAR_STATE_ACTIVE        0x01  
-00102 #define LC_HKAR_STATE_PASSIVE       0x02  
-00103 #define LC_HKAR_STATE_DISABLED      0x03  
-00109 #define LC_HKWR_NUM_BYTES  (((LC_MAX_WATCHPOINTS  + 15) / 16) * 4)   
-00111 #define LC_HKAR_NUM_BYTES  (((LC_MAX_ACTIONPOINTS +  7) /  8) * 4)   
-00145 #define LC_NOOP_CC                  0
-00146 
-00182 #define LC_RESET_CC                 1
-00183 
-00216 #define LC_SET_LC_STATE_CC          2
-00217 
-00255 #define LC_SET_AP_STATE_CC          3
-00256 
-00291 #define LC_SET_AP_PERMOFF_CC        4
-00292 
-00326 #define LC_RESET_AP_STATS_CC        5
-00327 
-00361 #define LC_RESET_WP_STATS_CC        6
-00362 
-00363 #endif /* _lc_msgdefs_ */
-00364 
-00365 /************************/
-00366 /*  End of File Comment */
-00367 /************************/
-

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/lc__msgdefs_8h.html b/docs/users_guide/html/lc__msgdefs_8h.html index 393dc8c..f18fe1d 100644 --- a/docs/users_guide/html/lc__msgdefs_8h.html +++ b/docs/users_guide/html/lc__msgdefs_8h.html @@ -1,764 +1,751 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_msgdefs.h File Reference - - - - - - - -

lc_msgdefs.h File Reference

#include "lc_platform_cfg.h"
- -

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

LC Application States

#define LC_STATE_ACTIVE   1
#define LC_STATE_PASSIVE   2
#define LC_STATE_DISABLED   3
#define LC_STATE_FROM_CDS   4
 Only used for reset processing Not valid as a command argument.

Actionpoint States

#define LC_ACTION_NOT_USED   0xFF
 Used to indicate unused actionpoint table entries. Not valid as a command argument.
#define LC_APSTATE_ACTIVE   1
#define LC_APSTATE_PASSIVE   2
#define LC_APSTATE_DISABLED   3
#define LC_APSTATE_PERMOFF   4
 To set this state requires using the LC_SET_AP_PERMOFF_CC command.

Housekeeping Packed Watch Results

#define LC_HKWR_FALSE   0x00
 Two bit value used for FALSE.
#define LC_HKWR_TRUE   0x01
 Two bit value used for TRUE.
#define LC_HKWR_ERROR   0x02
 Two bit value used for ERROR.
#define LC_HKWR_STALE   0x03
 Two bit value used for STALE.

Housekeeping Packed Action Results

#define LC_HKAR_PASS   0x00
 Two bit value used for PASS.
#define LC_HKAR_FAIL   0x01
 Two bit value used for FAIL.
#define LC_HKAR_ERROR   0x02
 Two bit value used for ERROR.
#define LC_HKAR_STALE   0x03
 Two bit value used for STALE.

Housekeeping Packed Action Results, State Identifiers

#define LC_HKAR_STATE_NOT_USED   0x00
 Two bit value used for NOT USED as well as PERMOFF.
#define LC_HKAR_STATE_ACTIVE   0x01
 Two bit value used for ACTIVE.
#define LC_HKAR_STATE_PASSIVE   0x02
 Two bit value used for PASSIVE.
#define LC_HKAR_STATE_DISABLED   0x03
 Two bit value used for DISABLED.

Housekeeping Packed Results, Array Sizes

#define LC_HKWR_NUM_BYTES   (((LC_MAX_WATCHPOINTS + 15) / 16) * 4)
 2 bits per WP and keeping array on longword boundary
#define LC_HKAR_NUM_BYTES   (((LC_MAX_ACTIONPOINTS + 7) / 8) * 4)
 4 bits per AP and keeping array on longword boundary

Defines

#define LC_NOOP_CC   0
#define LC_RESET_CC   1
#define LC_SET_LC_STATE_CC   2
#define LC_SET_AP_STATE_CC   3
#define LC_SET_AP_PERMOFF_CC   4
#define LC_RESET_AP_STATS_CC   5
#define LC_RESET_WP_STATS_CC   6
-


Define Documentation

- -
-
- - - - -
#define LC_ACTION_NOT_USED   0xFF
-
-
- -

-Used to indicate unused actionpoint table entries. Not valid as a command argument. -

- -

-Definition at line 68 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_APSTATE_ACTIVE   1
-
-
- -

- -

-Definition at line 71 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_APSTATE_DISABLED   3
-
-
- -

- -

-Definition at line 73 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_APSTATE_PASSIVE   2
-
-
- -

- -

-Definition at line 72 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_APSTATE_PERMOFF   4
-
-
- -

-To set this state requires using the LC_SET_AP_PERMOFF_CC command. -

- -

-Definition at line 74 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKAR_ERROR   0x02
-
-
- -

-Two bit value used for ERROR. -

- -

-Definition at line 92 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKAR_FAIL   0x01
-
-
- -

-Two bit value used for FAIL. -

- -

-Definition at line 91 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKAR_NUM_BYTES   (((LC_MAX_ACTIONPOINTS + 7) / 8) * 4)
-
-
- -

-4 bits per AP and keeping array on longword boundary -

- -

-Definition at line 111 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKAR_PASS   0x00
-
-
- -

-Two bit value used for PASS. -

- -

-Definition at line 90 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKAR_STALE   0x03
-
-
- -

-Two bit value used for STALE. -

- -

-Definition at line 93 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKAR_STATE_ACTIVE   0x01
-
-
- -

-Two bit value used for ACTIVE. -

- -

-Definition at line 101 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKAR_STATE_DISABLED   0x03
-
-
- -

-Two bit value used for DISABLED. -

- -

-Definition at line 103 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKAR_STATE_NOT_USED   0x00
-
-
- -

-Two bit value used for NOT USED as well as PERMOFF. -

- -

-Definition at line 99 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKAR_STATE_PASSIVE   0x02
-
-
- -

-Two bit value used for PASSIVE. -

- -

-Definition at line 102 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKWR_ERROR   0x02
-
-
- -

-Two bit value used for ERROR. -

- -

-Definition at line 83 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKWR_FALSE   0x00
-
-
- -

-Two bit value used for FALSE. -

- -

-Definition at line 81 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKWR_NUM_BYTES   (((LC_MAX_WATCHPOINTS + 15) / 16) * 4)
-
-
- -

-2 bits per WP and keeping array on longword boundary -

- -

-Definition at line 109 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKWR_STALE   0x03
-
-
- -

-Two bit value used for STALE. -

- -

-Definition at line 84 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_HKWR_TRUE   0x01
-
-
- -

-Two bit value used for TRUE. -

- -

-Definition at line 82 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_NOOP_CC   0
-
-
- -

-

Name:
Noop
-
Description
Implements the Noop command that insures the LC task is alive
-
Command Mnemonic(s):
$sc_$cpu_LC_NOOP
-
Command Structure
LC_NoArgsCmd_t
-
Command Verification
Successful execution of this command may be verified with the following telemetry:
    -
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • The LC_NOOP_INF_EID informational event message will be generated when the command is received
-
-
Error Conditions
This command may fail for the following reason(s):
    -
  • Command packet length not as expected
-
-
Evidence of failure may be found in the following telemetry:
    -
  • $sc_$cpu_LC_CMDEC - command error counter will increment
  • Error specific event message LC_LEN_ERR_EID
-
-
Criticality
None
-
See also:
LC_RESET_CC
- -

-Definition at line 145 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_RESET_AP_STATS_CC   5
-
-
- -

-

Name:
Reset AP Statistics
-
Description
Resets actionpoint statistics
-
Command Mnemonic(s):
$sc_$cpu_LC_ResetAPStats
-
Command Structure
LC_ResetAPStats_t
-
Command Verification
Successful execution of this command may be verified with the following telemetry:
    -
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • The LC_APSTATS_INF_EID informational event message will be generated when the command is executed
-
-
Error Conditions
This command may fail for the following reason(s):
    -
  • Command packet length not as expected
  • Actionpoint number specified in command message is out of range
-
-
Evidence of failure may be found in the following telemetry:
-
-
Criticality
None
-
See also:
LC_RESET_WP_STATS_CC
- -

-Definition at line 326 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_RESET_CC   1
-
-
- -

-

Name:
Reset Counters
-
Description
Resets the LC housekeeping counters
-
Command Mnemonic(s):
$sc_$cpu_LC_ResetCtrs
-
Command Structure
LC_NoArgsCmd_t
-
Command Verification
Successful execution of this command may be verified with the following telemetry:
    -
  • $sc_$cpu_LC_CMDPC - command counter will be cleared
  • $sc_$cpu_LC_CMDEC - command error counter will be cleared
  • $sc_$cpu_LC_APSampleCnt - actionpoint sample counter will be cleared
  • $sc_$cpu_LC_MonMsgCnt - monitored message counter will be cleared
  • $sc_$cpu_LC_RTSCnt - RTS execution counter will be cleared
  • $sc_$cpu_LC_PassRTSCnt - passive RTS execution counter will be cleared
  • The LC_RESET_DBG_EID debug event message will be generated when the command is executed
-
-
Error Conditions
This command may fail for the following reason(s):
    -
  • Command packet length not as expected
-
-
Evidence of failure may be found in the following telemetry:
    -
  • $sc_$cpu_LC_CMDEC - command error counter will increment
  • Error specific event message LC_LEN_ERR_EID
-
-
Criticality
None
-
See also:
LC_NOOP_CC
- -

-Definition at line 182 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_RESET_WP_STATS_CC   6
-
-
- -

-

Name:
Reset WP Statistics
-
Description
Resets watchpoint statistics
-
Command Mnemonic(s):
$sc_$cpu_LC_ResetWPStats
-
Command Structure
LC_ResetWPStats_t
-
Command Verification
Successful execution of this command may be verified with the following telemetry:
    -
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • The LC_WPSTATS_INF_EID informational event message will be generated when the command is executed
-
-
Error Conditions
This command may fail for the following reason(s):
    -
  • Command packet length not as expected
  • Watchpoint number specified in command message is out of range
-
-
Evidence of failure may be found in the following telemetry:
-
-
Criticality
None
-
See also:
LC_RESET_AP_STATS_CC
- -

-Definition at line 361 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_SET_AP_PERMOFF_CC   4
-
-
- -

-

Name:
Set AP Permanently Off
-
Description
Set the specified actionpoint's state to LC_APSTATE_PERMOFF
-
Command Mnemonic(s):
$sc_$cpu_LC_SetAPPermOff
-
Command Structure
LC_SetAPPermOff_t
-
Command Verification
Successful execution of this command may be verified with the following telemetry:
    -
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • The LC_APOFF_INF_EID informational event message will be generated when the command is executed
-
-
Error Conditions
This command may fail for the following reason(s):
    -
  • Command packet length not as expected
  • Actionpoint number specified in command message is out of range
  • Actionpoint current state is not LC_APSTATE_DISABLED
-
-
Evidence of failure may be found in the following telemetry:
-
-
Criticality
None
- -

-Definition at line 291 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_SET_AP_STATE_CC   3
-
-
- -

-

Name:
Set AP State
-
Description
Set actionpoint state
-
Command Mnemonic(s):
$sc_$cpu_LC_SetAPState
-
Command Structure
LC_SetAPState_t
-
Command Verification
Successful execution of this command may be verified with the following telemetry:
    -
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • The LC_APSTATE_INF_EID informational event message will be generated when the command is executed
-
-
Error Conditions
This command may fail for the following reason(s):
    -
  • Command packet length not as expected
  • Invalid actionpoint state specified in command message
  • Actionpoint number specified in command message is out of range
  • Actionpoint current state is either LC_ACTION_NOT_USED or LC_APSTATE_PERMOFF
-
-
Evidence of failure may be found in the following telemetry:
-
-
Criticality
None
- -

-Definition at line 255 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_SET_LC_STATE_CC   2
-
-
- -

-

Name:
Set LC Application State
-
Description
Sets the operational state of the LC application
-
Command Mnemonic(s):
$sc_$cpu_LC_SetLCState
-
Command Structure
LC_SetLCState_t
-
Command Verification
Successful execution of this command may be verified with the following telemetry:
    -
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • $sc_$cpu_LC_CurrentLCState - will be set to the new state
  • The LC_LCSTATE_INF_EID informational event message will be generated when the command is executed
-
-
Error Conditions
This command may fail for the following reason(s):
    -
  • Command packet length not as expected
  • Invalid new state specified in command message
-
-
Evidence of failure may be found in the following telemetry:
-
-
Criticality
None
- -

-Definition at line 216 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_STATE_ACTIVE   1
-
-
- -

- -

-Definition at line 58 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_STATE_DISABLED   3
-
-
- -

- -

-Definition at line 60 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_STATE_FROM_CDS   4
-
-
- -

-Only used for reset processing Not valid as a command argument. -

- -

-Definition at line 61 of file lc_msgdefs.h. -

-

- -

-
- - - - -
#define LC_STATE_PASSIVE   2
-
-
- -

- -

-Definition at line 59 of file lc_msgdefs.h. -

-

-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_msgdefs.h File Reference + + + + + + +
+

lc_msgdefs.h File Reference

#include "lc_platform_cfg.h"
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define LC_NOOP_CC   0
#define LC_RESET_CC   1
#define LC_SET_LC_STATE_CC   2
#define LC_SET_AP_STATE_CC   3
#define LC_SET_AP_PERMOFF_CC   4
#define LC_RESET_AP_STATS_CC   5
#define LC_RESET_WP_STATS_CC   6
LC Application States

+

#define LC_STATE_ACTIVE   1
#define LC_STATE_PASSIVE   2
#define LC_STATE_DISABLED   3
#define LC_STATE_FROM_CDS   4
 Only used for reset processing Not valid as a command argument.
Actionpoint States

+

#define LC_ACTION_NOT_USED   0xFF
 Used to indicate unused actionpoint table entries. Not valid as a command argument.
#define LC_APSTATE_ACTIVE   1
#define LC_APSTATE_PASSIVE   2
#define LC_APSTATE_DISABLED   3
#define LC_APSTATE_PERMOFF   4
 To set this state requires using the LC_SET_AP_PERMOFF_CC command.
Housekeeping Packed Watch Results

+

#define LC_HKWR_FALSE   0x00
 Two bit value used for FALSE.
#define LC_HKWR_TRUE   0x01
 Two bit value used for TRUE.
#define LC_HKWR_ERROR   0x02
 Two bit value used for ERROR.
#define LC_HKWR_STALE   0x03
 Two bit value used for STALE.
Housekeeping Packed Action Results

+

#define LC_HKAR_PASS   0x00
 Two bit value used for PASS.
#define LC_HKAR_FAIL   0x01
 Two bit value used for FAIL.
#define LC_HKAR_ERROR   0x02
 Two bit value used for ERROR.
#define LC_HKAR_STALE   0x03
 Two bit value used for STALE.
Housekeeping Packed Action Results, State Identifiers

+

#define LC_HKAR_STATE_NOT_USED   0x00
 Two bit value used for NOT USED as well as PERMOFF.
#define LC_HKAR_STATE_ACTIVE   0x01
 Two bit value used for ACTIVE.
#define LC_HKAR_STATE_PASSIVE   0x02
 Two bit value used for PASSIVE.
#define LC_HKAR_STATE_DISABLED   0x03
 Two bit value used for DISABLED.
Housekeeping Packed Results, Array Sizes

+

#define LC_HKWR_NUM_BYTES   (((LC_MAX_WATCHPOINTS + 15) / 16) * 4)
 2 bits per WP and keeping array on longword boundary
#define LC_HKAR_NUM_BYTES   (((LC_MAX_ACTIONPOINTS + 7) / 8) * 4)
 4 bits per AP and keeping array on longword boundary
+

Define Documentation

+ +
+
+ + + + +
#define LC_ACTION_NOT_USED   0xFF
+
+
+ +

Used to indicate unused actionpoint table entries. Not valid as a command argument.

+ +

Definition at line 53 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATE_ACTIVE   1
+
+
+ +

Definition at line 56 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATE_DISABLED   3
+
+
+ +

Definition at line 58 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATE_PASSIVE   2
+
+
+ +

Definition at line 57 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_APSTATE_PERMOFF   4
+
+
+ +

To set this state requires using the LC_SET_AP_PERMOFF_CC command.

+ +

Definition at line 59 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKAR_ERROR   0x02
+
+
+ +

Two bit value used for ERROR.

+ +

Definition at line 77 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKAR_FAIL   0x01
+
+
+ +

Two bit value used for FAIL.

+ +

Definition at line 76 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKAR_NUM_BYTES   (((LC_MAX_ACTIONPOINTS + 7) / 8) * 4)
+
+
+ +

4 bits per AP and keeping array on longword boundary

+ +

Definition at line 96 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKAR_PASS   0x00
+
+
+ +

Two bit value used for PASS.

+ +

Definition at line 75 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKAR_STALE   0x03
+
+
+ +

Two bit value used for STALE.

+ +

Definition at line 78 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKAR_STATE_ACTIVE   0x01
+
+
+ +

Two bit value used for ACTIVE.

+ +

Definition at line 86 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKAR_STATE_DISABLED   0x03
+
+
+ +

Two bit value used for DISABLED.

+ +

Definition at line 88 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKAR_STATE_NOT_USED   0x00
+
+
+ +

Two bit value used for NOT USED as well as PERMOFF.

+ +

Definition at line 84 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKAR_STATE_PASSIVE   0x02
+
+
+ +

Two bit value used for PASSIVE.

+ +

Definition at line 87 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKWR_ERROR   0x02
+
+
+ +

Two bit value used for ERROR.

+ +

Definition at line 68 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKWR_FALSE   0x00
+
+
+ +

Two bit value used for FALSE.

+ +

Definition at line 66 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKWR_NUM_BYTES   (((LC_MAX_WATCHPOINTS + 15) / 16) * 4)
+
+
+ +

2 bits per WP and keeping array on longword boundary

+ +

Definition at line 94 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKWR_STALE   0x03
+
+
+ +

Two bit value used for STALE.

+ +

Definition at line 69 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_HKWR_TRUE   0x01
+
+
+ +

Two bit value used for TRUE.

+ +

Definition at line 67 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_NOOP_CC   0
+
+
+
Name:
Noop
+
Description
Implements the Noop command that insures the LC task is alive
+
Command Mnemonic(s):
$sc_$cpu_LC_NOOP
+
Command Structure
LC_NoArgsCmd_t
+
Command Verification
Successful execution of this command may be verified with the following telemetry:
    +
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • +
  • The LC_NOOP_INF_EID informational event message will be generated when the command is received
  • +
+
+
Error Conditions
This command may fail for the following reason(s):
    +
  • Command packet length not as expected
  • +
+
+
Evidence of failure may be found in the following telemetry:
    +
  • $sc_$cpu_LC_CMDEC - command error counter will increment
  • +
  • Error specific event message LC_LEN_ERR_EID
  • +
+
+
Criticality
None
+
See also:
LC_RESET_CC
+ +

Definition at line 130 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_RESET_AP_STATS_CC   5
+
+
+
Name:
Reset AP Statistics
+
Description
Resets actionpoint statistics
+
Command Mnemonic(s):
$sc_$cpu_LC_ResetAPStats
+
Command Structure
LC_ResetAPStats_t
+
Command Verification
Successful execution of this command may be verified with the following telemetry:
    +
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • +
  • The LC_APSTATS_INF_EID informational event message will be generated when the command is executed
  • +
+
+
Error Conditions
This command may fail for the following reason(s):
    +
  • Command packet length not as expected
  • +
  • Actionpoint number specified in command message is out of range
  • +
+
+
Evidence of failure may be found in the following telemetry:
+
+
Criticality
None
+
See also:
LC_RESET_WP_STATS_CC
+ +

Definition at line 311 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_RESET_CC   1
+
+
+
Name:
Reset Counters
+
Description
Resets the LC housekeeping counters
+
Command Mnemonic(s):
$sc_$cpu_LC_ResetCtrs
+
Command Structure
LC_NoArgsCmd_t
+
Command Verification
Successful execution of this command may be verified with the following telemetry:
    +
  • $sc_$cpu_LC_CMDPC - command counter will be cleared
  • +
  • $sc_$cpu_LC_CMDEC - command error counter will be cleared
  • +
  • $sc_$cpu_LC_APSampleCnt - actionpoint sample counter will be cleared
  • +
  • $sc_$cpu_LC_MonMsgCnt - monitored message counter will be cleared
  • +
  • $sc_$cpu_LC_RTSCnt - RTS execution counter will be cleared
  • +
  • $sc_$cpu_LC_PassRTSCnt - passive RTS execution counter will be cleared
  • +
  • The LC_RESET_DBG_EID debug event message will be generated when the command is executed
  • +
+
+
Error Conditions
This command may fail for the following reason(s):
    +
  • Command packet length not as expected
  • +
+
+
Evidence of failure may be found in the following telemetry:
    +
  • $sc_$cpu_LC_CMDEC - command error counter will increment
  • +
  • Error specific event message LC_LEN_ERR_EID
  • +
+
+
Criticality
None
+
See also:
LC_NOOP_CC
+ +

Definition at line 167 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_RESET_WP_STATS_CC   6
+
+
+
Name:
Reset WP Statistics
+
Description
Resets watchpoint statistics
+
Command Mnemonic(s):
$sc_$cpu_LC_ResetWPStats
+
Command Structure
LC_ResetWPStats_t
+
Command Verification
Successful execution of this command may be verified with the following telemetry:
    +
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • +
  • The LC_WPSTATS_INF_EID informational event message will be generated when the command is executed
  • +
+
+
Error Conditions
This command may fail for the following reason(s):
    +
  • Command packet length not as expected
  • +
  • Watchpoint number specified in command message is out of range
  • +
+
+
Evidence of failure may be found in the following telemetry:
+
+
Criticality
None
+
See also:
LC_RESET_AP_STATS_CC
+ +

Definition at line 346 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_SET_AP_PERMOFF_CC   4
+
+
+
Name:
Set AP Permanently Off
+
Description
Set the specified actionpoint's state to LC_APSTATE_PERMOFF
+
Command Mnemonic(s):
$sc_$cpu_LC_SetAPPermOff
+
Command Structure
LC_SetAPPermOff_t
+
Command Verification
Successful execution of this command may be verified with the following telemetry:
    +
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • +
  • The LC_APOFF_INF_EID informational event message will be generated when the command is executed
  • +
+
+
Error Conditions
This command may fail for the following reason(s):
    +
  • Command packet length not as expected
  • +
  • Actionpoint number specified in command message is out of range
  • +
  • Actionpoint current state is not LC_APSTATE_DISABLED
  • +
+
+
Evidence of failure may be found in the following telemetry:
+
+
Criticality
None
+ +

Definition at line 276 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_SET_AP_STATE_CC   3
+
+
+
Name:
Set AP State
+
Description
Set actionpoint state
+
Command Mnemonic(s):
$sc_$cpu_LC_SetAPState
+
Command Structure
LC_SetAPState_t
+
Command Verification
Successful execution of this command may be verified with the following telemetry:
    +
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • +
  • The LC_APSTATE_INF_EID informational event message will be generated when the command is executed
  • +
+
+
Error Conditions
This command may fail for the following reason(s):
    +
  • Command packet length not as expected
  • +
  • Invalid actionpoint state specified in command message
  • +
  • Actionpoint number specified in command message is out of range
  • +
  • Actionpoint current state is either LC_ACTION_NOT_USED or LC_APSTATE_PERMOFF
  • +
+
+
Evidence of failure may be found in the following telemetry:
+
+
Criticality
None
+ +

Definition at line 240 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_SET_LC_STATE_CC   2
+
+
+
Name:
Set LC Application State
+
Description
Sets the operational state of the LC application
+
Command Mnemonic(s):
$sc_$cpu_LC_SetLCState
+
Command Structure
LC_SetLCState_t
+
Command Verification
Successful execution of this command may be verified with the following telemetry:
    +
  • $sc_$cpu_LC_CMDPC - command counter will increment
  • +
  • $sc_$cpu_LC_CurrentLCState - will be set to the new state
  • +
  • The LC_LCSTATE_INF_EID informational event message will be generated when the command is executed
  • +
+
+
Error Conditions
This command may fail for the following reason(s):
    +
  • Command packet length not as expected
  • +
  • Invalid new state specified in command message
  • +
+
+
Evidence of failure may be found in the following telemetry:
+
+
Criticality
None
+ +

Definition at line 201 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_STATE_ACTIVE   1
+
+
+ +

Definition at line 43 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_STATE_DISABLED   3
+
+
+ +

Definition at line 45 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_STATE_FROM_CDS   4
+
+
+ +

Only used for reset processing Not valid as a command argument.

+ +

Definition at line 46 of file lc_msgdefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_STATE_PASSIVE   2
+
+
+ +

Definition at line 44 of file lc_msgdefs.h.

+ +
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__msgdefs_8h_source.html b/docs/users_guide/html/lc__msgdefs_8h_source.html new file mode 100644 index 0000000..f72df8a --- /dev/null +++ b/docs/users_guide/html/lc__msgdefs_8h_source.html @@ -0,0 +1,117 @@ + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_msgdefs.h Source File + + + + + + +
+

lc_msgdefs.h

Go to the documentation of this file.
00001 /************************************************************************
+00002 ** File:
+00003 **   $Id: lc__msgdefs_8h_source.html 1.1 2017/08/25 14:44:26EDT sstrege Exp  $
+00004 **
+00005 **  Copyright (c) 2007-2014 United States Government as represented by the 
+00006 **  Administrator of the National Aeronautics and Space Administration. 
+00007 **  All Other Rights Reserved.  
+00008 **
+00009 **  This software was created at NASA's Goddard Space Flight Center.
+00010 **  This software is governed by the NASA Open Source Agreement and may be 
+00011 **  used, distributed and modified only pursuant to the terms of that 
+00012 **  agreement.
+00013 **
+00014 ** Purpose: 
+00015 **   Specification for the CFS Limit Checker (LC) command and telemetry 
+00016 **   message constant definitions.
+00017 **
+00018 ** Notes:
+00019 **   These Macro definitions have been put in this file (instead of 
+00020 **   lc_msg.h) so this file can be included directly into ASIST build 
+00021 **   test scripts. ASIST RDL files can accept C language #defines but 
+00022 **   can't handle type definitions. As a result: DO NOT PUT ANY
+00023 **   TYPEDEFS OR STRUCTURE DEFINITIONS IN THIS FILE! 
+00024 **   ADD THEM TO lc_msg.h IF NEEDED! 
+00025 **
+00026 ** 
+00027 *************************************************************************/
+00028 #ifndef _lc_msgdefs_
+00029 #define _lc_msgdefs_
+00030 
+00031 /************************************************************************
+00032 ** Includes
+00033 *************************************************************************/
+00034 #include "lc_platform_cfg.h"
+00035 
+00036 /************************************************************************
+00037 ** Macro Definitions
+00038 *************************************************************************/
+00039 
+00043 #define LC_STATE_ACTIVE             1
+00044 #define LC_STATE_PASSIVE            2
+00045 #define LC_STATE_DISABLED           3
+00046 #define LC_STATE_FROM_CDS           4      
+00053 #define LC_ACTION_NOT_USED          0xFF   
+00056 #define LC_APSTATE_ACTIVE           1
+00057 #define LC_APSTATE_PASSIVE          2
+00058 #define LC_APSTATE_DISABLED         3
+00059 #define LC_APSTATE_PERMOFF          4      
+00066 #define LC_HKWR_FALSE               0x00   
+00067 #define LC_HKWR_TRUE                0x01   
+00068 #define LC_HKWR_ERROR               0x02   
+00069 #define LC_HKWR_STALE               0x03   
+00075 #define LC_HKAR_PASS                0x00  
+00076 #define LC_HKAR_FAIL                0x01  
+00077 #define LC_HKAR_ERROR               0x02  
+00078 #define LC_HKAR_STALE               0x03  
+00084 #define LC_HKAR_STATE_NOT_USED      0x00  
+00086 #define LC_HKAR_STATE_ACTIVE        0x01  
+00087 #define LC_HKAR_STATE_PASSIVE       0x02  
+00088 #define LC_HKAR_STATE_DISABLED      0x03  
+00094 #define LC_HKWR_NUM_BYTES  (((LC_MAX_WATCHPOINTS  + 15) / 16) * 4)   
+00096 #define LC_HKAR_NUM_BYTES  (((LC_MAX_ACTIONPOINTS +  7) /  8) * 4)   
+00130 #define LC_NOOP_CC                  0
+00131 
+00167 #define LC_RESET_CC                 1
+00168 
+00201 #define LC_SET_LC_STATE_CC          2
+00202 
+00240 #define LC_SET_AP_STATE_CC          3
+00241 
+00276 #define LC_SET_AP_PERMOFF_CC        4
+00277 
+00311 #define LC_RESET_AP_STATS_CC        5
+00312 
+00346 #define LC_RESET_WP_STATS_CC        6
+00347 
+00348 #endif /* _lc_msgdefs_ */
+00349 
+00350 /************************/
+00351 /*  End of File Comment */
+00352 /************************/
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__msgids_8h-source.html b/docs/users_guide/html/lc__msgids_8h-source.html deleted file mode 100644 index 7f7597d..0000000 --- a/docs/users_guide/html/lc__msgids_8h-source.html +++ /dev/null @@ -1,89 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/cpu1/inc/lc_msgids.h Source File - - - - - - - -

lc_msgids.h

Go to the documentation of this file.
00001 /*************************************************************************
-00002 ** File:
-00003 **   $Id: lc__msgids_8h-source.html 1.1 2015/03/04 16:51:33EST sstrege Exp  $
-00004 **
-00005 **  Copyright © 2007-2014 United States Government as represented by the 
-00006 **  Administrator of the National Aeronautics and Space Administration. 
-00007 **  All Other Rights Reserved.  
-00008 **
-00009 **  This software was created at NASA's Goddard Space Flight Center.
-00010 **  This software is governed by the NASA Open Source Agreement and may be 
-00011 **  used, distributed and modified only pursuant to the terms of that 
-00012 **  agreement.
-00013 **
-00014 ** Purpose: 
-00015 **   CFS Limit Checker (LC) Application Message IDs
-00016 **
-00017 ** Notes:
-00018 **
-00019 **   $Log: lc__msgids_8h-source.html  $
-00019 **   Revision 1.1 2015/03/04 16:51:33EST sstrege 
-00019 **   Initial revision
-00019 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-00020 **   Revision 1.2 2015/03/04 16:09:56EST sstrege 
-00021 **   Added copyright information
-00022 **   Revision 1.1 2012/07/31 16:53:35EDT nschweis 
-00023 **   Initial revision
-00024 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/platform_inc/project.pj
-00025 **   Revision 1.2 2011/01/19 12:45:40EST jmdagost 
-00026 **   Moved two message parameters to the message IDs file for scheduler table access.
-00027 **   Revision 1.1 2008/10/29 14:18:12EDT dahardison 
-00028 **   Initial revision
-00029 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/platform_inc/project.pj
-00030 ** 
-00031 *************************************************************************/
-00032 #ifndef _lc_msgids_
-00033 #define _lc_msgids_
-00034 
-00035 /*************************************************************************
-00036 ** Macro Definitions
-00037 *************************************************************************/
-00041 #define LC_CMD_MID           0x18A4    
-00042 #define LC_SEND_HK_MID       0x18A5    
-00043 #define LC_SAMPLE_AP_MID     0x18A6    
-00045 /*
-00046 #define LC_SPARE1            0x18A7
-00047 #define LC_SPARE2            0x18A8
-00048 */
-00049 
-00053 #define LC_HK_TLM_MID        0x08A7    
-00055 /*
-00056 #define LC_TLM_SPARE1        0x08A8
-00057 #define LC_TLM_SPARE2        0x08A9
-00058 */
-00059 
-00063 #define LC_ALL_ACTIONPOINTS         0xFFFF
-00064 #define LC_ALL_WATCHPOINTS          0xFFFF
-00065 
-00067 #endif /*_lc_msgids_*/
-00068 
-00069 /************************/
-00070 /*  End of File Comment */
-00071 /************************/
-

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/lc__msgids_8h.html b/docs/users_guide/html/lc__msgids_8h.html index 4001f0c..60c96ca 100644 --- a/docs/users_guide/html/lc__msgids_8h.html +++ b/docs/users_guide/html/lc__msgids_8h.html @@ -1,162 +1,159 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/cpu1/inc/lc_msgids.h File Reference - - - - - - - -

lc_msgids.h File Reference

-

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - -

LC Command Message IDs

#define LC_CMD_MID   0x18A4
 Msg ID for cmds to LC.
#define LC_SEND_HK_MID   0x18A5
 Msg ID to request LC housekeeping.
#define LC_SAMPLE_AP_MID   0x18A6
 Msg ID to request actionpoint sample.

LC Telemetry Message IDs

#define LC_HK_TLM_MID   0x08A7
 LC Housekeeping Telemetry.

Special Values for Commands

#define LC_ALL_ACTIONPOINTS   0xFFFF
#define LC_ALL_WATCHPOINTS   0xFFFF
-


Define Documentation

- -
-
- - - - -
#define LC_ALL_ACTIONPOINTS   0xFFFF
-
-
- -

- -

-Definition at line 63 of file lc_msgids.h. -

-

- -

-
- - - - -
#define LC_ALL_WATCHPOINTS   0xFFFF
-
-
- -

- -

-Definition at line 64 of file lc_msgids.h. -

-

- -

-
- - - - -
#define LC_CMD_MID   0x18A4
-
-
- -

-Msg ID for cmds to LC. -

- -

-Definition at line 41 of file lc_msgids.h. -

-

- -

-
- - - - -
#define LC_HK_TLM_MID   0x08A7
-
-
- -

-LC Housekeeping Telemetry. -

- -

-Definition at line 53 of file lc_msgids.h. -

-

- -

-
- - - - -
#define LC_SAMPLE_AP_MID   0x18A6
-
-
- -

-Msg ID to request actionpoint sample. -

- -

-Definition at line 43 of file lc_msgids.h. -

-

- -

-
- - - - -
#define LC_SEND_HK_MID   0x18A5
-
-
- -

-Msg ID to request LC housekeeping. -

- -

-Definition at line 42 of file lc_msgids.h. -

-

-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/cpu1/inc/lc_msgids.h File Reference + + + + + + +
+

lc_msgids.h File Reference

+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + +

Defines

LC Command Message IDs

+

#define LC_CMD_MID   0x18A4
 Msg ID for cmds to LC.
#define LC_SEND_HK_MID   0x18A5
 Msg ID to request LC housekeeping.
#define LC_SAMPLE_AP_MID   0x18A6
 Msg ID to request actionpoint sample.
LC Telemetry Message IDs

+

#define LC_HK_TLM_MID   0x08A7
 LC Housekeeping Telemetry.
Special Values for Commands

+

#define LC_ALL_ACTIONPOINTS   0xFFFF
#define LC_ALL_WATCHPOINTS   0xFFFF
+

Define Documentation

+ +
+
+ + + + +
#define LC_ALL_ACTIONPOINTS   0xFFFF
+
+
+ +

Definition at line 52 of file lc_msgids.h.

+ +
+
+ +
+
+ + + + +
#define LC_ALL_WATCHPOINTS   0xFFFF
+
+
+ +

Definition at line 53 of file lc_msgids.h.

+ +
+
+ +
+
+ + + + +
#define LC_CMD_MID   0x18A4
+
+
+ +

Msg ID for cmds to LC.

+ +

Definition at line 30 of file lc_msgids.h.

+ +
+
+ +
+
+ + + + +
#define LC_HK_TLM_MID   0x08A7
+
+
+ +

LC Housekeeping Telemetry.

+ +

Definition at line 42 of file lc_msgids.h.

+ +
+
+ +
+
+ + + + +
#define LC_SAMPLE_AP_MID   0x18A6
+
+
+ +

Msg ID to request actionpoint sample.

+ +

Definition at line 32 of file lc_msgids.h.

+ +
+
+ +
+
+ + + + +
#define LC_SEND_HK_MID   0x18A5
+
+
+ +

Msg ID to request LC housekeeping.

+ +

Definition at line 31 of file lc_msgids.h.

+ +
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__msgids_8h_source.html b/docs/users_guide/html/lc__msgids_8h_source.html new file mode 100644 index 0000000..3e4771d --- /dev/null +++ b/docs/users_guide/html/lc__msgids_8h_source.html @@ -0,0 +1,84 @@ + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/cpu1/inc/lc_msgids.h Source File + + + + + + +
+

lc_msgids.h

Go to the documentation of this file.
00001 /*************************************************************************
+00002 ** File:
+00003 **   $Id: lc__msgids_8h_source.html 1.1 2017/08/25 14:44:27EDT sstrege Exp  $
+00004 **
+00005 **  Copyright (c) 2007-2014 United States Government as represented by the 
+00006 **  Administrator of the National Aeronautics and Space Administration. 
+00007 **  All Other Rights Reserved.  
+00008 **
+00009 **  This software was created at NASA's Goddard Space Flight Center.
+00010 **  This software is governed by the NASA Open Source Agreement and may be 
+00011 **  used, distributed and modified only pursuant to the terms of that 
+00012 **  agreement.
+00013 **
+00014 ** Purpose: 
+00015 **   CFS Limit Checker (LC) Application Message IDs
+00016 **
+00017 ** Notes:
+00018 **
+00019 ** 
+00020 *************************************************************************/
+00021 #ifndef _lc_msgids_
+00022 #define _lc_msgids_
+00023 
+00024 /*************************************************************************
+00025 ** Macro Definitions
+00026 *************************************************************************/
+00030 #define LC_CMD_MID           0x18A4    
+00031 #define LC_SEND_HK_MID       0x18A5    
+00032 #define LC_SAMPLE_AP_MID     0x18A6    
+00034 /*
+00035 #define LC_SPARE1            0x18A7
+00036 #define LC_SPARE2            0x18A8
+00037 */
+00038 
+00042 #define LC_HK_TLM_MID        0x08A7    
+00044 /*
+00045 #define LC_TLM_SPARE1        0x08A8
+00046 #define LC_TLM_SPARE2        0x08A9
+00047 */
+00048 
+00052 #define LC_ALL_ACTIONPOINTS         0xFFFF
+00053 #define LC_ALL_WATCHPOINTS          0xFFFF
+00054 
+00056 #endif /*_lc_msgids_*/
+00057 
+00058 /************************/
+00059 /*  End of File Comment */
+00060 /************************/
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__perfids_8h-source.html b/docs/users_guide/html/lc__perfids_8h-source.html deleted file mode 100644 index 4a2d1ca..0000000 --- a/docs/users_guide/html/lc__perfids_8h-source.html +++ /dev/null @@ -1,75 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/mission_inc/lc_perfids.h Source File - - - - - - - -

lc_perfids.h

Go to the documentation of this file.
00001 /*************************************************************************
-00002 ** File:
-00003 **   $Id: lc__perfids_8h-source.html 1.1 2015/03/04 16:51:33EST sstrege Exp  $
-00004 **
-00005 **  Copyright © 2007-2014 United States Government as represented by the 
-00006 **  Administrator of the National Aeronautics and Space Administration. 
-00007 **  All Other Rights Reserved.  
-00008 **
-00009 **  This software was created at NASA's Goddard Space Flight Center.
-00010 **  This software is governed by the NASA Open Source Agreement and may be 
-00011 **  used, distributed and modified only pursuant to the terms of that 
-00012 **  agreement.
-00013 **
-00014 ** Purpose: 
-00015 **   CFS Limit Checker (LC) Application Performance IDs
-00016 **
-00017 ** Notes:
-00018 **
-00019 **   $Log: lc__perfids_8h-source.html  $
-00019 **   Revision 1.1 2015/03/04 16:51:33EST sstrege 
-00019 **   Initial revision
-00019 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-00020 **   Revision 1.2 2015/03/04 16:09:51EST sstrege 
-00021 **   Added copyright information
-00022 **   Revision 1.1 2012/07/31 16:53:34EDT nschweis 
-00023 **   Initial revision
-00024 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/mission_inc/project.pj
-00025 **   Revision 1.2 2008/12/03 13:59:41EST dahardis 
-00026 **   Corrections from peer code review
-00027 **   Revision 1.1 2008/10/29 14:18:05EDT dahardison 
-00028 **   Initial revision
-00029 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/mission_inc/project.pj
-00030 ** 
-00031 *************************************************************************/
-00032 #ifndef _lc_perfids_
-00033 #define _lc_perfids_
-00034 
-00035 /*************************************************************************
-00036 ** Macro Definitions
-00037 *************************************************************************/
-00041 #define LC_APPMAIN_PERF_ID              28
-00042 #define LC_WDT_SEARCH_PERF_ID           43
-00043 
-00045 #endif /*_lc_perfids_*/
-00046 
-00047 /************************/
-00048 /*  End of File Comment */
-00049 /************************/
-

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/lc__perfids_8h.html b/docs/users_guide/html/lc__perfids_8h.html index 1bc8366..45770ea 100644 --- a/docs/users_guide/html/lc__perfids_8h.html +++ b/docs/users_guide/html/lc__perfids_8h.html @@ -1,72 +1,77 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/mission_inc/lc_perfids.h File Reference - - - - - - - -

lc_perfids.h File Reference

-

-Go to the source code of this file. - - - - - - -

CFS LC Application Performance IDs

#define LC_APPMAIN_PERF_ID   28
#define LC_WDT_SEARCH_PERF_ID   43
-


Define Documentation

- -
-
- - - - -
#define LC_APPMAIN_PERF_ID   28
-
-
- -

- -

-Definition at line 41 of file lc_perfids.h. -

-

- -

-
- - - - -
#define LC_WDT_SEARCH_PERF_ID   43
-
-
- -

- -

-Definition at line 42 of file lc_perfids.h. -

-

-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/mission_inc/lc_perfids.h File Reference + + + + + + +
+

lc_perfids.h File Reference

+

Go to the source code of this file.

+ + + + + + +

Defines

CFS LC Application Performance IDs

+

#define LC_APPMAIN_PERF_ID   28
#define LC_WDT_SEARCH_PERF_ID   43
+

Define Documentation

+ +
+
+ + + + +
#define LC_APPMAIN_PERF_ID   28
+
+
+ +

Definition at line 30 of file lc_perfids.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDT_SEARCH_PERF_ID   43
+
+
+ +

Definition at line 31 of file lc_perfids.h.

+ +
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__perfids_8h_source.html b/docs/users_guide/html/lc__perfids_8h_source.html new file mode 100644 index 0000000..f6fbeb6 --- /dev/null +++ b/docs/users_guide/html/lc__perfids_8h_source.html @@ -0,0 +1,70 @@ + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/mission_inc/lc_perfids.h Source File + + + + + + +
+

lc_perfids.h

Go to the documentation of this file.
00001 /*************************************************************************
+00002 ** File:
+00003 **   $Id: lc__perfids_8h_source.html 1.1 2017/08/25 14:44:28EDT sstrege Exp  $
+00004 **
+00005 **  Copyright (c) 2007-2014 United States Government as represented by the 
+00006 **  Administrator of the National Aeronautics and Space Administration. 
+00007 **  All Other Rights Reserved.  
+00008 **
+00009 **  This software was created at NASA's Goddard Space Flight Center.
+00010 **  This software is governed by the NASA Open Source Agreement and may be 
+00011 **  used, distributed and modified only pursuant to the terms of that 
+00012 **  agreement.
+00013 **
+00014 ** Purpose: 
+00015 **   CFS Limit Checker (LC) Application Performance IDs
+00016 **
+00017 ** Notes:
+00018 **
+00019 ** 
+00020 *************************************************************************/
+00021 #ifndef _lc_perfids_
+00022 #define _lc_perfids_
+00023 
+00024 /*************************************************************************
+00025 ** Macro Definitions
+00026 *************************************************************************/
+00030 #define LC_APPMAIN_PERF_ID              28
+00031 #define LC_WDT_SEARCH_PERF_ID           43
+00032 
+00034 #endif /*_lc_perfids_*/
+00035 
+00036 /************************/
+00037 /*  End of File Comment */
+00038 /************************/
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__platform__cfg_8h-source.html b/docs/users_guide/html/lc__platform__cfg_8h-source.html deleted file mode 100644 index 0fd5cea..0000000 --- a/docs/users_guide/html/lc__platform__cfg_8h-source.html +++ /dev/null @@ -1,112 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/cpu1/inc/lc_platform_cfg.h Source File - - - - - - - -

lc_platform_cfg.h

Go to the documentation of this file.
00001 /*************************************************************************
-00002 ** File:
-00003 **   $Id: lc__platform__cfg_8h-source.html 1.1 2015/03/04 16:51:34EST sstrege Exp  $
-00004 **
-00005 **  Copyright © 2007-2014 United States Government as represented by the 
-00006 **  Administrator of the National Aeronautics and Space Administration. 
-00007 **  All Other Rights Reserved.  
-00008 **
-00009 **  This software was created at NASA's Goddard Space Flight Center.
-00010 **  This software is governed by the NASA Open Source Agreement and may be 
-00011 **  used, distributed and modified only pursuant to the terms of that 
-00012 **  agreement.
-00013 **
-00014 ** Purpose: 
-00015 **   CFS Limit Checker (LC) Application Platform Configuration Header File
-00016 **
-00017 ** Notes:
-00018 **
-00019 **   $Log: lc__platform__cfg_8h-source.html  $
-00019 **   Revision 1.1 2015/03/04 16:51:34EST sstrege 
-00019 **   Initial revision
-00019 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-00020 **   Revision 1.2 2015/03/04 16:09:54EST sstrege 
-00021 **   Added copyright information
-00022 **   Revision 1.1 2012/07/31 16:53:35EDT nschweis 
-00023 **   Initial revision
-00024 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/platform_inc/project.pj
-00025 **   Revision 1.8 2011/03/04 09:47:04EST lwalling 
-00026 **   Change default table directory from ram to cf/apps
-00027 **   Revision 1.7 2011/01/19 11:32:05EST jmdagost 
-00028 **   Moved mission revision number from lc_version.h to lc_platform_cfg.h.
-00029 **   Revision 1.6 2010/02/23 11:24:14EST lwalling 
-00030 **   Change application name from LC_APP to LC per CFS naming convention
-00031 **   Revision 1.5 2009/12/22 13:17:45EST lwalling 
-00032 **   Create common definition for LC application name
-00033 **   Revision 1.4 2008/12/10 15:59:26EST dahardis 
-00034 **   Reduced the maximum number of watchpoints and actionpoints config params
-00035 **   from 256 to 176
-00036 **   Revision 1.3 2008/12/10 15:33:21EST dahardis 
-00037 **   Changed default configuration parameter setting to not attempt a restore 
-00038 **   from CDS on application restart
-00039 **   Revision 1.2 2008/12/03 13:59:40EST dahardis 
-00040 **   Corrections from peer code review
-00041 **   Revision 1.1 2008/10/29 14:18:17EDT dahardison 
-00042 **   Initial revision
-00043 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/platform_inc/project.pj
-00044 ** 
-00045 *************************************************************************/
-00046 #ifndef _lc_platform_cfg_
-00047 #define _lc_platform_cfg_
-00048 
-00063 #define LC_APP_NAME                    "LC"
-00064 
-00065 
-00077 #define LC_PIPE_DEPTH                  12
-00078 
-00099 #define LC_MAX_WATCHPOINTS             176
-00100 
-00120 #define LC_MAX_ACTIONPOINTS            176
-00121 
-00134 #define LC_STATE_POWER_ON_RESET        LC_STATE_DISABLED
-00135 
-00149 /* #define LC_SAVE_TO_CDS */
-00150 
-00167 #define LC_STATE_WHEN_CDS_RESTORED     LC_STATE_FROM_CDS
-00168 
-00179 #define LC_WDT_FILENAME                "/cf/apps/lc_def_wdt.tbl"
-00180 
-00191 #define LC_ADT_FILENAME                "/cf/apps/lc_def_adt.tbl"
-00192 
-00204 #define LC_MAX_RPN_EQU_SIZE            20
-00205 
-00224 #define LC_MAX_ACTION_TEXT             32
-00225 
-00236 #define LC_MAX_VALID_ADT_RTSID         0xFFF0
-00237 
-00248 #define LC_FLOAT_TOLERANCE             (1.0e-25)
-00249 
-00263 #define LC_MISSION_REV            0
-00264 
-00265 #endif /*_lc_platform_cfg_*/
-00266 
-00267 /************************/
-00268 /*  End of File Comment */
-00269 /************************/
-

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/lc__platform__cfg_8h.html b/docs/users_guide/html/lc__platform__cfg_8h.html index fe727ec..6e66933 100644 --- a/docs/users_guide/html/lc__platform__cfg_8h.html +++ b/docs/users_guide/html/lc__platform__cfg_8h.html @@ -1,325 +1,300 @@ - - -CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/MissionX/build/cpu1/inc/lc_platform_cfg.h File Reference - - - - - - - -

lc_platform_cfg.h File Reference

-

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Defines

#define LC_APP_NAME   "LC"
#define LC_PIPE_DEPTH   12
#define LC_MAX_WATCHPOINTS   176
#define LC_MAX_ACTIONPOINTS   176
#define LC_STATE_POWER_ON_RESET   LC_STATE_DISABLED
#define LC_STATE_WHEN_CDS_RESTORED   LC_STATE_FROM_CDS
#define LC_WDT_FILENAME   "/cf/apps/lc_def_wdt.tbl"
#define LC_ADT_FILENAME   "/cf/apps/lc_def_adt.tbl"
#define LC_MAX_RPN_EQU_SIZE   20
#define LC_MAX_ACTION_TEXT   32
#define LC_MAX_VALID_ADT_RTSID   0xFFF0
#define LC_FLOAT_TOLERANCE   (1.0e-25)
#define LC_MISSION_REV   0
-


Define Documentation

- -
-
- - - - -
#define LC_ADT_FILENAME   "/cf/apps/lc_def_adt.tbl"
-
-
- -

-

Purpose:
Actionpoint Definition Table (ADT) filename
-
Description:
Default file to load the actionpoint definition table from during a power-on reset sequence
-
Limits:
This string shouldn't be longer than OS_MAX_PATH_LEN for the target platform in question
- -

-Definition at line 191 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_APP_NAME   "LC"
-
-
- -

-

Purpose:
Application Name
-
Description:
This definition must match the name used at startup by the cFE Executive Services when creating the LC application. Note that application names are also an argument to certain cFE commands. For example, the application name is needed to access tables via cFE Table Services commands.
-
Limits:
LC requires that this name be defined, but otherwise places no limits on the definition. Refer to CFE Executive Services for specific information on limits related to application names.
- -

-Definition at line 63 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_FLOAT_TOLERANCE   (1.0e-25)
-
-
- -

-

Purpose:
Floating Point Compare Tolerance
-
Description:
Difference between 2 floats that will still compare as equal. The default value of (1.0e-25) was taken from the GNC file mathconstants.h
-
Limits:
The LC app does not place a limit on this parameter.
- -

-Definition at line 248 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_MAX_ACTION_TEXT   32
-
-
- -

-

Purpose:
Maximum actionpoint event text string size
-
Description:
Maximum length of the event message string that can specified in an actionpoint definition (including NUL terminator)
-
Limits:
LC appends the trailer text LC_AP_EVENT_TAIL_STR to this string when reporting actionpoint failures. The size of this string is LC_AP_EVENT_TAIL_LEN
-The total value of LC_MAX_ACTION_TEXT + LC_AP_EVENT_TAIL_LEN should be less than CFE_EVS_MAX_MESSAGE_LENGTH to avoid event message truncation

-Raising this value will also increase the size of the Actionpoint Definition Table (ADT) -

-Definition at line 224 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_MAX_ACTIONPOINTS   176
-
-
- -

-

Purpose:
Maximum number of actionpoints
-
Description:
Maximum number of actionpoints that can be defined in the Actionpoint Definition Table (ADT)
-
Limits:
This parameter can't be larger than an unsigned 16 bit integer (65535).
-This parameter will dictate the size of the Actionpoint Definition Table:

-ADT Size = LC_MAX_ACTIONPOINTS * sizeof(LC_ADTEntry_t)

-The total size of this table should not exceed the cFE size limit for a single buffered table set by the CFE_TBL_MAX_SNGL_TABLE_SIZE parameter -

-Definition at line 120 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_MAX_RPN_EQU_SIZE   20
-
-
- -

-

Purpose:
Maximum reverse polish (RPN) equation size
-
Description:
Maximum combined number of operators and operands that may exist in an actionpoint definition's reverse polish equation
-
Limits:
The LC app does not place a limit on this parameter. However, raising this value will increase the size of the Actionpoint Definition Table (ADT)
- -

-Definition at line 204 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_MAX_VALID_ADT_RTSID   0xFFF0
-
-
- -

-

Purpose:
Maximum valid ADT RTS ID
-
Description:
The maximum RTS ID that LC will allow during table validation in a Actionpoint Definition Table (ADT) entry
-
Limits:
This parameter can't be larger than an unsigned 16 bit integer (65535).
- -

-Definition at line 236 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_MAX_WATCHPOINTS   176
-
-
- -

-

Purpose:
Maximum number of watchpoints
-
Description:
Maximum number of watchpoints that can be defined in the Watchpoint Definition Table (WDT)
-
Limits:
This parameter can't be larger than 65520 (0xFFF0) because higher values are reserved for use as Reversh Polish operators.
-This parameter will dictate the size of the Watchpoint Definition Table:

-WDT Size = LC_MAX_WATCHPOINTS * sizeof(LC_WDTEntry_t)

-The total size of this table should not exceed the cFE size limit for a single buffered table set by the CFE_TBL_MAX_SNGL_TABLE_SIZE parameter -

-Definition at line 99 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_MISSION_REV   0
-
-
- -

-Mission specific version number for LC application

-

Description:
An application version number consists of four parts: major version number, minor version number, revision number and mission specific revision number. The mission specific revision number is defined here and the other parts are defined in "lc_version.h".
-
Limits:
Must be defined as a numeric value that is greater than or equal to zero.
- -

-Definition at line 263 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_PIPE_DEPTH   12
-
-
- -

-

Purpose:
Command Pipe Depth
-
Description:
Maximum number of messages that will be allowed in the LC command pipe at one time. Used during initialization in the call to CFE_SB_CreatePipe
-
Limits:
This parameter can't be larger than an unsigned 16 bit integer (65535).
- -

-Definition at line 77 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_STATE_POWER_ON_RESET   LC_STATE_DISABLED
-
-
- -

-

Purpose:
LC state after power-on reset
-
Description:
What operating state LC should initialize to after a power-on reset.
-
Limits:
This parameter must be one of the following: LC_STATE_ACTIVE LC_STATE_PASSIVE LC_STATE_DISABLED
- -

-Definition at line 134 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_STATE_WHEN_CDS_RESTORED   LC_STATE_FROM_CDS
-
-
- -

-

Purpose:
LC state when CDS is restored
-
Description:
What operating state LC should initialize to after successfully restoring information from the CDS after a processor or application reset. This is only used when LC_SAVE_TO_CDS is set to TRUE, and provides a way to override any state LC may have been operating in prior to the reset occurring.
-
Limits:
This parameter must be one of the following: LC_STATE_ACTIVE LC_STATE_PASSIVE LC_STATE_DISABLED LC_STATE_FROM_CDS
- -

-Definition at line 167 of file lc_platform_cfg.h. -

-

- -

-
- - - - -
#define LC_WDT_FILENAME   "/cf/apps/lc_def_wdt.tbl"
-
-
- -

-

Purpose:
Watchpoint Definition Table (WDT) filename
-
Description:
Default file to load the watchpoint definition table from during a power-on reset sequence
-
Limits:
This string shouldn't be longer than OS_MAX_PATH_LEN for the target platform in question
- -

-Definition at line 179 of file lc_platform_cfg.h. -

-

-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/cpu1/inc/lc_platform_cfg.h File Reference + + + + + + +
+

lc_platform_cfg.h File Reference

+

Go to the source code of this file.

+ + + + + + + + + + + + + + + +

Defines

#define LC_APP_NAME   "LC"
#define LC_PIPE_DEPTH   12
#define LC_MAX_WATCHPOINTS   176
#define LC_MAX_ACTIONPOINTS   176
#define LC_STATE_POWER_ON_RESET   LC_STATE_DISABLED
#define LC_STATE_WHEN_CDS_RESTORED   LC_STATE_FROM_CDS
#define LC_WDT_FILENAME   "/cf/apps/lc_def_wdt.tbl"
#define LC_ADT_FILENAME   "/cf/apps/lc_def_adt.tbl"
#define LC_MAX_RPN_EQU_SIZE   20
#define LC_MAX_ACTION_TEXT   32
#define LC_MAX_VALID_ADT_RTSID   0xFFF0
#define LC_FLOAT_TOLERANCE   (1.0e-25)
#define LC_MISSION_REV   0
+

Define Documentation

+ +
+
+ + + + +
#define LC_ADT_FILENAME   "/cf/apps/lc_def_adt.tbl"
+
+
+
Purpose:
Actionpoint Definition Table (ADT) filename
+
Description:
Default file to load the actionpoint definition table from during a power-on reset sequence
+
Limits:
This string shouldn't be longer than OS_MAX_PATH_LEN for the target platform in question
+ +

Definition at line 170 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_APP_NAME   "LC"
+
+
+
Purpose:
Application Name
+
Description:
This definition must match the name used at startup by the cFE Executive Services when creating the LC application. Note that application names are also an argument to certain cFE commands. For example, the application name is needed to access tables via cFE Table Services commands.
+
Limits:
LC requires that this name be defined, but otherwise places no limits on the definition. Refer to CFE Executive Services for specific information on limits related to application names.
+ +

Definition at line 38 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_FLOAT_TOLERANCE   (1.0e-25)
+
+
+
Purpose:
Floating Point Compare Tolerance
+
Description:
Difference between 2 floats that will still compare as equal. The default value of (1.0e-25) was taken from the GNC file mathconstants.h
+
Limits:
The LC app does not place a limit on this parameter.
+ +

Definition at line 227 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_MAX_ACTION_TEXT   32
+
+
+
Purpose:
Maximum actionpoint event text string size
+
Description:
Maximum length of the event message string that can specified in an actionpoint definition (including NUL terminator)
+
Limits:
LC appends the trailer text LC_AP_EVENT_TAIL_STR to this string when reporting actionpoint failures. The size of this string is LC_AP_EVENT_TAIL_LEN
+

The total value of LC_MAX_ACTION_TEXT + LC_AP_EVENT_TAIL_LEN should be less than CFE_EVS_MAX_MESSAGE_LENGTH to avoid event message truncation

+

Raising this value will also increase the size of the Actionpoint Definition Table (ADT)

+ +

Definition at line 203 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_MAX_ACTIONPOINTS   176
+
+
+
Purpose:
Maximum number of actionpoints
+
Description:
Maximum number of actionpoints that can be defined in the Actionpoint Definition Table (ADT)
+
Limits:
This parameter can't be larger than an unsigned 16 bit integer (65535). It must be a multiple of 2 to avoid indexing past the end of the array as LC indexes ahead to build the packed status bytes.
+

This parameter will dictate the size of the Actionpoint Definition Table:

+

ADT Size = LC_MAX_ACTIONPOINTS * sizeof(LC_ADTEntry_t)

+

The total size of this table should not exceed the cFE size limit for a single buffered table set by the CFE_TBL_MAX_SNGL_TABLE_SIZE parameter

+ +

Definition at line 99 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_MAX_RPN_EQU_SIZE   20
+
+
+
Purpose:
Maximum reverse polish (RPN) equation size
+
Description:
Maximum combined number of operators and operands that may exist in an actionpoint definition's reverse polish equation
+
Limits:
The LC app does not place a limit on this parameter. However, raising this value will increase the size of the Actionpoint Definition Table (ADT)
+ +

Definition at line 183 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_MAX_VALID_ADT_RTSID   0xFFF0
+
+
+
Purpose:
Maximum valid ADT RTS ID
+
Description:
The maximum RTS ID that LC will allow during table validation in a Actionpoint Definition Table (ADT) entry
+
Limits:
This parameter can't be larger than an unsigned 16 bit integer (65535).
+ +

Definition at line 215 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_MAX_WATCHPOINTS   176
+
+
+
Purpose:
Maximum number of watchpoints
+
Description:
Maximum number of watchpoints that can be defined in the Watchpoint Definition Table (WDT)
+
Limits:
This parameter can't be larger than 65520 (0xFFF0) because higher values are reserved for use as Reverse Polish operators. It must be a multiple of 4 to avoid indexing past the end of the array as LC indexes ahead to build the packed status bytes.
+

This parameter will dictate the size of the Watchpoint Definition Table:

+

WDT Size = LC_MAX_WATCHPOINTS * sizeof(LC_WDTEntry_t)

+

The total size of this table should not exceed the cFE size limit for a single buffered table set by the CFE_TBL_MAX_SNGL_TABLE_SIZE parameter

+ +

Definition at line 76 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_MISSION_REV   0
+
+
+

Mission specific version number for LC application

+
Description:
An application version number consists of four parts: major version number, minor version number, revision number and mission specific revision number. The mission specific revision number is defined here and the other parts are defined in "lc_version.h".
+
Limits:
Must be defined as a numeric value that is greater than or equal to zero.
+ +

Definition at line 242 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_PIPE_DEPTH   12
+
+
+
Purpose:
Command Pipe Depth
+
Description:
Maximum number of messages that will be allowed in the LC command pipe at one time. Used during initialization in the call to CFE_SB_CreatePipe
+
Limits:
This parameter can't be larger than an unsigned 16 bit integer (65535).
+ +

Definition at line 52 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_STATE_POWER_ON_RESET   LC_STATE_DISABLED
+
+
+
Purpose:
LC state after power-on reset
+
Description:
What operating state LC should initialize to after a power-on reset.
+
Limits:
This parameter must be one of the following: LC_STATE_ACTIVE LC_STATE_PASSIVE LC_STATE_DISABLED
+ +

Definition at line 113 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_STATE_WHEN_CDS_RESTORED   LC_STATE_FROM_CDS
+
+
+
Purpose:
Save data to CDS compiler switch
+
Description:
Compile switch that tells LC that we should save data over a processor or application reset by using the Critical Data Store (CDS). Comment out or #undef to force LC to do a default (power-on) initialization sequence on all restarts (this is the default case).
+
Limits:
n/a
+
Purpose:
LC state when CDS is restored
+
Description:
What operating state LC should initialize to after successfully restoring information from the CDS after a processor or application reset. This is only used when LC_SAVE_TO_CDS is set to TRUE, and provides a way to override any state LC may have been operating in prior to the reset occurring.
+
Limits:
This parameter must be one of the following: LC_STATE_ACTIVE LC_STATE_PASSIVE LC_STATE_DISABLED LC_STATE_FROM_CDS
+ +

Definition at line 146 of file lc_platform_cfg.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDT_FILENAME   "/cf/apps/lc_def_wdt.tbl"
+
+
+
Purpose:
Watchpoint Definition Table (WDT) filename
+
Description:
Default file to load the watchpoint definition table from during a power-on reset sequence
+
Limits:
This string shouldn't be longer than OS_MAX_PATH_LEN for the target platform in question
+ +

Definition at line 158 of file lc_platform_cfg.h.

+ +
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__platform__cfg_8h_source.html b/docs/users_guide/html/lc__platform__cfg_8h_source.html new file mode 100644 index 0000000..f332a5a --- /dev/null +++ b/docs/users_guide/html/lc__platform__cfg_8h_source.html @@ -0,0 +1,93 @@ + + + + +CFS Limit Checker Application on User's Guide: /mnt/disk2/sstrege/cFE650/build/cpu1/inc/lc_platform_cfg.h Source File + + + + + + +
+

lc_platform_cfg.h

Go to the documentation of this file.
00001 /*************************************************************************
+00002 ** File:
+00003 **   $Id: lc__platform__cfg_8h_source.html 1.1 2017/08/25 14:44:28EDT sstrege Exp  $
+00004 **
+00005 **  Copyright (c) 2007-2014 United States Government as represented by the 
+00006 **  Administrator of the National Aeronautics and Space Administration. 
+00007 **  All Other Rights Reserved.  
+00008 **
+00009 **  This software was created at NASA's Goddard Space Flight Center.
+00010 **  This software is governed by the NASA Open Source Agreement and may be 
+00011 **  used, distributed and modified only pursuant to the terms of that 
+00012 **  agreement.
+00013 **
+00014 ** Purpose: 
+00015 **   CFS Limit Checker (LC) Application Platform Configuration Header File
+00016 **
+00017 ** Notes:
+00018 **
+00019 ** 
+00020 *************************************************************************/
+00021 #ifndef _lc_platform_cfg_
+00022 #define _lc_platform_cfg_
+00023 
+00038 #define LC_APP_NAME                    "LC"
+00039 
+00040 
+00052 #define LC_PIPE_DEPTH                  12
+00053 
+00076 #define LC_MAX_WATCHPOINTS             176
+00077 
+00099 #define LC_MAX_ACTIONPOINTS            176
+00100 
+00113 #define LC_STATE_POWER_ON_RESET        LC_STATE_DISABLED
+00114 
+00128 /* #define LC_SAVE_TO_CDS */
+00129 
+00146 #define LC_STATE_WHEN_CDS_RESTORED     LC_STATE_FROM_CDS
+00147 
+00158 #define LC_WDT_FILENAME                "/cf/apps/lc_def_wdt.tbl"
+00159 
+00170 #define LC_ADT_FILENAME                "/cf/apps/lc_def_adt.tbl"
+00171 
+00183 #define LC_MAX_RPN_EQU_SIZE            20
+00184 
+00203 #define LC_MAX_ACTION_TEXT             32
+00204 
+00215 #define LC_MAX_VALID_ADT_RTSID         0xFFF0
+00216 
+00227 #define LC_FLOAT_TOLERANCE             (1.0e-25)
+00228 
+00242 #define LC_MISSION_REV            0
+00243 
+00244 #endif /*_lc_platform_cfg_*/
+00245 
+00246 /************************/
+00247 /*  End of File Comment */
+00248 /************************/
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__tbl_8h-source.html b/docs/users_guide/html/lc__tbl_8h-source.html deleted file mode 100644 index 4258061..0000000 --- a/docs/users_guide/html/lc__tbl_8h-source.html +++ /dev/null @@ -1,232 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_tbl.h Source File - - - - - - - -

lc_tbl.h

Go to the documentation of this file.
00001 /*************************************************************************
-00002 ** File:
-00003 **   $Id: lc__tbl_8h-source.html 1.1 2015/03/04 16:51:35EST sstrege Exp  $
-00004 **
-00005 **  Copyright © 2007-2014 United States Government as represented by the 
-00006 **  Administrator of the National Aeronautics and Space Administration. 
-00007 **  All Other Rights Reserved.  
-00008 **
-00009 **  This software was created at NASA's Goddard Space Flight Center.
-00010 **  This software is governed by the NASA Open Source Agreement and may be 
-00011 **  used, distributed and modified only pursuant to the terms of that 
-00012 **  agreement.
-00013 **
-00014 ** Purpose: 
-00015 **   Specification for the CFS Limit Checker (LC) table related data 
-00016 **   structures
-00017 **
-00018 ** Notes:
-00019 **   Constants and enumerated types related to these table structures
-00020 **   are defined in lc_tbldefs.h. They are kept separate to allow easy 
-00021 **   integration with ASIST RDL files which can't handle typedef
-00022 **   declarations (see the main comment block in lc_tbldefs.h for more 
-00023 **   info).
-00024 **
-00025 **   $Log: lc__tbl_8h-source.html  $
-00025 **   Revision 1.1 2015/03/04 16:51:35EST sstrege 
-00025 **   Initial revision
-00025 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-00026 **   Revision 1.3 2015/03/04 16:09:53EST sstrege 
-00027 **   Added copyright information
-00028 **   Revision 1.2 2012/08/01 15:41:30EDT lwalling 
-00029 **   Add STALE counters to watchpoint definition and result tables
-00030 **   Revision 1.1 2012/07/31 13:53:39PDT nschweis 
-00031 **   Initial revision
-00032 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj
-00033 **   Revision 1.5 2010/02/19 17:44:15EST lwalling 
-00034 **   Change state events limits to individual limits for Passive AP, FailToPass and PassToFail
-00035 **   Revision 1.4 2009/12/28 14:50:53EST lwalling 
-00036 **   Add event limiter to a/p def table, add event counter to a/p results table
-00037 **   Revision 1.3 2009/04/18 14:50:45EDT dkobe 
-00038 **   Cleaned up comments for users guide generation
-00039 **   Revision 1.2 2009/01/15 15:36:17EST dahardis 
-00040 **   Unit test fixes
-00041 **   Revision 1.1 2008/12/10 10:57:04EST dahardis 
-00042 **   Initial revision
-00043 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj
-00044 ** 
-00045 *************************************************************************/
-00046 #ifndef _lc_tbl_
-00047 #define _lc_tbl_
-00048 
-00049 /*************************************************************************
-00050 ** Includes
-00051 *************************************************************************/
-00052 #include "cfe.h"
-00053 #include "lc_platform_cfg.h"
-00054 #include "lc_tbldefs.h"
-00055 
-00056 /*************************************************************************
-00057 ** Type Definitions
-00058 *************************************************************************/
-00059 /*
-00060 ** We need to know if we are being compiled for a big or little endian
-00061 ** target to layout these structures correctly. These compiler switches
-00062 ** are defined in the OSAL header common_types.h and assume the processor
-00063 ** family has been defined properly in the make file.
-00064 */
-00065 #ifdef _STRUCT_HIGH_BIT_FIRST_
-00066 
-00070     typedef struct {
-00071         int8    Bits31to24;
-00072         int8    Bits23to16;
-00073         int8    Bits15to8;
-00074         int8    Signed8;
-00075 
-00076     } LC_Signed8in32_t;
-00077 
-00081     typedef struct {
-00082         uint8   Bits31to24;
-00083         uint8   Bits23to16;
-00084         uint8   Bits15to8;
-00085         uint8   Unsigned8;
-00086 
-00087     } LC_Unsigned8in32_t;
-00088 
-00092     typedef struct {
-00093         int16   Bits31to16;
-00094         int16   Signed16;
-00095 
-00096     } LC_Signed16in32_t;
-00097  
-00101     typedef struct {
-00102         uint16  Bits31to16;
-00103         uint16  Unsigned16;
-00104 
-00105     } LC_Unsigned16in32_t;
-00106     
-00107 #endif /* _STRUCT_HIGH_BIT_FIRST_ */
-00108 
-00109 #ifdef _STRUCT_LOW_BIT_FIRST_
-00110 
-00114     typedef struct {
-00115         int8    Signed8;
-00116         int8    Bits15to8;
-00117         int8    Bits23to16;
-00118         int8    Bits31to24;
-00119 
-00120     } LC_Signed8in32_t;
-00121 
-00125     typedef struct {
-00126         uint8   Unsigned8;
-00127         uint8   Bits15to8;
-00128         uint8   Bits23to16;
-00129         uint8   Bits31to24;
-00130 
-00131     } LC_Unsigned8in32_t;
-00132 
-00136     typedef struct {
-00137         int16   Signed16;
-00138         int16   Bits31to16;
-00139 
-00140     } LC_Signed16in32_t;
-00141 
-00145     typedef struct {
-00146         uint16  Unsigned16;
-00147         uint16  Bits31to16;
-00148 
-00149     } LC_Unsigned16in32_t;
-00150 
-00151 #endif /* _STRUCT_LOW_BIT_FIRST_ */
-00152 
-00160 typedef union {
-00161     LC_Signed8in32_t      Signed8in32;
-00162     LC_Unsigned8in32_t    Unsigned8in32;
-00163     
-00164     LC_Signed16in32_t     Signed16in32;
-00165     LC_Unsigned16in32_t   Unsigned16in32;
-00166     
-00167     int32                 Signed32;
-00168     uint32                Unsigned32;
-00169     float                 Float32;
-00170     
-00171 } LC_MultiType_t;
-00172 
-00176 typedef struct {
-00177     uint8           DataType;                 
-00178     uint8           OperatorID;               
-00179     uint16          MessageID;                
-00181     uint32          WatchpointOffset;         
-00184     uint32          BitMask;                  
-00186     LC_MultiType_t  ComparisonValue;          
-00188     uint32          ResultAgeWhenStale;       
-00191     uint32          CustomFuncArgument;       
-00194 } LC_WDTEntry_t;
-00195 
-00199 typedef struct {
-00200     uint8           DefaultState;             
-00202     uint8           MaxPassiveEvents;         
-00204     uint8           MaxPassFailEvents;        
-00206     uint8           MaxFailPassEvents;        
-00208     uint16          RTSId;                    
-00209     uint16          MaxFailsBeforeRTS;        
-00212     uint16          RPNEquation [LC_MAX_RPN_EQU_SIZE];  
-00216     uint16          EventType;                
-00220     uint16          EventID;                  
-00223     char            EventText[LC_MAX_ACTION_TEXT];      
-00225 } LC_ADTEntry_t;
-00226 
-00230 typedef struct
-00231 {
-00232     uint32               Value;            
-00234     CFE_TIME_SysTime_t   Timestamp;        
-00236 } LC_WRTTransition_t;
-00237 
-00241 typedef struct {
-00242     uint8                WatchResult;             
-00244     uint8                Padding[3];
-00245     
-00246     uint32               CountdownToStale;        
-00249     uint32               EvaluationCount;         
-00251     uint32               FalseToTrueCount;        
-00253     uint32               ConsecutiveTrueCount;    
-00255     uint32               CumulativeTrueCount;     
-00257     LC_WRTTransition_t   LastFalseToTrue;         
-00258     LC_WRTTransition_t   LastTrueToFalse;         
-00260 } LC_WRTEntry_t;
-00261 
-00265 typedef struct {
-00266     uint8                ActionResult;            
-00268     uint8                CurrentState;            
-00270     uint16               Padding;
-00271     
-00272     uint32               PassiveAPCount;          
-00274     uint32               FailToPassCount;         
-00276     uint32               PassToFailCount;         
-00278     uint32               ConsecutiveFailCount;    
-00280     uint32               CumulativeFailCount;     
-00282     uint32               CumulativeRTSExecCount;  
-00284 } LC_ARTEntry_t;
-00285 
-00286 #endif /*_lc_tbl_*/
-00287 
-00288 /************************/
-00289 /*  End of File Comment */
-00290 /************************/
-

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/lc__tbl_8h.html b/docs/users_guide/html/lc__tbl_8h.html index 6978d85..1151774 100644 --- a/docs/users_guide/html/lc__tbl_8h.html +++ b/docs/users_guide/html/lc__tbl_8h.html @@ -1,54 +1,55 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_tbl.h File Reference - - - - - - - -

lc_tbl.h File Reference

#include "cfe.h"
-#include "lc_platform_cfg.h"
-#include "lc_tbldefs.h"
- -

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - -

Data Structures

union  LC_MultiType_t
 Watchpoint Definition Table (WDT) MultiType Union This union is used to set and extract the comparison value in each WDT entry since it needs to fill a 32 bit fixed width field. A conditional compile switch gets the endianess right. More...
struct  LC_WDTEntry_t
 Watchpoint Definition Table (WDT) Entry. More...
struct  LC_ADTEntry_t
 Actionpoint Definition Table (ADT) Entry. More...
struct  LC_WRTTransition_t
 Watchpoint Transition Structure. More...
struct  LC_WRTEntry_t
 Watchpoint Results Table (WRT) Entry. More...
struct  LC_ARTEntry_t
 Actionpoint Results Table (ART) Entry. More...
-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_tbl.h File Reference + + + + + + +
+

lc_tbl.h File Reference

#include "cfe.h"
+#include "lc_platform_cfg.h"
+#include "lc_tbldefs.h"
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + +

Data Structures

union  LC_MultiType_t
struct  LC_WDTEntry_t
 Watchpoint Definition Table (WDT) Entry. More...
struct  LC_ADTEntry_t
 Actionpoint Definition Table (ADT) Entry. More...
struct  LC_WRTTransition_t
 Watchpoint Transition Structure. More...
struct  LC_WRTEntry_t
 Watchpoint Results Table (WRT) Entry. More...
struct  LC_ARTEntry_t
 Actionpoint Results Table (ART) Entry. More...
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__tbl_8h_source.html b/docs/users_guide/html/lc__tbl_8h_source.html new file mode 100644 index 0000000..fc84e37 --- /dev/null +++ b/docs/users_guide/html/lc__tbl_8h_source.html @@ -0,0 +1,153 @@ + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_tbl.h Source File + + + + + + +
+

lc_tbl.h

Go to the documentation of this file.
00001 /*************************************************************************
+00002 ** File:
+00003 **   $Id: lc__tbl_8h_source.html 1.1 2017/08/25 14:44:29EDT sstrege Exp  $
+00004 **
+00005 **  Copyright (c) 2007-2014 United States Government as represented by the 
+00006 **  Administrator of the National Aeronautics and Space Administration. 
+00007 **  All Other Rights Reserved.  
+00008 **
+00009 **  This software was created at NASA's Goddard Space Flight Center.
+00010 **  This software is governed by the NASA Open Source Agreement and may be 
+00011 **  used, distributed and modified only pursuant to the terms of that 
+00012 **  agreement.
+00013 **
+00014 ** Purpose: 
+00015 **   Specification for the CFS Limit Checker (LC) table related data 
+00016 **   structures
+00017 **
+00018 ** Notes:
+00019 **   Constants and enumerated types related to these table structures
+00020 **   are defined in lc_tbldefs.h. They are kept separate to allow easy 
+00021 **   integration with ASIST RDL files which can't handle typedef
+00022 **   declarations (see the main comment block in lc_tbldefs.h for more 
+00023 **   info).
+00024 **
+00025 ** 
+00026 *************************************************************************/
+00027 #ifndef _lc_tbl_
+00028 #define _lc_tbl_
+00029 
+00030 /*************************************************************************
+00031 ** Includes
+00032 *************************************************************************/
+00033 #include "cfe.h"
+00034 #include "lc_platform_cfg.h"
+00035 #include "lc_tbldefs.h"
+00036 
+00037 /*************************************************************************
+00038 ** Type Definitions
+00039 *************************************************************************/
+00040 
+00048 typedef union
+00049 {
+00050    uint32   Unsigned32;
+00051    int32    Signed32;
+00052    float    Float32;
+00053    uint16   Unsigned16;
+00054    int16    Signed16;
+00055    uint8    Unsigned8;
+00056    int8     Signed8;
+00057    uint8    RawByte[4];
+00058 } LC_MultiType_t;
+00059 
+00063 typedef struct {
+00064     uint8           DataType;                 
+00065     uint8           OperatorID;               
+00066     uint16          MessageID;                
+00068     uint32          WatchpointOffset;         
+00071     uint32          BitMask;                  
+00073     LC_MultiType_t  ComparisonValue;          
+00075     uint32          ResultAgeWhenStale;       
+00078     uint32          CustomFuncArgument;       
+00081 } LC_WDTEntry_t;
+00082 
+00086 typedef struct {
+00087     uint8           DefaultState;             
+00089     uint8           MaxPassiveEvents;         
+00091     uint8           MaxPassFailEvents;        
+00093     uint8           MaxFailPassEvents;        
+00095     uint16          RTSId;                    
+00096     uint16          MaxFailsBeforeRTS;        
+00099     uint16          RPNEquation [LC_MAX_RPN_EQU_SIZE];  
+00103     uint16          EventType;                
+00107     uint16          EventID;                  
+00110     char            EventText[LC_MAX_ACTION_TEXT];      
+00112 } LC_ADTEntry_t;
+00113 
+00117 typedef struct
+00118 {
+00119     uint32               Value;            
+00121     uint8                DataType;         
+00123     uint8                Padding[3];
+00124 
+00125     CFE_TIME_SysTime_t   Timestamp;        
+00127 } LC_WRTTransition_t;
+00128 
+00132 typedef struct {
+00133     uint8                WatchResult;             
+00135     uint8                Padding[3];
+00136     
+00137     uint32               CountdownToStale;        
+00140     uint32               EvaluationCount;         
+00142     uint32               FalseToTrueCount;        
+00144     uint32               ConsecutiveTrueCount;    
+00146     uint32               CumulativeTrueCount;     
+00148     LC_WRTTransition_t   LastFalseToTrue;         
+00149     LC_WRTTransition_t   LastTrueToFalse;         
+00151 } LC_WRTEntry_t;
+00152 
+00156 typedef struct {
+00157     uint8                ActionResult;            
+00159     uint8                CurrentState;            
+00161     uint16               Padding;
+00162     
+00163     uint32               PassiveAPCount;          
+00165     uint32               FailToPassCount;         
+00167     uint32               PassToFailCount;         
+00169     uint32               ConsecutiveFailCount;    
+00171     uint32               CumulativeFailCount;     
+00173     uint32               CumulativeRTSExecCount;  
+00175     uint32               CumulativeEventMsgsSent; 
+00176 } LC_ARTEntry_t;
+00177 
+00178 #endif /*_lc_tbl_*/
+00179 
+00180 /************************/
+00181 /*  End of File Comment */
+00182 /************************/
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__tbldefs_8h-source.html b/docs/users_guide/html/lc__tbldefs_8h-source.html deleted file mode 100644 index 84820ec..0000000 --- a/docs/users_guide/html/lc__tbldefs_8h-source.html +++ /dev/null @@ -1,143 +0,0 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_tbldefs.h Source File - - - - - - - -

lc_tbldefs.h

Go to the documentation of this file.
00001 /*************************************************************************
-00002 ** File:
-00003 **   $Id: lc__tbldefs_8h-source.html 1.1 2015/03/04 16:51:36EST sstrege Exp  $
-00004 **
-00005 **  Copyright © 2007-2014 United States Government as represented by the 
-00006 **  Administrator of the National Aeronautics and Space Administration. 
-00007 **  All Other Rights Reserved.  
-00008 **
-00009 **  This software was created at NASA's Goddard Space Flight Center.
-00010 **  This software is governed by the NASA Open Source Agreement and may be 
-00011 **  used, distributed and modified only pursuant to the terms of that 
-00012 **  agreement.
-00013 **
-00014 ** Purpose: 
-00015 **   Specification for the CFS Limit Checker (LC) table related 
-00016 **   constant definitions.
-00017 **
-00018 ** Notes:
-00019 **   These Macro definitions have been put in this file (instead of 
-00020 **   lc_tbl.h) so this file can be included directly into ASIST build 
-00021 **   test scripts. ASIST RDL files can accept C language #defines but 
-00022 **   can't handle type definitions. As a result: DO NOT PUT ANY
-00023 **   TYPEDEFS OR STRUCTURE DEFINITIONS IN THIS FILE! 
-00024 **   ADD THEM TO lc_tbl.h IF NEEDED! 
-00025 **
-00026 **   $Log: lc__tbldefs_8h-source.html  $
-00026 **   Revision 1.1 2015/03/04 16:51:36EST sstrege 
-00026 **   Initial revision
-00026 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/docs/users_guide/html/project.pj
-00027 **   Revision 1.3 2015/03/04 16:09:55EST sstrege 
-00028 **   Added copyright information
-00029 **   Revision 1.2 2012/08/01 14:19:28EDT lwalling 
-00030 **   Change NOT_MEASURED to STALE
-00031 **   Revision 1.1 2012/07/31 13:53:39PDT nschweis 
-00032 **   Initial revision
-00033 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj
-00034 **   Revision 1.5 2010/03/08 10:36:31EST lwalling 
-00035 **   Move saved, not saved state definitions to common header file
-00036 **   Revision 1.4 2009/01/15 15:36:19EST dahardis 
-00037 **   Unit test fixes
-00038 **   Revision 1.3 2008/12/10 10:59:29EST dahardis 
-00039 **   Moved data type declarations to new file lc_tbl.h
-00040 **   so this file can be included in ASIST RDL files.
-00041 **   Revision 1.2 2008/12/03 13:59:42EST dahardis 
-00042 **   Corrections from peer code review
-00043 **   Revision 1.1 2008/10/29 14:19:41EDT dahardison 
-00044 **   Initial revision
-00045 **   Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj
-00046 ** 
-00047 *************************************************************************/
-00048 #ifndef _lc_tbldefs_
-00049 #define _lc_tbldefs_
-00050 
-00051 /************************************************************************
-00052 ** Macro Definitions
-00053 *************************************************************************/
-00057 #define LC_CDS_SAVED            0xF0F0
-00058 #define LC_CDS_NOT_SAVED        0x0F0F
-00059 
-00064 #define LC_WATCH_NOT_USED       0xFF    
-00065 #define LC_DATA_BYTE            1       
-00066 #define LC_DATA_UBYTE           2       
-00068 #define LC_DATA_WORD_BE         3       
-00071 #define LC_DATA_WORD_LE         4       
-00074 #define LC_DATA_UWORD_BE        5       
-00077 #define LC_DATA_UWORD_LE        6       
-00080 #define LC_DATA_DWORD_BE        7       
-00083 #define LC_DATA_DWORD_LE        8       
-00086 #define LC_DATA_UDWORD_BE       9       
-00089 #define LC_DATA_UDWORD_LE      10       
-00092 #define LC_DATA_FLOAT_BE       11       
-00096 #define LC_DATA_FLOAT_LE       12       
-00104 #define LC_NO_OPER           0xFF    
-00105 #define LC_OPER_LT           1       
-00106 #define LC_OPER_LE           2       
-00107 #define LC_OPER_NE           3       
-00108 #define LC_OPER_EQ           4       
-00109 #define LC_OPER_GE           5       
-00110 #define LC_OPER_GT           6       
-00111 #define LC_OPER_CUSTOM       7       
-00117 #define LC_NO_BITMASK        0xFFFFFFFF   
-00123 #define LC_RPN_AND                 0xFFF1
-00124 #define LC_RPN_OR                  0xFFF2
-00125 #define LC_RPN_XOR                 0xFFF3
-00126 #define LC_RPN_NOT                 0xFFF4
-00127 #define LC_RPN_EQUAL               0xFFF5
-00128 
-00133 #define LC_WATCH_STALE             0xFF
-00134 #define LC_WATCH_FALSE             0      /* This needs to be zero for 
-00135                                                   correct RPN evalution  */
-00136 #define LC_WATCH_TRUE              1      /* This needs to be one for 
-00137                                                   correct RPN evaluation */
-00138 #define LC_WATCH_ERROR             2
-00139 
-00144 #define LC_ACTION_STALE            0xFF
-00145 #define LC_ACTION_PASS             0
-00146 #define LC_ACTION_FAIL             1
-00147 #define LC_ACTION_ERROR            2
-00148 
-00153 #define LC_WDTVAL_NO_ERR           0    
-00154 #define LC_WDTVAL_ERR_DATATYPE     1    
-00155 #define LC_WDTVAL_ERR_OPER         2    
-00156 #define LC_WDTVAL_ERR_MID          3    
-00157 #define LC_WDTVAL_ERR_FPNAN        4    
-00158 #define LC_WDTVAL_ERR_FPINF        5    
-00164 #define LC_ADTVAL_NO_ERR           0    
-00165 #define LC_ADTVAL_ERR_DEFSTATE     1    
-00166 #define LC_ADTVAL_ERR_RTSID        2    
-00167 #define LC_ADTVAL_ERR_FAILCNT      3    
-00168 #define LC_ADTVAL_ERR_EVTTYPE      4    
-00169 #define LC_ADTVAL_ERR_RPN          5    
-00172 #endif /*_lc_tbldefs_*/
-00173 
-00174 /************************/
-00175 /*  End of File Comment */
-00176 /************************/
-

Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - diff --git a/docs/users_guide/html/lc__tbldefs_8h.html b/docs/users_guide/html/lc__tbldefs_8h.html index 9d5c9b7..0880861 100644 --- a/docs/users_guide/html/lc__tbldefs_8h.html +++ b/docs/users_guide/html/lc__tbldefs_8h.html @@ -1,1075 +1,955 @@ - - -CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_tbldefs.h File Reference - - - - - - - -

lc_tbldefs.h File Reference

-

-Go to the source code of this file. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

LC CDS Saved on Exit Identifiers

#define LC_CDS_SAVED   0xF0F0
#define LC_CDS_NOT_SAVED   0x0F0F

Watchpoint Definition Table (WDT) DataType Enumerated Types

#define LC_WATCH_NOT_USED   0xFF
 Use for empty entries.
#define LC_DATA_BYTE   1
 8 bit signed byte
#define LC_DATA_UBYTE   2
 8 bit unsigned byte
#define LC_DATA_WORD_BE   3
 16 bit signed word big endian byte order
#define LC_DATA_WORD_LE   4
 16 bit signed word little endian byte order
#define LC_DATA_UWORD_BE   5
 16 bit unsigned word big endian byte order
#define LC_DATA_UWORD_LE   6
 16 bit unsigned word little endian byte order
#define LC_DATA_DWORD_BE   7
 32 bit signed double word big endian byte order
#define LC_DATA_DWORD_LE   8
 32 bit signed double word little endian byte order
#define LC_DATA_UDWORD_BE   9
 32 bit unsigned double word big endian byte order
#define LC_DATA_UDWORD_LE   10
 32 bit unsigned double word little endian byte order
#define LC_DATA_FLOAT_BE   11
 32 bit single precision IEEE-754 floating point number, big endian byte order
#define LC_DATA_FLOAT_LE   12
 32 bit single precision IEEE-754 floating point number, little endian byte order

Watchpoint Definition Table (WDT) OperatorID Enumerated Types

#define LC_NO_OPER   0xFF
 Use for empty entries.
#define LC_OPER_LT   1
 Less Than (<).
#define LC_OPER_LE   2
 Less Than or Equal To (<=).
#define LC_OPER_NE   3
 Not Equal (!=).
#define LC_OPER_EQ   4
 Equal (==).
#define LC_OPER_GE   5
 Greater Than or Equal To (>=).
#define LC_OPER_GT   6
 Greater Than (>).
#define LC_OPER_CUSTOM   7
 Use custom function.

Watchpoint Definition Table (WDT) BitMask Enumerated Types

#define LC_NO_BITMASK   0xFFFFFFFF
 Use for no masking.

Actionpoint Definition Table (ADT) Reverse Polish Operators

#define LC_RPN_AND   0xFFF1
#define LC_RPN_OR   0xFFF2
#define LC_RPN_XOR   0xFFF3
#define LC_RPN_NOT   0xFFF4
#define LC_RPN_EQUAL   0xFFF5

Watchpoint Results Table (WRT) WatchResult Enumerated Types

#define LC_WATCH_STALE   0xFF
#define LC_WATCH_FALSE   0
#define LC_WATCH_TRUE   1
#define LC_WATCH_ERROR   2

Actionpoint Results Table (ART) ActionResult Enumerated Types

#define LC_ACTION_STALE   0xFF
#define LC_ACTION_PASS   0
#define LC_ACTION_FAIL   1
#define LC_ACTION_ERROR   2

Watchpoint Definition Table (WDT) Validation Error Enumerated Types

#define LC_WDTVAL_NO_ERR   0
 No error.
#define LC_WDTVAL_ERR_DATATYPE   1
 Invalid DataType.
#define LC_WDTVAL_ERR_OPER   2
 Invalid OperatorID.
#define LC_WDTVAL_ERR_MID   3
 Invalid MessageID.
#define LC_WDTVAL_ERR_FPNAN   4
 ComparisonValue is NAN float.
#define LC_WDTVAL_ERR_FPINF   5
 ComparisonValue is infinite float.

Actionpoint Definition Table (ADT) Validation Error Enumerated Types

#define LC_ADTVAL_NO_ERR   0
 No error.
#define LC_ADTVAL_ERR_DEFSTATE   1
 Invalid DefaultState.
#define LC_ADTVAL_ERR_RTSID   2
 Invalid RTSId.
#define LC_ADTVAL_ERR_FAILCNT   3
 MaxFailsBeforeRTS is zero.
#define LC_ADTVAL_ERR_EVTTYPE   4
 Invalid EventType.
#define LC_ADTVAL_ERR_RPN   5
 Invalid Reverse Polish Expression.
-


Define Documentation

- -
-
- - - - -
#define LC_ACTION_ERROR   2
-
-
- -

- -

-Definition at line 147 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_ACTION_FAIL   1
-
-
- -

- -

-Definition at line 146 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_ACTION_PASS   0
-
-
- -

- -

-Definition at line 145 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_ACTION_STALE   0xFF
-
-
- -

- -

-Definition at line 144 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_ADTVAL_ERR_DEFSTATE   1
-
-
- -

-Invalid DefaultState. -

- -

-Definition at line 165 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_ADTVAL_ERR_EVTTYPE   4
-
-
- -

-Invalid EventType. -

- -

-Definition at line 168 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_ADTVAL_ERR_FAILCNT   3
-
-
- -

-MaxFailsBeforeRTS is zero. -

- -

-Definition at line 167 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_ADTVAL_ERR_RPN   5
-
-
- -

-Invalid Reverse Polish Expression. -

- -

-Definition at line 169 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_ADTVAL_ERR_RTSID   2
-
-
- -

-Invalid RTSId. -

- -

-Definition at line 166 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_ADTVAL_NO_ERR   0
-
-
- -

-No error. -

- -

-Definition at line 164 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_CDS_NOT_SAVED   0x0F0F
-
-
- -

- -

-Definition at line 58 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_CDS_SAVED   0xF0F0
-
-
- -

- -

-Definition at line 57 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_BYTE   1
-
-
- -

-8 bit signed byte -

- -

-Definition at line 65 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_DWORD_BE   7
-
-
- -

-32 bit signed double word big endian byte order -

- -

-Definition at line 80 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_DWORD_LE   8
-
-
- -

-32 bit signed double word little endian byte order -

- -

-Definition at line 83 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_FLOAT_BE   11
-
-
- -

-32 bit single precision IEEE-754 floating point number, big endian byte order -

- -

-Definition at line 92 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_FLOAT_LE   12
-
-
- -

-32 bit single precision IEEE-754 floating point number, little endian byte order -

- -

-Definition at line 96 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_UBYTE   2
-
-
- -

-8 bit unsigned byte -

- -

-Definition at line 66 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_UDWORD_BE   9
-
-
- -

-32 bit unsigned double word big endian byte order -

- -

-Definition at line 86 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_UDWORD_LE   10
-
-
- -

-32 bit unsigned double word little endian byte order -

- -

-Definition at line 89 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_UWORD_BE   5
-
-
- -

-16 bit unsigned word big endian byte order -

- -

-Definition at line 74 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_UWORD_LE   6
-
-
- -

-16 bit unsigned word little endian byte order -

- -

-Definition at line 77 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_WORD_BE   3
-
-
- -

-16 bit signed word big endian byte order -

- -

-Definition at line 68 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_DATA_WORD_LE   4
-
-
- -

-16 bit signed word little endian byte order -

- -

-Definition at line 71 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_NO_BITMASK   0xFFFFFFFF
-
-
- -

-Use for no masking. -

- -

-Definition at line 117 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_NO_OPER   0xFF
-
-
- -

-Use for empty entries. -

- -

-Definition at line 104 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_OPER_CUSTOM   7
-
-
- -

-Use custom function. -

- -

-Definition at line 111 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_OPER_EQ   4
-
-
- -

-Equal (==). -

- -

-Definition at line 108 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_OPER_GE   5
-
-
- -

-Greater Than or Equal To (>=). -

- -

-Definition at line 109 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_OPER_GT   6
-
-
- -

-Greater Than (>). -

- -

-Definition at line 110 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_OPER_LE   2
-
-
- -

-Less Than or Equal To (<=). -

- -

-Definition at line 106 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_OPER_LT   1
-
-
- -

-Less Than (<). -

- -

-Definition at line 105 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_OPER_NE   3
-
-
- -

-Not Equal (!=). -

- -

-Definition at line 107 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_RPN_AND   0xFFF1
-
-
- -

- -

-Definition at line 123 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_RPN_EQUAL   0xFFF5
-
-
- -

- -

-Definition at line 127 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_RPN_NOT   0xFFF4
-
-
- -

- -

-Definition at line 126 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_RPN_OR   0xFFF2
-
-
- -

- -

-Definition at line 124 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_RPN_XOR   0xFFF3
-
-
- -

- -

-Definition at line 125 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WATCH_ERROR   2
-
-
- -

- -

-Definition at line 138 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WATCH_FALSE   0
-
-
- -

- -

-Definition at line 134 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WATCH_NOT_USED   0xFF
-
-
- -

-Use for empty entries. -

- -

-Definition at line 64 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WATCH_STALE   0xFF
-
-
- -

- -

-Definition at line 133 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WATCH_TRUE   1
-
-
- -

- -

-Definition at line 136 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WDTVAL_ERR_DATATYPE   1
-
-
- -

-Invalid DataType. -

- -

-Definition at line 154 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WDTVAL_ERR_FPINF   5
-
-
- -

-ComparisonValue is infinite float. -

- -

-Definition at line 158 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WDTVAL_ERR_FPNAN   4
-
-
- -

-ComparisonValue is NAN float. -

- -

-Definition at line 157 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WDTVAL_ERR_MID   3
-
-
- -

-Invalid MessageID. -

- -

-Definition at line 156 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WDTVAL_ERR_OPER   2
-
-
- -

-Invalid OperatorID. -

- -

-Definition at line 155 of file lc_tbldefs.h. -

-

- -

-
- - - - -
#define LC_WDTVAL_NO_ERR   0
-
-
- -

-No error. -

- -

-Definition at line 153 of file lc_tbldefs.h. -

-

-


Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_tbldefs.h File Reference + + + + + + +
+

lc_tbldefs.h File Reference

+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

LC CDS Saved on Exit Identifiers

+

#define LC_CDS_SAVED   0xF0F0
#define LC_CDS_NOT_SAVED   0x0F0F
Watchpoint Definition Table (WDT) DataType Enumerated Types

+

#define LC_WATCH_NOT_USED   0xFF
 Use for empty entries.
#define LC_DATA_BYTE   1
 8 bit signed byte
#define LC_DATA_UBYTE   2
 8 bit unsigned byte
#define LC_DATA_WORD_BE   3
 16 bit signed word big endian byte order
#define LC_DATA_WORD_LE   4
 16 bit signed word little endian byte order
#define LC_DATA_UWORD_BE   5
 16 bit unsigned word big endian byte order
#define LC_DATA_UWORD_LE   6
 16 bit unsigned word little endian byte order
#define LC_DATA_DWORD_BE   7
 32 bit signed double word big endian byte order
#define LC_DATA_DWORD_LE   8
 32 bit signed double word little endian byte order
#define LC_DATA_UDWORD_BE   9
 32 bit unsigned double word big endian byte order
#define LC_DATA_UDWORD_LE   10
 32 bit unsigned double word little endian byte order
#define LC_DATA_FLOAT_BE   11
 32 bit single precision IEEE-754 floating point number, big endian byte order
#define LC_DATA_FLOAT_LE   12
 32 bit single precision IEEE-754 floating point number, little endian byte order
Watchpoint Definition Table (WDT) OperatorID Enumerated Types

+

#define LC_NO_OPER   0xFF
 Use for empty entries.
#define LC_OPER_LT   1
 Less Than (<).
#define LC_OPER_LE   2
 Less Than or Equal To (<=).
#define LC_OPER_NE   3
 Not Equal (!=).
#define LC_OPER_EQ   4
 Equal (==).
#define LC_OPER_GE   5
 Greater Than or Equal To (>=).
#define LC_OPER_GT   6
 Greater Than (>).
#define LC_OPER_CUSTOM   7
 Use custom function.
Watchpoint Definition Table (WDT) BitMask Enumerated Types

+

#define LC_NO_BITMASK   0xFFFFFFFF
 Use for no masking.
Actionpoint Definition Table (ADT) Reverse Polish Operators

+

#define LC_RPN_AND   0xFFF1
#define LC_RPN_OR   0xFFF2
#define LC_RPN_XOR   0xFFF3
#define LC_RPN_NOT   0xFFF4
#define LC_RPN_EQUAL   0xFFF5
Watchpoint Results Table (WRT) WatchResult Enumerated Types

+

#define LC_WATCH_STALE   0xFF
#define LC_WATCH_FALSE   0
#define LC_WATCH_TRUE   1
#define LC_WATCH_ERROR   2
Actionpoint Results Table (ART) ActionResult Enumerated Types

+

#define LC_ACTION_STALE   0xFF
#define LC_ACTION_PASS   0
#define LC_ACTION_FAIL   1
#define LC_ACTION_ERROR   2
Watchpoint Definition Table (WDT) Validation Error Enumerated Types

+

#define LC_WDTVAL_NO_ERR   0
 No error.
#define LC_WDTVAL_ERR_DATATYPE   1
 Invalid DataType.
#define LC_WDTVAL_ERR_OPER   2
 Invalid OperatorID.
#define LC_WDTVAL_ERR_MID   3
 Invalid MessageID.
#define LC_WDTVAL_ERR_FPNAN   4
 ComparisonValue is NAN float.
#define LC_WDTVAL_ERR_FPINF   5
 ComparisonValue is infinite float.
Actionpoint Definition Table (ADT) Validation Error Enumerated Types

+

#define LC_ADTVAL_NO_ERR   0
 No error.
#define LC_ADTVAL_ERR_DEFSTATE   1
 Invalid DefaultState.
#define LC_ADTVAL_ERR_RTSID   2
 Invalid RTSId.
#define LC_ADTVAL_ERR_FAILCNT   3
 MaxFailsBeforeRTS is zero.
#define LC_ADTVAL_ERR_EVTTYPE   4
 Invalid EventType.
#define LC_ADTVAL_ERR_RPN   5
 Invalid Reverse Polish Expression.
+

Define Documentation

+ +
+
+ + + + +
#define LC_ACTION_ERROR   2
+
+
+ +

Definition at line 127 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_ACTION_FAIL   1
+
+
+ +

Definition at line 126 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_ACTION_PASS   0
+
+
+ +

Definition at line 125 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_ACTION_STALE   0xFF
+
+
+ +

Definition at line 124 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADTVAL_ERR_DEFSTATE   1
+
+
+ +

Invalid DefaultState.

+ +

Definition at line 145 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADTVAL_ERR_EVTTYPE   4
+
+
+ +

Invalid EventType.

+ +

Definition at line 148 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADTVAL_ERR_FAILCNT   3
+
+
+ +

MaxFailsBeforeRTS is zero.

+ +

Definition at line 147 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADTVAL_ERR_RPN   5
+
+
+ +

Invalid Reverse Polish Expression.

+ +

Definition at line 149 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADTVAL_ERR_RTSID   2
+
+
+ +

Invalid RTSId.

+ +

Definition at line 146 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_ADTVAL_NO_ERR   0
+
+
+ +

No error.

+ +

Definition at line 144 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_CDS_NOT_SAVED   0x0F0F
+
+
+ +

Definition at line 38 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_CDS_SAVED   0xF0F0
+
+
+ +

Definition at line 37 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_BYTE   1
+
+
+ +

8 bit signed byte

+ +

Definition at line 45 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_DWORD_BE   7
+
+
+ +

32 bit signed double word big endian byte order

+ +

Definition at line 60 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_DWORD_LE   8
+
+
+ +

32 bit signed double word little endian byte order

+ +

Definition at line 63 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_FLOAT_BE   11
+
+
+ +

32 bit single precision IEEE-754 floating point number, big endian byte order

+ +

Definition at line 72 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_FLOAT_LE   12
+
+
+ +

32 bit single precision IEEE-754 floating point number, little endian byte order

+ +

Definition at line 76 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_UBYTE   2
+
+
+ +

8 bit unsigned byte

+ +

Definition at line 46 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_UDWORD_BE   9
+
+
+ +

32 bit unsigned double word big endian byte order

+ +

Definition at line 66 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_UDWORD_LE   10
+
+
+ +

32 bit unsigned double word little endian byte order

+ +

Definition at line 69 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_UWORD_BE   5
+
+
+ +

16 bit unsigned word big endian byte order

+ +

Definition at line 54 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_UWORD_LE   6
+
+
+ +

16 bit unsigned word little endian byte order

+ +

Definition at line 57 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_WORD_BE   3
+
+
+ +

16 bit signed word big endian byte order

+ +

Definition at line 48 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_DATA_WORD_LE   4
+
+
+ +

16 bit signed word little endian byte order

+ +

Definition at line 51 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_NO_BITMASK   0xFFFFFFFF
+
+
+ +

Use for no masking.

+ +

Definition at line 97 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_NO_OPER   0xFF
+
+
+ +

Use for empty entries.

+ +

Definition at line 84 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_OPER_CUSTOM   7
+
+
+ +

Use custom function.

+ +

Definition at line 91 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_OPER_EQ   4
+
+
+ +

Equal (==).

+ +

Definition at line 88 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_OPER_GE   5
+
+
+ +

Greater Than or Equal To (>=).

+ +

Definition at line 89 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_OPER_GT   6
+
+
+ +

Greater Than (>).

+ +

Definition at line 90 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_OPER_LE   2
+
+
+ +

Less Than or Equal To (<=).

+ +

Definition at line 86 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_OPER_LT   1
+
+
+ +

Less Than (<).

+ +

Definition at line 85 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_OPER_NE   3
+
+
+ +

Not Equal (!=).

+ +

Definition at line 87 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_RPN_AND   0xFFF1
+
+
+ +

Definition at line 103 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_RPN_EQUAL   0xFFF5
+
+
+ +

Definition at line 107 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_RPN_NOT   0xFFF4
+
+
+ +

Definition at line 106 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_RPN_OR   0xFFF2
+
+
+ +

Definition at line 104 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_RPN_XOR   0xFFF3
+
+
+ +

Definition at line 105 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WATCH_ERROR   2
+
+
+ +

Definition at line 118 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WATCH_FALSE   0
+
+
+ +

Definition at line 114 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WATCH_NOT_USED   0xFF
+
+
+ +

Use for empty entries.

+ +

Definition at line 44 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WATCH_STALE   0xFF
+
+
+ +

Definition at line 113 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WATCH_TRUE   1
+
+
+ +

Definition at line 116 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDTVAL_ERR_DATATYPE   1
+
+
+ +

Invalid DataType.

+ +

Definition at line 134 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDTVAL_ERR_FPINF   5
+
+
+ +

ComparisonValue is infinite float.

+ +

Definition at line 138 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDTVAL_ERR_FPNAN   4
+
+
+ +

ComparisonValue is NAN float.

+ +

Definition at line 137 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDTVAL_ERR_MID   3
+
+
+ +

Invalid MessageID.

+ +

Definition at line 136 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDTVAL_ERR_OPER   2
+
+
+ +

Invalid OperatorID.

+ +

Definition at line 135 of file lc_tbldefs.h.

+ +
+
+ +
+
+ + + + +
#define LC_WDTVAL_NO_ERR   0
+
+
+ +

No error.

+ +

Definition at line 133 of file lc_tbldefs.h.

+ +
+
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/lc__tbldefs_8h_source.html b/docs/users_guide/html/lc__tbldefs_8h_source.html new file mode 100644 index 0000000..72a4745 --- /dev/null +++ b/docs/users_guide/html/lc__tbldefs_8h_source.html @@ -0,0 +1,129 @@ + + + + +CFS Limit Checker Application on User's Guide: lc/fsw/src/lc_tbldefs.h Source File + + + + + + +
+

lc_tbldefs.h

Go to the documentation of this file.
00001 /*************************************************************************
+00002 ** File:
+00003 **   $Id: lc__tbldefs_8h_source.html 1.1 2017/08/25 14:44:29EDT sstrege Exp  $
+00004 **
+00005 **  Copyright (c) 2007-2014 United States Government as represented by the 
+00006 **  Administrator of the National Aeronautics and Space Administration. 
+00007 **  All Other Rights Reserved.  
+00008 **
+00009 **  This software was created at NASA's Goddard Space Flight Center.
+00010 **  This software is governed by the NASA Open Source Agreement and may be 
+00011 **  used, distributed and modified only pursuant to the terms of that 
+00012 **  agreement.
+00013 **
+00014 ** Purpose: 
+00015 **   Specification for the CFS Limit Checker (LC) table related 
+00016 **   constant definitions.
+00017 **
+00018 ** Notes:
+00019 **   These Macro definitions have been put in this file (instead of 
+00020 **   lc_tbl.h) so this file can be included directly into ASIST build 
+00021 **   test scripts. ASIST RDL files can accept C language #defines but 
+00022 **   can't handle type definitions. As a result: DO NOT PUT ANY
+00023 **   TYPEDEFS OR STRUCTURE DEFINITIONS IN THIS FILE! 
+00024 **   ADD THEM TO lc_tbl.h IF NEEDED! 
+00025 **
+00026 ** 
+00027 *************************************************************************/
+00028 #ifndef _lc_tbldefs_
+00029 #define _lc_tbldefs_
+00030 
+00031 /************************************************************************
+00032 ** Macro Definitions
+00033 *************************************************************************/
+00037 #define LC_CDS_SAVED            0xF0F0
+00038 #define LC_CDS_NOT_SAVED        0x0F0F
+00039 
+00044 #define LC_WATCH_NOT_USED       0xFF    
+00045 #define LC_DATA_BYTE            1       
+00046 #define LC_DATA_UBYTE           2       
+00048 #define LC_DATA_WORD_BE         3       
+00051 #define LC_DATA_WORD_LE         4       
+00054 #define LC_DATA_UWORD_BE        5       
+00057 #define LC_DATA_UWORD_LE        6       
+00060 #define LC_DATA_DWORD_BE        7       
+00063 #define LC_DATA_DWORD_LE        8       
+00066 #define LC_DATA_UDWORD_BE       9       
+00069 #define LC_DATA_UDWORD_LE      10       
+00072 #define LC_DATA_FLOAT_BE       11       
+00076 #define LC_DATA_FLOAT_LE       12       
+00084 #define LC_NO_OPER           0xFF    
+00085 #define LC_OPER_LT           1       
+00086 #define LC_OPER_LE           2       
+00087 #define LC_OPER_NE           3       
+00088 #define LC_OPER_EQ           4       
+00089 #define LC_OPER_GE           5       
+00090 #define LC_OPER_GT           6       
+00091 #define LC_OPER_CUSTOM       7       
+00097 #define LC_NO_BITMASK        0xFFFFFFFF   
+00103 #define LC_RPN_AND                 0xFFF1
+00104 #define LC_RPN_OR                  0xFFF2
+00105 #define LC_RPN_XOR                 0xFFF3
+00106 #define LC_RPN_NOT                 0xFFF4
+00107 #define LC_RPN_EQUAL               0xFFF5
+00108 
+00113 #define LC_WATCH_STALE             0xFF
+00114 #define LC_WATCH_FALSE             0      /* This needs to be zero for 
+00115                                                   correct RPN evalution  */
+00116 #define LC_WATCH_TRUE              1      /* This needs to be one for 
+00117                                                   correct RPN evaluation */
+00118 #define LC_WATCH_ERROR             2
+00119 
+00124 #define LC_ACTION_STALE            0xFF
+00125 #define LC_ACTION_PASS             0
+00126 #define LC_ACTION_FAIL             1
+00127 #define LC_ACTION_ERROR            2
+00128 
+00133 #define LC_WDTVAL_NO_ERR           0    
+00134 #define LC_WDTVAL_ERR_DATATYPE     1    
+00135 #define LC_WDTVAL_ERR_OPER         2    
+00136 #define LC_WDTVAL_ERR_MID          3    
+00137 #define LC_WDTVAL_ERR_FPNAN        4    
+00138 #define LC_WDTVAL_ERR_FPINF        5    
+00144 #define LC_ADTVAL_NO_ERR           0    
+00145 #define LC_ADTVAL_ERR_DEFSTATE     1    
+00146 #define LC_ADTVAL_ERR_RTSID        2    
+00147 #define LC_ADTVAL_ERR_FAILCNT      3    
+00148 #define LC_ADTVAL_ERR_EVTTYPE      4    
+00149 #define LC_ADTVAL_ERR_RPN          5    
+00152 #endif /*_lc_tbldefs_*/
+00153 
+00154 /************************/
+00155 /*  End of File Comment */
+00156 /************************/
+
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/pages.html b/docs/users_guide/html/pages.html index 454153a..fa0a1a6 100644 --- a/docs/users_guide/html/pages.html +++ b/docs/users_guide/html/pages.html @@ -1,28 +1,36 @@ - - -CFS Limit Checker Application on User's Guide: Page Index - - - - - -

CFS Limit Checker Application on User's Guide Related Pages

Here is a list of all related documentation pages: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: Page Index + + + + + + +
+

Related Pages

Here is a list of all related documentation pages: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___a_d_t_entry__t.html b/docs/users_guide/html/struct_l_c___a_d_t_entry__t.html index 17ce4dc..49a1094 100644 --- a/docs/users_guide/html/struct_l_c___a_d_t_entry__t.html +++ b/docs/users_guide/html/struct_l_c___a_d_t_entry__t.html @@ -1,275 +1,265 @@ - - -CFS Limit Checker Application on User's Guide: LC_ADTEntry_t Struct Reference - - - - - - -

LC_ADTEntry_t Struct Reference

Actionpoint Definition Table (ADT) Entry. -More... -

-#include <lc_tbl.h> -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Fields

uint8 DefaultState
 Default state for this AP (enumerated) States are defined in lc_msgdefs.h.
uint8 MaxPassiveEvents
 Max number of events before filter
    -
  • RTS not started because AP is passive.
-
uint8 MaxPassFailEvents
 Max number of events before filter
    -
  • AP result transition from pass to fail.
-
uint8 MaxFailPassEvents
 Max number of events before filter
    -
  • AP result transition from fail to pass.
-
uint16 RTSId
 RTS to request if this AP fails.
uint16 MaxFailsBeforeRTS
 How may consecutive failures before an RTS request is issued.
uint16 RPNEquation [LC_MAX_RPN_EQU_SIZE]
 Reverse Polish Equation that specifies when this actionpoint should fail.
uint16 EventType
 Event type used for event msg if AP fails: CFE_EVS_INFORMATION, CFE_EVS_DEBUG, CFE_EVS_ERROR, or CFE_EVS_CRITICAL.
uint16 EventID
 Event ID used for event msg if AP fails See lc_events.h for those already in use.
char EventText [LC_MAX_ACTION_TEXT]
 Text used for the event msg when this AP fails.
-


Detailed Description

-Actionpoint Definition Table (ADT) Entry. -

- -

-Definition at line 199 of file lc_tbl.h.


Field Documentation

- -
- -
- -

-Default state for this AP (enumerated) States are defined in lc_msgdefs.h. -

- -

-Definition at line 200 of file lc_tbl.h. -

-

- -

- -
- -

-Event ID used for event msg if AP fails See lc_events.h for those already in use. -

- -

-Definition at line 220 of file lc_tbl.h. -

-

- -

-
- - - - -
char LC_ADTEntry_t::EventText[LC_MAX_ACTION_TEXT]
-
-
- -

-Text used for the event msg when this AP fails. -

- -

-Definition at line 223 of file lc_tbl.h. -

-

- -

- -
- -

-Event type used for event msg if AP fails: CFE_EVS_INFORMATION, CFE_EVS_DEBUG, CFE_EVS_ERROR, or CFE_EVS_CRITICAL. -

- -

-Definition at line 216 of file lc_tbl.h. -

-

- -

- -
- -

-Max number of events before filter

    -
  • AP result transition from fail to pass.
- -

- -

-Definition at line 206 of file lc_tbl.h. -

-

- -

- -
- -

-How may consecutive failures before an RTS request is issued. -

- -

-Definition at line 209 of file lc_tbl.h. -

-

- -

- -
- -

-Max number of events before filter

    -
  • AP result transition from pass to fail.
- -

- -

-Definition at line 204 of file lc_tbl.h. -

-

- -

- -
- -

-Max number of events before filter

    -
  • RTS not started because AP is passive.
- -

- -

-Definition at line 202 of file lc_tbl.h. -

-

- -

-
- - - - -
uint16 LC_ADTEntry_t::RPNEquation[LC_MAX_RPN_EQU_SIZE]
-
-
- -

-Reverse Polish Equation that specifies when this actionpoint should fail. -

- -

-Definition at line 212 of file lc_tbl.h. -

-

- -

- -
- -

-RTS to request if this AP fails. -

- -

-Definition at line 208 of file lc_tbl.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_ADTEntry_t Struct Reference + + + + + + +
+

LC_ADTEntry_t Struct Reference

+

Actionpoint Definition Table (ADT) Entry. +More...

+ +

#include <lc_tbl.h>

+ + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uint8 DefaultState
 Default state for this AP (enumerated) States are defined in lc_msgdefs.h.
uint8 MaxPassiveEvents
 Max number of events before filter

+
    +
  • RTS not started because AP is passive.
  • +
+
uint8 MaxPassFailEvents
 Max number of events before filter

+
    +
  • AP result transition from pass to fail.
  • +
+
uint8 MaxFailPassEvents
 Max number of events before filter

+
    +
  • AP result transition from fail to pass.
  • +
+
uint16 RTSId
 RTS to request if this AP fails.
uint16 MaxFailsBeforeRTS
 How may consecutive failures before an RTS request is issued.
uint16 RPNEquation [LC_MAX_RPN_EQU_SIZE]
 Reverse Polish Equation that specifies when this actionpoint should fail.
uint16 EventType
 Event type used for event msg if AP fails: CFE_EVS_INFORMATION, CFE_EVS_DEBUG, CFE_EVS_ERROR, or CFE_EVS_CRITICAL.
uint16 EventID
 Event ID used for event msg if AP fails See lc_events.h for those already in use.
char EventText [LC_MAX_ACTION_TEXT]
 Text used for the event msg when this AP fails.
+

Detailed Description

+

Actionpoint Definition Table (ADT) Entry.

+ +

Definition at line 86 of file lc_tbl.h.

+

Field Documentation

+ +
+
+ + + + +
uint8 LC_ADTEntry_t::DefaultState
+
+
+ +

Default state for this AP (enumerated) States are defined in lc_msgdefs.h.

+ +

Definition at line 87 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_ADTEntry_t::EventID
+
+
+ +

Event ID used for event msg if AP fails See lc_events.h for those already in use.

+ +

Definition at line 107 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
char LC_ADTEntry_t::EventText[LC_MAX_ACTION_TEXT]
+
+
+ +

Text used for the event msg when this AP fails.

+ +

Definition at line 110 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_ADTEntry_t::EventType
+
+
+ +

Event type used for event msg if AP fails: CFE_EVS_INFORMATION, CFE_EVS_DEBUG, CFE_EVS_ERROR, or CFE_EVS_CRITICAL.

+ +

Definition at line 103 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Max number of events before filter

+
    +
  • AP result transition from fail to pass.
  • +
+

+ +

Definition at line 93 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

How may consecutive failures before an RTS request is issued.

+ +

Definition at line 96 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Max number of events before filter

+
    +
  • AP result transition from pass to fail.
  • +
+

+ +

Definition at line 91 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Max number of events before filter

+
    +
  • RTS not started because AP is passive.
  • +
+

+ +

Definition at line 89 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_ADTEntry_t::RPNEquation[LC_MAX_RPN_EQU_SIZE]
+
+
+ +

Reverse Polish Equation that specifies when this actionpoint should fail.

+ +

Definition at line 99 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_ADTEntry_t::RTSId
+
+
+ +

RTS to request if this AP fails.

+ +

Definition at line 95 of file lc_tbl.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___a_r_t_entry__t.html b/docs/users_guide/html/struct_l_c___a_r_t_entry__t.html index cf8c16a..15794eb 100644 --- a/docs/users_guide/html/struct_l_c___a_r_t_entry__t.html +++ b/docs/users_guide/html/struct_l_c___a_r_t_entry__t.html @@ -1,238 +1,238 @@ - - -CFS Limit Checker Application on User's Guide: LC_ARTEntry_t Struct Reference - - - - - - -

LC_ARTEntry_t Struct Reference

Actionpoint Results Table (ART) Entry. -More... -

-#include <lc_tbl.h> -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Fields

uint8 ActionResult
 Result for the last sample of this actionpoint.
uint8 CurrentState
 Current state of this actionpoint.
uint16 Padding
uint32 PassiveAPCount
 Total number of times RTS not invoked because this AP was passive.
uint32 FailToPassCount
 How many times this actionpoint has transitioned from Fail to Pass.
uint32 PassToFailCount
 How many times this actionpoint has transitioned from Pass to Fail.
uint32 ConsecutiveFailCount
 Number of consecutive times this actionpoint has evaluated to Fail.
uint32 CumulativeFailCount
 Total number of times this actionpoint has evaluated to Fail.
uint32 CumulativeRTSExecCount
 Total number of times an RTS request has been sent for this actionpoint.
-


Detailed Description

-Actionpoint Results Table (ART) Entry. -

- -

-Definition at line 265 of file lc_tbl.h.


Field Documentation

- -
- -
- -

-Result for the last sample of this actionpoint. -

- -

-Definition at line 266 of file lc_tbl.h. -

-

- -

- -
- -

-Number of consecutive times this actionpoint has evaluated to Fail. -

- -

-Definition at line 278 of file lc_tbl.h. -

-

- -

- -
- -

-Total number of times this actionpoint has evaluated to Fail. -

- -

-Definition at line 280 of file lc_tbl.h. -

-

- -

- -
- -

-Total number of times an RTS request has been sent for this actionpoint. -

- -

-Definition at line 282 of file lc_tbl.h. -

-

- -

- -
- -

-Current state of this actionpoint. -

- -

-Definition at line 268 of file lc_tbl.h. -

-

- -

- -
- -

-How many times this actionpoint has transitioned from Fail to Pass. -

- -

-Definition at line 274 of file lc_tbl.h. -

-

- -

- -
- -

- -

-Definition at line 270 of file lc_tbl.h. -

-

- -

- -
- -

-Total number of times RTS not invoked because this AP was passive. -

- -

-Definition at line 272 of file lc_tbl.h. -

-

- -

- -
- -

-How many times this actionpoint has transitioned from Pass to Fail. -

- -

-Definition at line 276 of file lc_tbl.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_ARTEntry_t Struct Reference + + + + + + +
+

LC_ARTEntry_t Struct Reference

+

Actionpoint Results Table (ART) Entry. +More...

+ +

#include <lc_tbl.h>

+ + + + + + + + + + + + + + + + + + + + + +

Data Fields

uint8 ActionResult
 Result for the last sample of this actionpoint.
uint8 CurrentState
 Current state of this actionpoint.
uint16 Padding
uint32 PassiveAPCount
 Total number of times RTS not invoked because this AP was passive.
uint32 FailToPassCount
 How many times this actionpoint has transitioned from Fail to Pass.
uint32 PassToFailCount
 How many times this actionpoint has transitioned from Pass to Fail.
uint32 ConsecutiveFailCount
 Number of consecutive times this actionpoint has evaluated to Fail.
uint32 CumulativeFailCount
 Total number of times this actionpoint has evaluated to Fail.
uint32 CumulativeRTSExecCount
 Total number of times an RTS request has been sent for this actionpoint.
uint32 CumulativeEventMsgsSent
 Total number of event messages sent.
+

Detailed Description

+

Actionpoint Results Table (ART) Entry.

+ +

Definition at line 156 of file lc_tbl.h.

+

Field Documentation

+ +
+
+ + + + +
uint8 LC_ARTEntry_t::ActionResult
+
+
+ +

Result for the last sample of this actionpoint.

+ +

Definition at line 157 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Number of consecutive times this actionpoint has evaluated to Fail.

+ +

Definition at line 169 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Total number of event messages sent.

+ +

Definition at line 175 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Total number of times this actionpoint has evaluated to Fail.

+ +

Definition at line 171 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Total number of times an RTS request has been sent for this actionpoint.

+ +

Definition at line 173 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_ARTEntry_t::CurrentState
+
+
+ +

Current state of this actionpoint.

+ +

Definition at line 159 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint32 LC_ARTEntry_t::FailToPassCount
+
+
+ +

How many times this actionpoint has transitioned from Fail to Pass.

+ +

Definition at line 165 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_ARTEntry_t::Padding
+
+
+ +

Definition at line 161 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint32 LC_ARTEntry_t::PassiveAPCount
+
+
+ +

Total number of times RTS not invoked because this AP was passive.

+ +

Definition at line 163 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint32 LC_ARTEntry_t::PassToFailCount
+
+
+ +

How many times this actionpoint has transitioned from Pass to Fail.

+ +

Definition at line 167 of file lc_tbl.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___hk_packet__t.html b/docs/users_guide/html/struct_l_c___hk_packet__t.html index d427b1d..502200c 100644 --- a/docs/users_guide/html/struct_l_c___hk_packet__t.html +++ b/docs/users_guide/html/struct_l_c___hk_packet__t.html @@ -1,354 +1,319 @@ - - -CFS Limit Checker Application on User's Guide: LC_HkPacket_t Struct Reference - - - - - - -

LC_HkPacket_t Struct Reference

#include <lc_msg.h> -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Fields

uint8 TlmHeader [CFE_SB_TLM_HDR_SIZE]
 cFE SB Tlm Msg Hdr
uint8 CmdCount
 LC Application Command Counter.
uint8 CmdErrCount
 LC Application Command Error Counter.
uint8 CurrentLCState
 Current LC application operating state.
uint8 Pad8
uint8 WPResults [LC_HKWR_NUM_BYTES]
 Packed watchpoint results data, 2 bits per watchpoint.
uint8 APResults [LC_HKAR_NUM_BYTES]
 Packed actionpoint results data, 4 bits per actionpoint.
uint16 PassiveRTSExecCount
 Total count of RTS sequences not initiated because the LC state is set to LC_STATE_PASSIVE.
uint16 WPsInUse
 How many watchpoints are currently in effect.
uint16 ActiveAPs
 How many actionpoints are currently active.
uint16 Pad16
uint32 APSampleCount
 Total count of Actionpoints sampled.
uint32 MonitoredMsgCount
 Total count of messages monitored for watchpoints.
uint32 RTSExecCount
 Total count of RTS sequences initiated.
-


Detailed Description

-
Name:
Housekeeping Packet Structure
- -

- -

-Definition at line 148 of file lc_msg.h.


Field Documentation

- -
- -
- -

-How many actionpoints are currently active. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_ActiveAPs
- -

-Definition at line 178 of file lc_msg.h. -

-

- -

-
- - - - -
uint8 LC_HkPacket_t::APResults[LC_HKAR_NUM_BYTES]
-
-
- -

-Packed actionpoint results data, 4 bits per actionpoint. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_APResults
- -

-Definition at line 165 of file lc_msg.h. -

-

- -

- -
- -

-Total count of Actionpoints sampled. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_APSampleCnt
- -

-Definition at line 183 of file lc_msg.h. -

-

- -

- -
- -

-LC Application Command Counter. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_CMDPC
- -

-Definition at line 152 of file lc_msg.h. -

-

- -

- -
- -

-LC Application Command Error Counter. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_CMDEC
- -

-Definition at line 154 of file lc_msg.h. -

-

- -

- -
- -

-Current LC application operating state. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_CurrentLCState
- -

-Definition at line 156 of file lc_msg.h. -

-

- -

- -
- -

-Total count of messages monitored for watchpoints. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_MonMsgCnt
- -

-Definition at line 185 of file lc_msg.h. -

-

- -

- -
- -

- -

-Definition at line 181 of file lc_msg.h. -

-

- -

- -
- -

- -

-Definition at line 159 of file lc_msg.h. -

-

- -

- -
- -

-Total count of RTS sequences not initiated because the LC state is set to LC_STATE_PASSIVE. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_PassRTSCnt
- -

-Definition at line 169 of file lc_msg.h. -

-

- -

- -
- -

-Total count of RTS sequences initiated. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_RTSCnt
- -

-Definition at line 188 of file lc_msg.h. -

-

- -

- -
- -

-cFE SB Tlm Msg Hdr -

- -

-Definition at line 150 of file lc_msg.h. -

-

- -

-
- - - - -
uint8 LC_HkPacket_t::WPResults[LC_HKWR_NUM_BYTES]
-
-
- -

-Packed watchpoint results data, 2 bits per watchpoint. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_WPResults
- -

-Definition at line 161 of file lc_msg.h. -

-

- -

- -
- -

-How many watchpoints are currently in effect. -

-

Telemetry Mnemonic(s):
$sc_$cpu_LC_WPsInUse
- -

-Definition at line 174 of file lc_msg.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_HkPacket_t Struct Reference + + + + + + +
+

LC_HkPacket_t Struct Reference

+

#include <lc_msg.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Fields

uint8 TlmHeader [CFE_SB_TLM_HDR_SIZE]
 cFE SB Tlm Msg Hdr
uint8 CmdCount
 LC Application Command Counter.
uint8 CmdErrCount
 LC Application Command Error Counter.
uint8 CurrentLCState
 Current LC application operating state.
uint8 Pad8
uint8 WPResults [LC_HKWR_NUM_BYTES]
 Packed watchpoint results data, 2 bits per watchpoint.
uint8 APResults [LC_HKAR_NUM_BYTES]
 Packed actionpoint results data, 4 bits per actionpoint.
uint16 PassiveRTSExecCount
 Total count of RTS sequences not initiated because the LC state is set to LC_STATE_PASSIVE or the state of the actionpoint that failed is set to LC_APSTATE_PASSIVE.
uint16 WPsInUse
 How many watchpoints are currently in effect.
uint16 ActiveAPs
 How many actionpoints are currently active.
uint16 Pad16
uint32 APSampleCount
 Total count of Actionpoints sampled.
uint32 MonitoredMsgCount
 Total count of messages monitored for watchpoints.
uint32 RTSExecCount
 Total count of RTS sequences initiated.
+

Detailed Description

+
Name:
Housekeeping Packet Structure
+ +

Definition at line 127 of file lc_msg.h.

+

Field Documentation

+ +
+
+ + + + +
uint16 LC_HkPacket_t::ActiveAPs
+
+
+ +

How many actionpoints are currently active.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_ActiveAPs
+ +

Definition at line 159 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_HkPacket_t::APResults[LC_HKAR_NUM_BYTES]
+
+
+ +

Packed actionpoint results data, 4 bits per actionpoint.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_APResults
+ +

Definition at line 144 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint32 LC_HkPacket_t::APSampleCount
+
+
+ +

Total count of Actionpoints sampled.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_APSampleCnt
+ +

Definition at line 164 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_HkPacket_t::CmdCount
+
+
+ +

LC Application Command Counter.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_CMDPC
+ +

Definition at line 131 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_HkPacket_t::CmdErrCount
+
+
+ +

LC Application Command Error Counter.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_CMDEC
+ +

Definition at line 133 of file lc_msg.h.

+ +
+
+ +
+ +
+ +

Current LC application operating state.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_CurrentLCState
+ +

Definition at line 135 of file lc_msg.h.

+ +
+
+ +
+ +
+ +

Total count of messages monitored for watchpoints.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_MonMsgCnt
+ +

Definition at line 166 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_HkPacket_t::Pad16
+
+
+ +

Definition at line 162 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_HkPacket_t::Pad8
+
+
+ +

Definition at line 138 of file lc_msg.h.

+ +
+
+ +
+ +
+ +

Total count of RTS sequences not initiated because the LC state is set to LC_STATE_PASSIVE or the state of the actionpoint that failed is set to LC_APSTATE_PASSIVE.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_PassRTSCnt
+ +

Definition at line 148 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint32 LC_HkPacket_t::RTSExecCount
+
+
+ +

Total count of RTS sequences initiated.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_RTSCnt
+ +

Definition at line 169 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_HkPacket_t::TlmHeader[CFE_SB_TLM_HDR_SIZE]
+
+
+ +

cFE SB Tlm Msg Hdr

+ +

Definition at line 129 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_HkPacket_t::WPResults[LC_HKWR_NUM_BYTES]
+
+
+ +

Packed watchpoint results data, 2 bits per watchpoint.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_WPResults
+ +

Definition at line 140 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_HkPacket_t::WPsInUse
+
+
+ +

How many watchpoints are currently in effect.

+
Telemetry Mnemonic(s):
$sc_$cpu_LC_WPsInUse
+ +

Definition at line 155 of file lc_msg.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___no_args_cmd__t.html b/docs/users_guide/html/struct_l_c___no_args_cmd__t.html index ceb318b..f41109f 100644 --- a/docs/users_guide/html/struct_l_c___no_args_cmd__t.html +++ b/docs/users_guide/html/struct_l_c___no_args_cmd__t.html @@ -1,62 +1,67 @@ - - -CFS Limit Checker Application on User's Guide: LC_NoArgsCmd_t Struct Reference - - - - - - -

LC_NoArgsCmd_t Struct Reference

No Arguments Command For command details see LC_NOOP_CC, LC_RESET_CC Also see LC_SEND_HK_MID. -More... -

-#include <lc_msg.h> -

- - - - - -

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
-


Detailed Description

-No Arguments Command For command details see LC_NOOP_CC, LC_RESET_CC Also see LC_SEND_HK_MID. -

- -

-Definition at line 65 of file lc_msg.h.


Field Documentation

- -
- -
- -

- -

-Definition at line 67 of file lc_msg.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_NoArgsCmd_t Struct Reference + + + + + + +
+

LC_NoArgsCmd_t Struct Reference

+

No Arguments Command For command details see LC_NOOP_CC, LC_RESET_CC Also see LC_SEND_HK_MID. +More...

+ +

#include <lc_msg.h>

+ + + +

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
+

Detailed Description

+

No Arguments Command For command details see LC_NOOP_CC, LC_RESET_CC Also see LC_SEND_HK_MID.

+ +

Definition at line 44 of file lc_msg.h.

+

Field Documentation

+ +
+
+ + + + +
uint8 LC_NoArgsCmd_t::CmdHeader[CFE_SB_CMD_HDR_SIZE]
+
+
+ +

Definition at line 46 of file lc_msg.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___reset_a_p_stats__t.html b/docs/users_guide/html/struct_l_c___reset_a_p_stats__t.html index f39e666..c42705d 100644 --- a/docs/users_guide/html/struct_l_c___reset_a_p_stats__t.html +++ b/docs/users_guide/html/struct_l_c___reset_a_p_stats__t.html @@ -1,106 +1,105 @@ - - -CFS Limit Checker Application on User's Guide: LC_ResetAPStats_t Struct Reference - - - - - - -

LC_ResetAPStats_t Struct Reference

Reset AP (Actionpoint) Statistics For command details see LC_RESET_AP_STATS_CC. -More... -

-#include <lc_msg.h> -

- - - - - - - - - - - -

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 APNumber
 Which actionpoint(s) to change.
uint16 Padding
 Structure padding.
-


Detailed Description

-Reset AP (Actionpoint) Statistics For command details see LC_RESET_AP_STATS_CC. -

- -

-Definition at line 111 of file lc_msg.h.


Field Documentation

- -
- -
- -

-Which actionpoint(s) to change. -

- -

-Definition at line 114 of file lc_msg.h. -

-

- -

- -
- -

- -

-Definition at line 112 of file lc_msg.h. -

-

- -

- -
- -

-Structure padding. -

- -

-Definition at line 115 of file lc_msg.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_ResetAPStats_t Struct Reference + + + + + + +
+

LC_ResetAPStats_t Struct Reference

+

Reset AP (Actionpoint) Statistics For command details see LC_RESET_AP_STATS_CC. +More...

+ +

#include <lc_msg.h>

+ + + + + + + +

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 APNumber
 Which actionpoint(s) to change.
uint16 Padding
 Structure padding.
+

Detailed Description

+

Reset AP (Actionpoint) Statistics For command details see LC_RESET_AP_STATS_CC.

+ +

Definition at line 90 of file lc_msg.h.

+

Field Documentation

+ +
+
+ + + + +
uint16 LC_ResetAPStats_t::APNumber
+
+
+ +

Which actionpoint(s) to change.

+ +

Definition at line 93 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_ResetAPStats_t::CmdHeader[CFE_SB_CMD_HDR_SIZE]
+
+
+ +

Definition at line 91 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_ResetAPStats_t::Padding
+
+
+ +

Structure padding.

+ +

Definition at line 94 of file lc_msg.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___reset_w_p_stats__t.html b/docs/users_guide/html/struct_l_c___reset_w_p_stats__t.html index fdb41f4..691fec5 100644 --- a/docs/users_guide/html/struct_l_c___reset_w_p_stats__t.html +++ b/docs/users_guide/html/struct_l_c___reset_w_p_stats__t.html @@ -1,106 +1,105 @@ - - -CFS Limit Checker Application on User's Guide: LC_ResetWPStats_t Struct Reference - - - - - - -

LC_ResetWPStats_t Struct Reference

Reset WP (Watchpoint) Statistics For command details see LC_RESET_WP_STATS_CC. -More... -

-#include <lc_msg.h> -

- - - - - - - - - - - -

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 WPNumber
 Which watchpoint(s) to change.
uint16 Padding
 Structure padding.
-


Detailed Description

-Reset WP (Watchpoint) Statistics For command details see LC_RESET_WP_STATS_CC. -

- -

-Definition at line 123 of file lc_msg.h.


Field Documentation

- -
- -
- -

- -

-Definition at line 124 of file lc_msg.h. -

-

- -

- -
- -

-Structure padding. -

- -

-Definition at line 127 of file lc_msg.h. -

-

- -

- -
- -

-Which watchpoint(s) to change. -

- -

-Definition at line 126 of file lc_msg.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_ResetWPStats_t Struct Reference + + + + + + +
+

LC_ResetWPStats_t Struct Reference

+

Reset WP (Watchpoint) Statistics For command details see LC_RESET_WP_STATS_CC. +More...

+ +

#include <lc_msg.h>

+ + + + + + + +

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 WPNumber
 Which watchpoint(s) to change.
uint16 Padding
 Structure padding.
+

Detailed Description

+

Reset WP (Watchpoint) Statistics For command details see LC_RESET_WP_STATS_CC.

+ +

Definition at line 102 of file lc_msg.h.

+

Field Documentation

+ +
+
+ + + + +
uint8 LC_ResetWPStats_t::CmdHeader[CFE_SB_CMD_HDR_SIZE]
+
+
+ +

Definition at line 103 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_ResetWPStats_t::Padding
+
+
+ +

Structure padding.

+ +

Definition at line 106 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_ResetWPStats_t::WPNumber
+
+
+ +

Which watchpoint(s) to change.

+ +

Definition at line 105 of file lc_msg.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___sample_a_p__t.html b/docs/users_guide/html/struct_l_c___sample_a_p__t.html index b3d68bd..51ddc2a 100644 --- a/docs/users_guide/html/struct_l_c___sample_a_p__t.html +++ b/docs/users_guide/html/struct_l_c___sample_a_p__t.html @@ -1,125 +1,121 @@ - - -CFS Limit Checker Application on User's Guide: LC_SampleAP_t Struct Reference - - - - - - -

LC_SampleAP_t Struct Reference

Sample AP (Actionpoint) Request See LC_SAMPLE_AP_MID. -More... -

-#include <lc_msg.h> -

- - - - - - - - - - - - - -

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 StartIndex
 Which actionpoint(s) to sample.
uint16 EndIndex
uint16 UpdateAge
 Update WP results age (T or F).
-


Detailed Description

-Sample AP (Actionpoint) Request See LC_SAMPLE_AP_MID. -

- -

-Definition at line 135 of file lc_msg.h.


Field Documentation

- -
- -
- -

- -

-Definition at line 136 of file lc_msg.h. -

-

- -

- -
- -

- -

-Definition at line 139 of file lc_msg.h. -

-

- -

- -
- -

-Which actionpoint(s) to sample. -

- -

-Definition at line 138 of file lc_msg.h. -

-

- -

- -
- -

-Update WP results age (T or F). -

- -

-Definition at line 141 of file lc_msg.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_SampleAP_t Struct Reference + + + + + + +
+

LC_SampleAP_t Struct Reference

+

Sample AP (Actionpoint) Request See LC_SAMPLE_AP_MID. +More...

+ +

#include <lc_msg.h>

+ + + + + + + + +

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 StartIndex
 Which actionpoint(s) to sample.
uint16 EndIndex
uint16 UpdateAge
 Update WP results age (T or F).
+

Detailed Description

+

Sample AP (Actionpoint) Request See LC_SAMPLE_AP_MID.

+ +

Definition at line 114 of file lc_msg.h.

+

Field Documentation

+ +
+
+ + + + +
uint8 LC_SampleAP_t::CmdHeader[CFE_SB_CMD_HDR_SIZE]
+
+
+ +

Definition at line 115 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_SampleAP_t::EndIndex
+
+
+ +

Definition at line 118 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_SampleAP_t::StartIndex
+
+
+ +

Which actionpoint(s) to sample.

+ +

Definition at line 117 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_SampleAP_t::UpdateAge
+
+
+ +

Update WP results age (T or F).

+ +

Definition at line 120 of file lc_msg.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___set_a_p_perm_off__t.html b/docs/users_guide/html/struct_l_c___set_a_p_perm_off__t.html index af5a346..0e73cb2 100644 --- a/docs/users_guide/html/struct_l_c___set_a_p_perm_off__t.html +++ b/docs/users_guide/html/struct_l_c___set_a_p_perm_off__t.html @@ -1,106 +1,105 @@ - - -CFS Limit Checker Application on User's Guide: LC_SetAPPermOff_t Struct Reference - - - - - - -

LC_SetAPPermOff_t Struct Reference

Set AP (Actionpoint) Permanently Off For command details see LC_SET_AP_PERMOFF_CC. -More... -

-#include <lc_msg.h> -

- - - - - - - - - - - -

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 APNumber
 Which actionpoint to change.
uint16 Padding
 Structure padding.
-


Detailed Description

-Set AP (Actionpoint) Permanently Off For command details see LC_SET_AP_PERMOFF_CC. -

- -

-Definition at line 99 of file lc_msg.h.


Field Documentation

- -
- -
- -

-Which actionpoint to change. -

- -

-Definition at line 102 of file lc_msg.h. -

-

- -

- -
- -

- -

-Definition at line 100 of file lc_msg.h. -

-

- -

- -
- -

-Structure padding. -

- -

-Definition at line 103 of file lc_msg.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_SetAPPermOff_t Struct Reference + + + + + + +
+

LC_SetAPPermOff_t Struct Reference

+

Set AP (Actionpoint) Permanently Off For command details see LC_SET_AP_PERMOFF_CC. +More...

+ +

#include <lc_msg.h>

+ + + + + + + +

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 APNumber
 Which actionpoint to change.
uint16 Padding
 Structure padding.
+

Detailed Description

+

Set AP (Actionpoint) Permanently Off For command details see LC_SET_AP_PERMOFF_CC.

+ +

Definition at line 78 of file lc_msg.h.

+

Field Documentation

+ +
+
+ + + + +
uint16 LC_SetAPPermOff_t::APNumber
+
+
+ +

Which actionpoint to change.

+ +

Definition at line 81 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_SetAPPermOff_t::CmdHeader[CFE_SB_CMD_HDR_SIZE]
+
+
+ +

Definition at line 79 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_SetAPPermOff_t::Padding
+
+
+ +

Structure padding.

+ +

Definition at line 82 of file lc_msg.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___set_a_p_state__t.html b/docs/users_guide/html/struct_l_c___set_a_p_state__t.html index f870518..d23636b 100644 --- a/docs/users_guide/html/struct_l_c___set_a_p_state__t.html +++ b/docs/users_guide/html/struct_l_c___set_a_p_state__t.html @@ -1,106 +1,105 @@ - - -CFS Limit Checker Application on User's Guide: LC_SetAPState_t Struct Reference - - - - - - -

LC_SetAPState_t Struct Reference

Set AP (Actionpoint) State Command For command details see LC_SET_AP_STATE_CC. -More... -

-#include <lc_msg.h> -

- - - - - - - - - - - -

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 APNumber
 Which actionpoint(s) to change.
uint16 NewAPState
 New actionpoint state.
-


Detailed Description

-Set AP (Actionpoint) State Command For command details see LC_SET_AP_STATE_CC. -

- -

-Definition at line 87 of file lc_msg.h.


Field Documentation

- -
- -
- -

-Which actionpoint(s) to change. -

- -

-Definition at line 90 of file lc_msg.h. -

-

- -

- -
- -

- -

-Definition at line 88 of file lc_msg.h. -

-

- -

- -
- -

-New actionpoint state. -

- -

-Definition at line 91 of file lc_msg.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_SetAPState_t Struct Reference + + + + + + +
+

LC_SetAPState_t Struct Reference

+

Set AP (Actionpoint) State Command For command details see LC_SET_AP_STATE_CC. +More...

+ +

#include <lc_msg.h>

+ + + + + + + +

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 APNumber
 Which actionpoint(s) to change.
uint16 NewAPState
 New actionpoint state.
+

Detailed Description

+

Set AP (Actionpoint) State Command For command details see LC_SET_AP_STATE_CC.

+ +

Definition at line 66 of file lc_msg.h.

+

Field Documentation

+ +
+
+ + + + +
uint16 LC_SetAPState_t::APNumber
+
+
+ +

Which actionpoint(s) to change.

+ +

Definition at line 69 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_SetAPState_t::CmdHeader[CFE_SB_CMD_HDR_SIZE]
+
+
+ +

Definition at line 67 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_SetAPState_t::NewAPState
+
+
+ +

New actionpoint state.

+ +

Definition at line 70 of file lc_msg.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___set_l_c_state__t.html b/docs/users_guide/html/struct_l_c___set_l_c_state__t.html index 6540af7..51e6fd9 100644 --- a/docs/users_guide/html/struct_l_c___set_l_c_state__t.html +++ b/docs/users_guide/html/struct_l_c___set_l_c_state__t.html @@ -1,106 +1,105 @@ - - -CFS Limit Checker Application on User's Guide: LC_SetLCState_t Struct Reference - - - - - - -

LC_SetLCState_t Struct Reference

Set LC Application State Command For command details see LC_SET_LC_STATE_CC. -More... -

-#include <lc_msg.h> -

- - - - - - - - - - - -

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 NewLCState
 New LC application state.
uint16 Padding
 Structure padding.
-


Detailed Description

-Set LC Application State Command For command details see LC_SET_LC_STATE_CC. -

- -

-Definition at line 75 of file lc_msg.h.


Field Documentation

- -
- -
- -

- -

-Definition at line 76 of file lc_msg.h. -

-

- -

- -
- -

-New LC application state. -

- -

-Definition at line 78 of file lc_msg.h. -

-

- -

- -
- -

-Structure padding. -

- -

-Definition at line 79 of file lc_msg.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_SetLCState_t Struct Reference + + + + + + +
+

LC_SetLCState_t Struct Reference

+

Set LC Application State Command For command details see LC_SET_LC_STATE_CC. +More...

+ +

#include <lc_msg.h>

+ + + + + + + +

Data Fields

uint8 CmdHeader [CFE_SB_CMD_HDR_SIZE]
uint16 NewLCState
 New LC application state.
uint16 Padding
 Structure padding.
+

Detailed Description

+

Set LC Application State Command For command details see LC_SET_LC_STATE_CC.

+ +

Definition at line 54 of file lc_msg.h.

+

Field Documentation

+ +
+
+ + + + +
uint8 LC_SetLCState_t::CmdHeader[CFE_SB_CMD_HDR_SIZE]
+
+
+ +

Definition at line 55 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_SetLCState_t::NewLCState
+
+
+ +

New LC application state.

+ +

Definition at line 57 of file lc_msg.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_SetLCState_t::Padding
+
+
+ +

Structure padding.

+ +

Definition at line 58 of file lc_msg.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___w_d_t_entry__t.html b/docs/users_guide/html/struct_l_c___w_d_t_entry__t.html index dbdf08b..6e8d5dd 100644 --- a/docs/users_guide/html/struct_l_c___w_d_t_entry__t.html +++ b/docs/users_guide/html/struct_l_c___w_d_t_entry__t.html @@ -1,219 +1,203 @@ - - -CFS Limit Checker Application on User's Guide: LC_WDTEntry_t Struct Reference - - - - - - -

LC_WDTEntry_t Struct Reference

Watchpoint Definition Table (WDT) Entry. -More... -

-#include <lc_tbl.h> -

- - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Fields

uint8 DataType
 Watchpoint Data Type (enumerated).
uint8 OperatorID
 Comparison type (enumerated).
uint16 MessageID
 Message ID for the message containing the watchpoint.
uint32 WatchpointOffset
 Byte offset from the beginning of the message (including any headers) to the watchpoint.
uint32 BitMask
 Value to be masked with watchpoint data prior to comparison.
LC_MultiType_t ComparisonValue
 Value watchpoint data is compared against.
uint32 ResultAgeWhenStale
 Number of LC Sample Actionpoint commands that must be processed after comparison before result goes stale.
uint32 CustomFuncArgument
 Data passed to the custom function when Operator_ID is set to LC_OPER_CUSTOM.
-


Detailed Description

-Watchpoint Definition Table (WDT) Entry. -

- -

-Definition at line 176 of file lc_tbl.h.


Field Documentation

- -
- -
- -

-Value to be masked with watchpoint data prior to comparison. -

- -

-Definition at line 184 of file lc_tbl.h. -

-

- -

- -
- -

-Value watchpoint data is compared against. -

- -

-Definition at line 186 of file lc_tbl.h. -

-

- -

- -
- -

-Data passed to the custom function when Operator_ID is set to LC_OPER_CUSTOM. -

- -

-Definition at line 191 of file lc_tbl.h. -

-

- -

- -
- -

-Watchpoint Data Type (enumerated). -

- -

-Definition at line 177 of file lc_tbl.h. -

-

- -

- -
- -

-Message ID for the message containing the watchpoint. -

- -

-Definition at line 179 of file lc_tbl.h. -

-

- -

- -
- -

-Comparison type (enumerated). -

- -

-Definition at line 178 of file lc_tbl.h. -

-

- -

- -
- -

-Number of LC Sample Actionpoint commands that must be processed after comparison before result goes stale. -

- -

-Definition at line 188 of file lc_tbl.h. -

-

- -

- -
- -

-Byte offset from the beginning of the message (including any headers) to the watchpoint. -

- -

-Definition at line 181 of file lc_tbl.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_WDTEntry_t Struct Reference + + + + + + +
+

LC_WDTEntry_t Struct Reference

+

Watchpoint Definition Table (WDT) Entry. +More...

+ +

#include <lc_tbl.h>

+ + + + + + + + + + + + + + + + + + +

Data Fields

uint8 DataType
 Watchpoint Data Type (enumerated).
uint8 OperatorID
 Comparison type (enumerated).
uint16 MessageID
 Message ID for the message containing the watchpoint.
uint32 WatchpointOffset
 Byte offset from the beginning of the message (including any headers) to the watchpoint.
uint32 BitMask
 Value to be masked with watchpoint data prior to comparison.
LC_MultiType_t ComparisonValue
 Value watchpoint data is compared against.
uint32 ResultAgeWhenStale
 Number of LC Sample Actionpoint commands that must be processed after comparison before result goes stale.
uint32 CustomFuncArgument
 Data passed to the custom function when Operator_ID is set to LC_OPER_CUSTOM.
+

Detailed Description

+

Watchpoint Definition Table (WDT) Entry.

+ +

Definition at line 63 of file lc_tbl.h.

+

Field Documentation

+ +
+
+ + + + +
uint32 LC_WDTEntry_t::BitMask
+
+
+ +

Value to be masked with watchpoint data prior to comparison.

+ +

Definition at line 71 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Value watchpoint data is compared against.

+ +

Definition at line 73 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Data passed to the custom function when Operator_ID is set to LC_OPER_CUSTOM.

+ +

Definition at line 78 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_WDTEntry_t::DataType
+
+
+ +

Watchpoint Data Type (enumerated).

+ +

Definition at line 64 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_WDTEntry_t::MessageID
+
+
+ +

Message ID for the message containing the watchpoint.

+ +

Definition at line 66 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_WDTEntry_t::OperatorID
+
+
+ +

Comparison type (enumerated).

+ +

Definition at line 65 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Number of LC Sample Actionpoint commands that must be processed after comparison before result goes stale.

+ +

Definition at line 75 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Byte offset from the beginning of the message (including any headers) to the watchpoint.

+ +

Definition at line 68 of file lc_tbl.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___w_r_t_entry__t.html b/docs/users_guide/html/struct_l_c___w_r_t_entry__t.html index 73564fa..bc4f25b 100644 --- a/docs/users_guide/html/struct_l_c___w_r_t_entry__t.html +++ b/docs/users_guide/html/struct_l_c___w_r_t_entry__t.html @@ -1,238 +1,219 @@ - - -CFS Limit Checker Application on User's Guide: LC_WRTEntry_t Struct Reference - - - - - - -

LC_WRTEntry_t Struct Reference

Watchpoint Results Table (WRT) Entry. -More... -

-#include <lc_tbl.h> -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Data Fields

uint8 WatchResult
 Result for the last evaluation of this watchpoint (enumerated).
uint8 Padding [3]
uint32 CountdownToStale
 Number of LC Sample Actionpoint commands still to be processed before WatchResult becomes stale.
uint32 EvaluationCount
 How many times this watchpoint has been evaluated.
uint32 FalseToTrueCount
 How many times this watchpoint has transitioned from FALSE to TRUE.
uint32 ConsecutiveTrueCount
 Number of consecutive times this watchpoint has evaluated to TRUE.
uint32 CumulativeTrueCount
 Total number of times this watchpoint has evaluated to TRUE.
LC_WRTTransition_t LastFalseToTrue
 Last transition from FALSE to TRUE.
LC_WRTTransition_t LastTrueToFalse
 Last transition from TRUE to FALSE.
-


Detailed Description

-Watchpoint Results Table (WRT) Entry. -

- -

-Definition at line 241 of file lc_tbl.h.


Field Documentation

- -
- -
- -

-Number of consecutive times this watchpoint has evaluated to TRUE. -

- -

-Definition at line 253 of file lc_tbl.h. -

-

- -

- -
- -

-Number of LC Sample Actionpoint commands still to be processed before WatchResult becomes stale. -

- -

-Definition at line 246 of file lc_tbl.h. -

-

- -

- -
- -

-Total number of times this watchpoint has evaluated to TRUE. -

- -

-Definition at line 255 of file lc_tbl.h. -

-

- -

- -
- -

-How many times this watchpoint has been evaluated. -

- -

-Definition at line 249 of file lc_tbl.h. -

-

- -

- -
- -

-How many times this watchpoint has transitioned from FALSE to TRUE. -

- -

-Definition at line 251 of file lc_tbl.h. -

-

- -

- -
- -

-Last transition from FALSE to TRUE. -

- -

-Definition at line 257 of file lc_tbl.h. -

-

- -

- -
- -

-Last transition from TRUE to FALSE. -

- -

-Definition at line 258 of file lc_tbl.h. -

-

- -

- -
- -

- -

-Definition at line 244 of file lc_tbl.h. -

-

- -

- -
- -

-Result for the last evaluation of this watchpoint (enumerated). -

- -

-Definition at line 242 of file lc_tbl.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_WRTEntry_t Struct Reference + + + + + + +
+

LC_WRTEntry_t Struct Reference

+

Watchpoint Results Table (WRT) Entry. +More...

+ +

#include <lc_tbl.h>

+ + + + + + + + + + + + + + + + + + + +

Data Fields

uint8 WatchResult
 Result for the last evaluation of this watchpoint (enumerated).
uint8 Padding [3]
uint32 CountdownToStale
 Number of LC Sample Actionpoint commands still to be processed before WatchResult becomes stale.
uint32 EvaluationCount
 How many times this watchpoint has been evaluated.
uint32 FalseToTrueCount
 How many times this watchpoint has transitioned from FALSE to TRUE.
uint32 ConsecutiveTrueCount
 Number of consecutive times this watchpoint has evaluated to TRUE.
uint32 CumulativeTrueCount
 Total number of times this watchpoint has evaluated to TRUE.
LC_WRTTransition_t LastFalseToTrue
 Last transition from FALSE to TRUE.
LC_WRTTransition_t LastTrueToFalse
 Last transition from TRUE to FALSE.
+

Detailed Description

+

Watchpoint Results Table (WRT) Entry.

+ +

Definition at line 132 of file lc_tbl.h.

+

Field Documentation

+ +
+ +
+ +

Number of consecutive times this watchpoint has evaluated to TRUE.

+ +

Definition at line 144 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Number of LC Sample Actionpoint commands still to be processed before WatchResult becomes stale.

+ +

Definition at line 137 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Total number of times this watchpoint has evaluated to TRUE.

+ +

Definition at line 146 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint32 LC_WRTEntry_t::EvaluationCount
+
+
+ +

How many times this watchpoint has been evaluated.

+ +

Definition at line 140 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

How many times this watchpoint has transitioned from FALSE to TRUE.

+ +

Definition at line 142 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Last transition from FALSE to TRUE.

+ +

Definition at line 148 of file lc_tbl.h.

+ +
+
+ +
+ +
+ +

Last transition from TRUE to FALSE.

+ +

Definition at line 149 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_WRTEntry_t::Padding[3]
+
+
+ +

Definition at line 135 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_WRTEntry_t::WatchResult
+
+
+ +

Result for the last evaluation of this watchpoint (enumerated).

+ +

Definition at line 133 of file lc_tbl.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/struct_l_c___w_r_t_transition__t.html b/docs/users_guide/html/struct_l_c___w_r_t_transition__t.html index 445df39..2986d62 100644 --- a/docs/users_guide/html/struct_l_c___w_r_t_transition__t.html +++ b/docs/users_guide/html/struct_l_c___w_r_t_transition__t.html @@ -1,87 +1,124 @@ - - -CFS Limit Checker Application on User's Guide: LC_WRTTransition_t Struct Reference - - - - - - -

LC_WRTTransition_t Struct Reference

Watchpoint Transition Structure. -More... -

-#include <lc_tbl.h> -

- - - - - - - - - -

Data Fields

uint32 Value
 Watchpoint value at comparison that caused the transition.
CFE_TIME_SysTime_t Timestamp
 Timstamp when the transition was detected.
-


Detailed Description

-Watchpoint Transition Structure. -

- -

-Definition at line 230 of file lc_tbl.h.


Field Documentation

- -
- -
- -

-Timstamp when the transition was detected. -

- -

-Definition at line 234 of file lc_tbl.h. -

-

- -

- -
- -

-Watchpoint value at comparison that caused the transition. -

- -

-Definition at line 232 of file lc_tbl.h. -

-

-


The documentation for this struct was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_WRTTransition_t Struct Reference + + + + + + +
+

LC_WRTTransition_t Struct Reference

+

Watchpoint Transition Structure. +More...

+ +

#include <lc_tbl.h>

+ + + + + + + + + +

Data Fields

uint32 Value
 Watchpoint value at comparison that caused the transition.
uint8 DataType
 Same as Watchpoint Data Type (enumerated).
uint8 Padding [3]
CFE_TIME_SysTime_t Timestamp
 Timstamp when the transition was detected.
+

Detailed Description

+

Watchpoint Transition Structure.

+ +

Definition at line 117 of file lc_tbl.h.

+

Field Documentation

+ +
+
+ + + + +
uint8 LC_WRTTransition_t::DataType
+
+
+ +

Same as Watchpoint Data Type (enumerated).

+ +

Definition at line 121 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_WRTTransition_t::Padding[3]
+
+
+ +

Definition at line 123 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
CFE_TIME_SysTime_t LC_WRTTransition_t::Timestamp
+
+
+ +

Timstamp when the transition was detected.

+ +

Definition at line 125 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint32 LC_WRTTransition_t::Value
+
+
+ +

Watchpoint value at comparison that caused the transition.

+ +

Definition at line 119 of file lc_tbl.h.

+ +
+
+
The documentation for this struct was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/docs/users_guide/html/tabs.css b/docs/users_guide/html/tabs.css index a61552a..6a26826 100644 --- a/docs/users_guide/html/tabs.css +++ b/docs/users_guide/html/tabs.css @@ -1,102 +1,105 @@ -/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ - -DIV.tabs -{ - float : left; - width : 100%; - background : url("tab_b.gif") repeat-x bottom; - margin-bottom : 4px; -} - -DIV.tabs UL -{ - margin : 0px; - padding-left : 10px; - list-style : none; -} - -DIV.tabs LI, DIV.tabs FORM -{ - display : inline; - margin : 0px; - padding : 0px; -} - -DIV.tabs FORM -{ - float : right; -} - -DIV.tabs A -{ - float : left; - background : url("tab_r.gif") no-repeat right top; - border-bottom : 1px solid #84B0C7; - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - -DIV.tabs A:hover -{ - background-position: 100% -150px; -} - -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover -{ - color: #1A419D; -} - -DIV.tabs SPAN -{ - float : left; - display : block; - background : url("tab_l.gif") no-repeat left top; - padding : 5px 9px; - white-space : nowrap; -} - -DIV.tabs INPUT -{ - float : right; - display : inline; - font-size : 1em; -} - -DIV.tabs TD -{ - font-size : x-small; - font-weight : bold; - text-decoration : none; -} - - - -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} -/* End IE5-Mac hack */ - -DIV.tabs A:hover SPAN -{ - background-position: 0% -150px; -} - -DIV.tabs LI#current A -{ - background-position: 100% -150px; - border-width : 0px; -} - -DIV.tabs LI#current SPAN -{ - background-position: 0% -150px; - padding-bottom : 6px; -} - -DIV.nav -{ - background : none; - border : none; - border-bottom : 1px solid #84B0C7; -} +/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ + +DIV.tabs +{ + float : left; + width : 100%; + background : url("tab_b.gif") repeat-x bottom; + margin-bottom : 4px; +} + +DIV.tabs UL +{ + margin : 0px; + padding-left : 10px; + list-style : none; +} + +DIV.tabs LI, DIV.tabs FORM +{ + display : inline; + margin : 0px; + padding : 0px; +} + +DIV.tabs FORM +{ + float : right; +} + +DIV.tabs A +{ + float : left; + background : url("tab_r.gif") no-repeat right top; + border-bottom : 1px solid #84B0C7; + font-size : 80%; + font-weight : bold; + text-decoration : none; +} + +DIV.tabs A:hover +{ + background-position: 100% -150px; +} + +DIV.tabs A:link, DIV.tabs A:visited, +DIV.tabs A:active, DIV.tabs A:hover +{ + color: #1A419D; +} + +DIV.tabs SPAN +{ + float : left; + display : block; + background : url("tab_l.gif") no-repeat left top; + padding : 5px 9px; + white-space : nowrap; +} + +DIV.tabs #MSearchBox +{ + float : right; + display : inline; + font-size : 1em; +} + +DIV.tabs TD +{ + font-size : 80%; + font-weight : bold; + text-decoration : none; +} + + + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +DIV.tabs SPAN {float : none;} +/* End IE5-Mac hack */ + +DIV.tabs A:hover SPAN +{ + background-position: 0% -150px; +} + +DIV.tabs LI.current A +{ + background-position: 100% -150px; + border-width : 0px; +} + +DIV.tabs LI.current SPAN +{ + background-position: 0% -150px; + padding-bottom : 6px; +} + +DIV.navpath +{ + background : none; + border : none; + border-bottom : 1px solid #84B0C7; + text-align : center; + margin : 2px; + padding : 2px; +} diff --git a/docs/users_guide/html/union_l_c___multi_type__t.html b/docs/users_guide/html/union_l_c___multi_type__t.html index ac05d7c..ad6ac45 100644 --- a/docs/users_guide/html/union_l_c___multi_type__t.html +++ b/docs/users_guide/html/union_l_c___multi_type__t.html @@ -1,176 +1,177 @@ - - -CFS Limit Checker Application on User's Guide: LC_MultiType_t Union Reference - - - - - - -

LC_MultiType_t Union Reference

Watchpoint Definition Table (WDT) MultiType Union This union is used to set and extract the comparison value in each WDT entry since it needs to fill a 32 bit fixed width field. A conditional compile switch gets the endianess right. -More... -

-#include <lc_tbl.h> -

- - - - - - - - - - - - - - - - - -

Data Fields

LC_Signed8in32_t Signed8in32
LC_Unsigned8in32_t Unsigned8in32
LC_Signed16in32_t Signed16in32
LC_Unsigned16in32_t Unsigned16in32
int32 Signed32
uint32 Unsigned32
float Float32
-


Detailed Description

-Watchpoint Definition Table (WDT) MultiType Union This union is used to set and extract the comparison value in each WDT entry since it needs to fill a 32 bit fixed width field. A conditional compile switch gets the endianess right. -

- -

-Definition at line 160 of file lc_tbl.h.


Field Documentation

- -
-
- - - - -
float LC_MultiType_t::Float32
-
-
- -

- -

-Definition at line 169 of file lc_tbl.h. -

-

- -

-
- - - - -
LC_Signed16in32_t LC_MultiType_t::Signed16in32
-
-
- -

- -

-Definition at line 164 of file lc_tbl.h. -

-

- -

- -
- -

- -

-Definition at line 167 of file lc_tbl.h. -

-

- -

-
- - - - -
LC_Signed8in32_t LC_MultiType_t::Signed8in32
-
-
- -

- -

-Definition at line 161 of file lc_tbl.h. -

-

- -

-
- - - - -
LC_Unsigned16in32_t LC_MultiType_t::Unsigned16in32
-
-
- -

- -

-Definition at line 165 of file lc_tbl.h. -

-

- -

- -
- -

- -

-Definition at line 168 of file lc_tbl.h. -

-

- -

-
- - - - -
LC_Unsigned8in32_t LC_MultiType_t::Unsigned8in32
-
-
- -

- -

-Definition at line 162 of file lc_tbl.h. -

-

-


The documentation for this union was generated from the following file: -
Generated on Wed Mar 4 16:39:54 2015 for CFS Limit Checker Application on User's Guide by  - -doxygen 1.4.7
- - + + + + +CFS Limit Checker Application on User's Guide: LC_MultiType_t Union Reference + + + + + + +
+

LC_MultiType_t Union Reference

+

#include <lc_tbl.h>

+ + + + + + + + + + +

Data Fields

uint32 Unsigned32
int32 Signed32
float Float32
uint16 Unsigned16
int16 Signed16
uint8 Unsigned8
int8 Signed8
uint8 RawByte [4]
+

Detailed Description

+

A union type provides a way to have many different data types occupy the same memory and legally alias each other.

+

This is used to store the watch data points, as they may be 8, 16, or 32 bits and this is defined in the table / not known until runtime.

+ +

Definition at line 48 of file lc_tbl.h.

+

Field Documentation

+ +
+
+ + + + +
float LC_MultiType_t::Float32
+
+
+ +

Definition at line 52 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_MultiType_t::RawByte[4]
+
+
+ +

Definition at line 57 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
int16 LC_MultiType_t::Signed16
+
+
+ +

Definition at line 54 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
int32 LC_MultiType_t::Signed32
+
+
+ +

Definition at line 51 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
int8 LC_MultiType_t::Signed8
+
+
+ +

Definition at line 56 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint16 LC_MultiType_t::Unsigned16
+
+
+ +

Definition at line 53 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint32 LC_MultiType_t::Unsigned32
+
+
+ +

Definition at line 50 of file lc_tbl.h.

+ +
+
+ +
+
+ + + + +
uint8 LC_MultiType_t::Unsigned8
+
+
+ +

Definition at line 55 of file lc_tbl.h.

+ +
+
+
The documentation for this union was generated from the following file: +
+
Generated on 25 Aug 2017 for CFS Limit Checker Application on User's Guide by  + +doxygen 1.6.1
+ + diff --git a/fsw/for_build/Makefile b/fsw/for_build/Makefile index 9c01cf3..defc683 100644 --- a/fsw/for_build/Makefile +++ b/fsw/for_build/Makefile @@ -1,126 +1,120 @@ -############################################################################### -# File: CFS Application Makefile -# -# $Id: Makefile 1.1 2012/07/31 16:53:32EDT nschweis Exp $ -# -# $Log: Makefile $ -# Revision 1.1 2012/07/31 16:53:32EDT nschweis -# Initial revision -# Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/for_build/project.pj -# Revision 1.4 2009/07/09 11:41:22EDT rmcgraw -# DCR8291:1 Changed CFE_MISSION_INC to CFS_MISSION_INC and added log if needed -# -############################################################################### -# -# Subsystem produced by this makefile. -# -export APPTARGET = lc - -# -# Entry Point for task -# -ENTRY_PT = LC_AppMain - -# -# Object files required to build subsystem. -# -OBJS := lc_app.o -OBJS += lc_action.o -OBJS += lc_watch.o -OBJS += lc_cmds.o -OBJS += lc_custom.o -# OBJS += lc_def_wdt.o -# OBJS += lc_def_adt.o - -# -# Source files required to build subsystem; used to generate dependencies. -# As long as there are no assembly files this can be automated. -# -SOURCES = $(OBJS:.o=.c) - - -## -## Specify extra C Flags needed to build this subsystem -## -LOCAL_COPTS = - - -## -## EXEDIR is defined here, just in case it needs to be different for a custom -## build -## -EXEDIR=../exe - -## -## Certain OSs and Application Loaders require the following option for -## Shared libraries. Currently only needed for vxWorks 5.5 and RTEMS. -## For each shared library that this app depends on, you need to have an -## entry like the following: -## -R../tst_lib/tst_lib.elf -## -## For builds under cygwin when you need the cfs_lib.dll linked in -## set this variables as follows: -## -## SHARED_LIB_LINK =../cfs_lib/cfs_lib.dll -## -SHARED_LIB_LINK = - -######################################################################## -# Should not have to change below this line, except for customized -# Mission and cFE directory structures -######################################################################## - -# -# Set build type to CFE_APP. This allows us to -# define different compiler flags for the cFE Core and Apps. -# -BUILD_TYPE = CFE_APP - -## -## Include all necessary cFE make rules -## Any of these can be copied to a local file and -## changed if needed. -## -## -## cfe-config.mak contains PSP and OS selection -## -include ../cfe/cfe-config.mak -## -## debug-opts.mak contains debug switches -## -include ../cfe/debug-opts.mak -## -## compiler-opts.mak contains compiler definitions and switches/defines -## -include $(CFE_PSP_SRC)/$(PSP)/make/compiler-opts.mak - -## -## Setup the include path for this subsystem -## The OS specific includes are in the build-rules.make file -## -## If this subsystem needs include files from another app, add the path here. -## -INCLUDE_PATH = \ --I$(OSAL_SRC)/inc \ --I$(CFE_CORE_SRC)/inc \ --I$(CFE_PSP_SRC)/inc \ --I$(CFE_PSP_SRC)/$(PSP)/inc \ --I$(CFS_APP_SRC)/inc \ --I$(CFS_APP_SRC)/$(APPTARGET)/fsw/src \ --I$(CFS_MISSION_INC) \ --I../cfe/inc \ --I../inc - -## -## Define the VPATH make variable. -## This can be modified to include source from another directory. -## If there is no corresponding app in the cfs-apps directory, then this can be discarded, or -## if the mission chooses to put the src in another directory such as "src", then that can be -## added here as well. -## -VPATH = $(CFS_APP_SRC)/$(APPTARGET)/fsw/src - -## -## Include the common make rules for building a cFE Application -## -include $(CFE_CORE_SRC)/make/app-rules.mak +############################################################################### +# File: CFS Application Makefile +# +# $Id: Makefile 1.2 2017/01/22 17:24:30EST sstrege Exp $ +# +# +############################################################################### +# +# Subsystem produced by this makefile. +# +export APPTARGET = lc + +# +# Entry Point for task +# +ENTRY_PT = LC_AppMain + +# +# Object files required to build subsystem. +# +OBJS := lc_app.o +OBJS += lc_action.o +OBJS += lc_watch.o +OBJS += lc_cmds.o +OBJS += lc_custom.o +# OBJS += lc_def_wdt.o +# OBJS += lc_def_adt.o + +# +# Source files required to build subsystem; used to generate dependencies. +# As long as there are no assembly files this can be automated. +# +SOURCES = $(OBJS:.o=.c) + + +## +## Specify extra C Flags needed to build this subsystem +## +LOCAL_COPTS = + + +## +## EXEDIR is defined here, just in case it needs to be different for a custom +## build +## +EXEDIR=../exe + +## +## Certain OSs and Application Loaders require the following option for +## Shared libraries. Currently only needed for vxWorks 5.5 and RTEMS. +## For each shared library that this app depends on, you need to have an +## entry like the following: +## -R../tst_lib/tst_lib.elf +## +## For builds under cygwin when you need the cfs_lib.dll linked in +## set this variables as follows: +## +## SHARED_LIB_LINK =../cfs_lib/cfs_lib.dll +## +SHARED_LIB_LINK = + +######################################################################## +# Should not have to change below this line, except for customized +# Mission and cFE directory structures +######################################################################## + +# +# Set build type to CFE_APP. This allows us to +# define different compiler flags for the cFE Core and Apps. +# +BUILD_TYPE = CFE_APP + +## +## Include all necessary cFE make rules +## Any of these can be copied to a local file and +## changed if needed. +## +## +## cfe-config.mak contains PSP and OS selection +## +include ../cfe/cfe-config.mak +## +## debug-opts.mak contains debug switches +## +include ../cfe/debug-opts.mak +## +## compiler-opts.mak contains compiler definitions and switches/defines +## +include $(CFE_PSP_SRC)/$(PSP)/make/compiler-opts.mak + +## +## Setup the include path for this subsystem +## The OS specific includes are in the build-rules.make file +## +## If this subsystem needs include files from another app, add the path here. +## +INCLUDE_PATH = \ +-I$(OSAL_SRC)/inc \ +-I$(CFE_CORE_SRC)/inc \ +-I$(CFE_PSP_SRC)/inc \ +-I$(CFE_PSP_SRC)/$(PSP)/inc \ +-I$(CFS_APP_SRC)/inc \ +-I$(CFS_APP_SRC)/$(APPTARGET)/fsw/src \ +-I$(CFS_MISSION_INC) \ +-I../cfe/inc \ +-I../inc + +## +## Define the VPATH make variable. +## This can be modified to include source from another directory. +## If there is no corresponding app in the cfs-apps directory, then this can be discarded, or +## if the mission chooses to put the src in another directory such as "src", then that can be +## added here as well. +## +VPATH = $(CFS_APP_SRC)/$(APPTARGET)/fsw/src + +## +## Include the common make rules for building a cFE Application +## +include $(CFE_CORE_SRC)/make/app-rules.mak diff --git a/fsw/for_build/codewalk_doxy b/fsw/for_build/codewalk_doxy index fe7b5c0..7fddcbe 100644 --- a/fsw/for_build/codewalk_doxy +++ b/fsw/for_build/codewalk_doxy @@ -1,258 +1,258 @@ -# Doxyfile 1.5.4 -@INCLUDE_PATH=../docs/dox_src/mnem_maps \ - $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/mnem_maps -@INCLUDE=cfs_$(APPTARGET)_cmd_mnem_map -@INCLUDE=cfs_$(APPTARGET)_tlm_mnem_map -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -#DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "Code Walkthrough of CFS Limit Checker Application" -PROJECT_NUMBER = $(CURR_DATE) -OUTPUT_DIRECTORY = $(CFS_APP_SRC)/$(APPTARGET)/docs/cwt/html -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = $(CFS_APP_SRC) -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -#QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES += "event=\xrefitem cfeevents \"Event Message\" \"cFE Event Message Cross Reference\" " -ALIASES += "retdesc= " -ALIASES += "retcode= " -ALIASES += endcode= -ALIASES += "returns=\return " -ALIASES += endreturns=
-ALIASES += "retstmt= " -ALIASES += endstmt= -ALIASES += "lccmd=\xrefitem cfslccmds \"Name\" \"Limit Checker Commands\" " -ALIASES += "lctlm=\xrefitem cfslctlm \"Name\" \"Limit Checker Telemetry\" " -ALIASES += "lccmdmnemonic=\xrefitem cfslccmdmnems \"Command Mnemonic(s)\" \"LC Command Mnemonic Cross Reference\" \b \c " -ALIASES += "lctlmmnemonic=\xrefitem cfslctlmmnems \"Telemetry Mnemonic(s)\" \"LC Telemetry Mnemonic Cross Reference\" \b \c " -ALIASES += "lccfg=\xrefitem cfslccfg \"Purpose\" \"CFS Limit Checker Configuration Parameters\" " -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -#CPP_CLI_SUPPORT = NO -#SIP_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#TYPEDEF_HIDES_STRUCT = NO -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -#EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = YES -WARN_FORMAT = "$file:$line: $text " -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/detailed_design/cfs_$(APPTARGET).dox -#INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/public_inc -INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src -INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/mission_inc -INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/platform_inc -#INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.c \ - *.h -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -#EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = "./" -IMAGE_PATH += "$(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/detailed_design/" -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = . -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -#HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = CFS_Help.chm -HHC_LOCATION = "C:/Program Files/HTML Help Workshop/hhc.exe" -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = ../../latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = YES -PAPER_TYPE = letter -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = ../../rtf -COMPACT_RTF = YES -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = __PPC__ \ - MESSAGE_FORMAT_IS_CCSDS \ - CFE_TIME_CFG_SRC_TIME \ - CFE_TIME_CFG_SRC_GPS \ - CFE_TIME_CFG_SRC_MET -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = ../cfe/cfe.tag=../cfe -GENERATE_TAGFILE = $(APPTARGET).tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -#MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = NO -COLLABORATION_GRAPH = NO -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = YES -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = NO -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -#DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO +# Doxyfile 1.5.4 +@INCLUDE_PATH=../docs/dox_src/mnem_maps \ + $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/mnem_maps +@INCLUDE=cfs_$(APPTARGET)_cmd_mnem_map +@INCLUDE=cfs_$(APPTARGET)_tlm_mnem_map +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +#DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "Code Walkthrough of CFS Limit Checker Application" +PROJECT_NUMBER = $(CURR_DATE) +OUTPUT_DIRECTORY = $(CFS_APP_SRC)/$(APPTARGET)/docs/cwt/html +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = $(CFS_APP_SRC) +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +#QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES += "event=\xrefitem cfeevents \"Event Message\" \"cFE Event Message Cross Reference\" " +ALIASES += "retdesc= " +ALIASES += "retcode= " +ALIASES += endcode= +ALIASES += "returns=\return " +ALIASES += endreturns=
+ALIASES += "retstmt= " +ALIASES += endstmt= +ALIASES += "lccmd=\xrefitem cfslccmds \"Name\" \"Limit Checker Commands\" " +ALIASES += "lctlm=\xrefitem cfslctlm \"Name\" \"Limit Checker Telemetry\" " +ALIASES += "lccmdmnemonic=\xrefitem cfslccmdmnems \"Command Mnemonic(s)\" \"LC Command Mnemonic Cross Reference\" \b \c " +ALIASES += "lctlmmnemonic=\xrefitem cfslctlmmnems \"Telemetry Mnemonic(s)\" \"LC Telemetry Mnemonic Cross Reference\" \b \c " +ALIASES += "lccfg=\xrefitem cfslccfg \"Purpose\" \"CFS Limit Checker Configuration Parameters\" " +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +#CPP_CLI_SUPPORT = NO +#SIP_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#TYPEDEF_HIDES_STRUCT = NO +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +#EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = YES +WARN_FORMAT = "$file:$line: $text " +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/detailed_design/cfs_$(APPTARGET).dox +#INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/public_inc +INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src +INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/mission_inc +INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/platform_inc +#INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.h +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +#EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = "./" +IMAGE_PATH += "$(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/detailed_design/" +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = . +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +#HTML_DYNAMIC_SECTIONS = NO +CHM_FILE = CFS_Help.chm +HHC_LOCATION = "C:/Program Files/HTML Help Workshop/hhc.exe" +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = ../../latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = YES +PAPER_TYPE = letter +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = ../../rtf +COMPACT_RTF = YES +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = __PPC__ \ + MESSAGE_FORMAT_IS_CCSDS \ + CFE_TIME_CFG_SRC_TIME \ + CFE_TIME_CFG_SRC_GPS \ + CFE_TIME_CFG_SRC_MET +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = ../cfe/cfe.tag=../cfe +GENERATE_TAGFILE = $(APPTARGET).tag +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +#MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = NO +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = YES +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = NO +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +#DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/fsw/for_build/detail_doxy b/fsw/for_build/detail_doxy index cf10c88..ed6df8d 100644 --- a/fsw/for_build/detail_doxy +++ b/fsw/for_build/detail_doxy @@ -1,260 +1,260 @@ -# Doxyfile 1.5.4 -@INCLUDE_PATH=../docs/dox_src/mnem_maps \ - $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/mnem_maps -@INCLUDE=cfs_$(APPTARGET)_cmd_mnem_map -@INCLUDE=cfs_$(APPTARGET)_tlm_mnem_map -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -#DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "CFS Limit Checker (LC) Application on $(CPUNAME) Detailed Design" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = ../docs/detailed_design/html/$(APPTARGET) -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = $(CFS_APP_SRC) -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -#QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES += "event=\xrefitem cfeevents \"Event Message\" \"cFE Event Message Cross Reference\" " -ALIASES += "retdesc= " -ALIASES += "retcode= " -ALIASES += endcode= -ALIASES += "returns=\return " -ALIASES += endreturns=
-ALIASES += "retstmt= " -ALIASES += endstmt= -ALIASES += "lccmd=\xrefitem cfslccmds \"Name\" \"Limit Checker Commands\" " -ALIASES += "lctlm=\xrefitem cfslctlm \"Name\" \"Limit Checker Telemetry\" " -ALIASES += "lccmdmnemonic=\xrefitem cfslccmdmnems \"Command Mnemonic(s)\" \"LC Command Mnemonic Cross Reference\" \b \c " -ALIASES += "lctlmmnemonic=\xrefitem cfslctlmmnems \"Telemetry Mnemonic(s)\" \"LC Telemetry Mnemonic Cross Reference\" \b \c " -ALIASES += "lccfg=\xrefitem cfslccfg \"Purpose\" \"CFS Limit Checker Configuration Parameters\" " -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -#CPP_CLI_SUPPORT = NO -#SIP_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#TYPEDEF_HIDES_STRUCT = NO -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -#EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = NO -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = YES -WARN_FORMAT = "$file:$line: $text " -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/detailed_design/cfs_$(APPTARGET).dox -#INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/public_inc -INPUT += ../../mission_inc/$(APPTARGET)_perfids.h -INPUT += ../../mission_inc/$(APPTARGET)_mission_cfg.h -INPUT += ../inc/$(APPTARGET)_msgids.h -INPUT += ../inc/$(APPTARGET)_platform_cfg.h -INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src -#INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.c \ - *.h -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -#EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = "./" -IMAGE_PATH += "$(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/detailed_design/" -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = . -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -#HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = CFS_Help.chm -HHC_LOCATION = "C:/Program Files/HTML Help Workshop/hhc.exe" -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = ../../latex/$(APPTARGET) -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = YES -PAPER_TYPE = letter -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = ../../rtf/$(APPTARGET) -COMPACT_RTF = YES -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = __PPC__ \ - MESSAGE_FORMAT_IS_CCSDS \ - CFE_TIME_CFG_SRC_TIME \ - CFE_TIME_CFG_SRC_GPS \ - CFE_TIME_CFG_SRC_MET -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = ../cfe/cfe.tag=../cfe -GENERATE_TAGFILE = $(APPTARGET).tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -#MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = NO -COLLABORATION_GRAPH = NO -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = NO -INCLUDED_BY_GRAPH = NO -CALL_GRAPH = YES -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = NO -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -#DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO +# Doxyfile 1.5.4 +@INCLUDE_PATH=../docs/dox_src/mnem_maps \ + $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/mnem_maps +@INCLUDE=cfs_$(APPTARGET)_cmd_mnem_map +@INCLUDE=cfs_$(APPTARGET)_tlm_mnem_map +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +#DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "CFS Limit Checker (LC) Application on $(CPUNAME) Detailed Design" +PROJECT_NUMBER = +OUTPUT_DIRECTORY = ../docs/detailed_design/html/$(APPTARGET) +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = $(CFS_APP_SRC) +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +#QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES += "event=\xrefitem cfeevents \"Event Message\" \"cFE Event Message Cross Reference\" " +ALIASES += "retdesc= " +ALIASES += "retcode= " +ALIASES += endcode= +ALIASES += "returns=\return " +ALIASES += endreturns=
+ALIASES += "retstmt= " +ALIASES += endstmt= +ALIASES += "lccmd=\xrefitem cfslccmds \"Name\" \"Limit Checker Commands\" " +ALIASES += "lctlm=\xrefitem cfslctlm \"Name\" \"Limit Checker Telemetry\" " +ALIASES += "lccmdmnemonic=\xrefitem cfslccmdmnems \"Command Mnemonic(s)\" \"LC Command Mnemonic Cross Reference\" \b \c " +ALIASES += "lctlmmnemonic=\xrefitem cfslctlmmnems \"Telemetry Mnemonic(s)\" \"LC Telemetry Mnemonic Cross Reference\" \b \c " +ALIASES += "lccfg=\xrefitem cfslccfg \"Purpose\" \"CFS Limit Checker Configuration Parameters\" " +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +#CPP_CLI_SUPPORT = NO +#SIP_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#TYPEDEF_HIDES_STRUCT = NO +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +#EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = NO +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = YES +WARN_FORMAT = "$file:$line: $text " +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/detailed_design/cfs_$(APPTARGET).dox +#INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/public_inc +INPUT += ../../mission_inc/$(APPTARGET)_perfids.h +INPUT += ../../mission_inc/$(APPTARGET)_mission_cfg.h +INPUT += ../inc/$(APPTARGET)_msgids.h +INPUT += ../inc/$(APPTARGET)_platform_cfg.h +INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src +#INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.h +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +#EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = "./" +IMAGE_PATH += "$(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/detailed_design/" +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = . +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +#HTML_DYNAMIC_SECTIONS = NO +CHM_FILE = CFS_Help.chm +HHC_LOCATION = "C:/Program Files/HTML Help Workshop/hhc.exe" +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = ../../latex/$(APPTARGET) +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = YES +PAPER_TYPE = letter +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = ../../rtf/$(APPTARGET) +COMPACT_RTF = YES +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = __PPC__ \ + MESSAGE_FORMAT_IS_CCSDS \ + CFE_TIME_CFG_SRC_TIME \ + CFE_TIME_CFG_SRC_GPS \ + CFE_TIME_CFG_SRC_MET +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = ../cfe/cfe.tag=../cfe +GENERATE_TAGFILE = $(APPTARGET).tag +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +#MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = NO +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = NO +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = YES +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = NO +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +#DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/fsw/for_build/lctables.mak b/fsw/for_build/lctables.mak index 0e08bf3..58b98b4 100644 --- a/fsw/for_build/lctables.mak +++ b/fsw/for_build/lctables.mak @@ -1,121 +1,124 @@ -############################################################################### -# -# File: CFS Application Table Makefile -# -# $Id: lctables.mak 1.1 2012/07/31 16:53:33EDT nschweis Exp $ -# -# $Log: lctables.mak $ -# Revision 1.1 2012/07/31 16:53:33EDT nschweis -# Initial revision -# Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/for_build/project.pj -# Revision 1.1 2009/12/18 14:08:58EST lwalling -# Initial revision -# Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/for_build/project.pj -# -############################################################################### -# -# The Application needs to be specified here -# -PARENTAPP = lc - -# -# List the tables that are generated here. -# Restrictions: -# 1. The table file name must be the same as the C source file name -# 2. There must be a single C source file for each table -# -TABLES = lc_def_adt.tbl lc_def_wdt.tbl - -################################################################################## -# Normally, nothing has to be changed below this line -# The following are changes that may have to be made for a custom app environment: -# 1. INCLUDE_PATH - This may be customized to tailor the include path for an app -# 2. VPATH - This may be customized to tailor the location of the table sources. -# For example: if the tables were stored in a "tables" subdirectory -# ( build/cpu1/sch/tables ) -################################################################################# - -# -# Object files required for tables -# -OBJS = $(TABLES:.tbl=.o) - -# -# Source files required to build tables. -# -SOURCES = $(OBJS:.o=.c) - -## -## Specify extra C Flags needed to build this subsystem -## -LOCAL_COPTS = - -## -## EXEDIR is defined here, just in case it needs to be different for a custom -## build -## -EXEDIR=../exe - -######################################################################## -# Should not have to change below this line, except for customized -# Mission and cFE directory structures -######################################################################## - -# -# Set build type to CFE_TABLE. This allows us to -# define different compiler flags for the cFE Core and Apps and Tables. -# -BUILD_TYPE = CFE_TABLE - -## -## Include all necessary cFE make rules -## Any of these can be copied to a local file and -## changed if needed. -## -## -## cfe-config.mak contians arch, BSP, and OS selection -## -include ../cfe/cfe-config.mak - -## -## debug-opts.mak contains debug switches -- Note that the table must be -## built with -g for the elf2tbl utility to work. -## -include ../cfe/debug-opts.mak - -## -## compiler-opts.mak contains compiler definitions and switches/defines -## -include $(CFE_PSP_SRC)/$(PSP)/make/compiler-opts.mak - -## -## Setup the include path for this subsystem -## The OS specific includes are in the build-rules.make file -## -## If this subsystem needs include files from another app, add the path here. -## -INCLUDE_PATH = \ --I$(OSAL_SRC)/inc \ --I$(CFE_CORE_SRC)/inc \ --I$(CFE_PSP_SRC)/$(PSP)/inc \ --I$(CFE_PSP_SRC)/inc \ --I$(CFS_APP_SRC)/inc \ --I$(CFS_APP_SRC)/$(PARENTAPP)/fsw/src \ --I$(CFS_MISSION_INC) \ --I../cfe/inc \ --I../inc \ --I../$(PARENTAPP) - -## -## Define the VPATH make variable. -## This can be modified to include source from another directory. -## If there is no corresponding app in the cfe-apps directory, then this can be discarded, or -## if the mission chooses to put the src in another directory such as "src", then that can be -## added here as well. -## -VPATH = $(CFS_APP_SRC)/$(PARENTAPP)/fsw/tables - -## -## Include the common cFE make rules -## -include $(CFE_CORE_SRC)/make/table-rules.mak +############################################################################### +# +# File: CFS Application Table Makefile +# +# $Id: lctables.mak 1.1 2015/07/26 15:40:59EDT rperera Exp $ +# +# $Log: lctables.mak $ +# Revision 1.1 2015/07/26 15:40:59EDT rperera +# Initial revision +# Member added to project /CFS-APPs-PROJECT/lcx/fsw/for_build/project.pj +# Revision 1.1 2012/07/31 16:53:33EDT nschweis +# Initial revision +# Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/for_build/project.pj +# Revision 1.1 2009/12/18 14:08:58EST lwalling +# Initial revision +# Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/for_build/project.pj +# +############################################################################### +# +# The Application needs to be specified here +# +PARENTAPP = lc + +# +# List the tables that are generated here. +# Restrictions: +# 1. The table file name must be the same as the C source file name +# 2. There must be a single C source file for each table +# +TABLES = lc_def_adt.tbl lc_def_wdt.tbl + +################################################################################## +# Normally, nothing has to be changed below this line +# The following are changes that may have to be made for a custom app environment: +# 1. INCLUDE_PATH - This may be customized to tailor the include path for an app +# 2. VPATH - This may be customized to tailor the location of the table sources. +# For example: if the tables were stored in a "tables" subdirectory +# ( build/cpu1/sch/tables ) +################################################################################# + +# +# Object files required for tables +# +OBJS = $(TABLES:.tbl=.o) + +# +# Source files required to build tables. +# +SOURCES = $(OBJS:.o=.c) + +## +## Specify extra C Flags needed to build this subsystem +## +LOCAL_COPTS = + +## +## EXEDIR is defined here, just in case it needs to be different for a custom +## build +## +EXEDIR=../exe + +######################################################################## +# Should not have to change below this line, except for customized +# Mission and cFE directory structures +######################################################################## + +# +# Set build type to CFE_TABLE. This allows us to +# define different compiler flags for the cFE Core and Apps and Tables. +# +BUILD_TYPE = CFE_TABLE + +## +## Include all necessary cFE make rules +## Any of these can be copied to a local file and +## changed if needed. +## +## +## cfe-config.mak contians arch, BSP, and OS selection +## +include ../cfe/cfe-config.mak + +## +## debug-opts.mak contains debug switches -- Note that the table must be +## built with -g for the elf2tbl utility to work. +## +include ../cfe/debug-opts.mak + +## +## compiler-opts.mak contains compiler definitions and switches/defines +## +include $(CFE_PSP_SRC)/$(PSP)/make/compiler-opts.mak + +## +## Setup the include path for this subsystem +## The OS specific includes are in the build-rules.make file +## +## If this subsystem needs include files from another app, add the path here. +## +INCLUDE_PATH = \ +-I$(OSAL_SRC)/inc \ +-I$(CFE_CORE_SRC)/inc \ +-I$(CFE_PSP_SRC)/$(PSP)/inc \ +-I$(CFE_PSP_SRC)/inc \ +-I$(CFS_APP_SRC)/inc \ +-I$(CFS_APP_SRC)/$(PARENTAPP)/fsw/src \ +-I$(CFS_MISSION_INC) \ +-I../cfe/inc \ +-I../inc \ +-I../$(PARENTAPP) + +## +## Define the VPATH make variable. +## This can be modified to include source from another directory. +## If there is no corresponding app in the cfe-apps directory, then this can be discarded, or +## if the mission chooses to put the src in another directory such as "src", then that can be +## added here as well. +## +VPATH = $(CFS_APP_SRC)/$(PARENTAPP)/fsw/tables + +## +## Include the common cFE make rules +## +include $(CFE_CORE_SRC)/make/table-rules.mak diff --git a/fsw/for_build/user_doxy b/fsw/for_build/user_doxy index 98d93ae..75b3313 100644 --- a/fsw/for_build/user_doxy +++ b/fsw/for_build/user_doxy @@ -1,264 +1,264 @@ -# Doxyfile 1.5.4 -@INCLUDE_PATH=../docs/dox_src/mnem_maps \ - $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/mnem_maps -@INCLUDE=cfs_$(APPTARGET)_cmd_mnem_map -@INCLUDE=cfs_$(APPTARGET)_tlm_mnem_map -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -#DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "CFS Limit Checker Application on $(CPUNAME) User's Guide" -PROJECT_NUMBER = -OUTPUT_DIRECTORY = ../docs/users_guide/html/$(APPTARGET) -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = $(CFS_APP_SRC) -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -#QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES += "event=\xrefitem cfeevents \"Event Message\" \"cFE Event Message Cross Reference\" " -ALIASES += "retdesc= " -ALIASES += "retcode= " -ALIASES += endcode= -ALIASES += "returns=\return " -ALIASES += endreturns=
-ALIASES += "retstmt= " -ALIASES += endstmt= -ALIASES += "lccmd=\xrefitem cfslccmds \"Name\" \"Limit Checker Commands\" " -ALIASES += "lctlm=\xrefitem cfslctlm \"Name\" \"Limit Checker Telemetry\" " -ALIASES += "lccmdmnemonic=\xrefitem cfslccmdmnems \"Command Mnemonic(s)\" \"LC Command Mnemonic Cross Reference\" \b \c " -ALIASES += "lctlmmnemonic=\xrefitem cfslctlmmnems \"Telemetry Mnemonic(s)\" \"LC Telemetry Mnemonic Cross Reference\" \b \c " -ALIASES += "lccfg=\xrefitem cfslccfg \"Purpose\" \"CFS Limit Checker Configuration Parameters\" " -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -#CPP_CLI_SUPPORT = NO -#SIP_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#TYPEDEF_HIDES_STRUCT = NO -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -#EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = NO -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = YES -WARN_FORMAT = "$file:$line: $text " -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/users_guide/cfs_$(APPTARGET).dox -#INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/public_inc -INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_msgdefs.h -INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_msg.h -INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_tbldefs.h -INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_tbl.h -INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_events.h -INPUT += ../../mission_inc/$(APPTARGET)_perfids.h -INPUT += ../../mission_inc/$(APPTARGET)_mission_cfg.h -INPUT += ../inc/$(APPTARGET)_msgids.h -INPUT += ../inc/$(APPTARGET)_platform_cfg.h -#INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.c \ - *.h -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -#EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = "./" -IMAGE_PATH += "$(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/users_guide/" -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = . -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -#HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = CFS_Help.chm -HHC_LOCATION = "C:/Program Files/HTML Help Workshop/hhc.exe" -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = ../../latex/$(APPTARGET) -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = YES -PAPER_TYPE = letter -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = ../../rtf/$(APPTARGET) -COMPACT_RTF = YES -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = __PPC__ \ - MESSAGE_FORMAT_IS_CCSDS \ - CFE_TIME_CFG_SRC_TIME \ - CFE_TIME_CFG_SRC_GPS \ - CFE_TIME_CFG_SRC_MET -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = ../cfe/cfe.tag=../cfe -GENERATE_TAGFILE = $(APPTARGET).tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -#MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = NO -COLLABORATION_GRAPH = NO -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = NO -INCLUDED_BY_GRAPH = NO -CALL_GRAPH = YES -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = NO -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -#DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO +# Doxyfile 1.5.4 +@INCLUDE_PATH=../docs/dox_src/mnem_maps \ + $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/mnem_maps +@INCLUDE=cfs_$(APPTARGET)_cmd_mnem_map +@INCLUDE=cfs_$(APPTARGET)_tlm_mnem_map +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +#DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "CFS Limit Checker Application on $(CPUNAME) User's Guide" +PROJECT_NUMBER = +OUTPUT_DIRECTORY = ../docs/users_guide/html/$(APPTARGET) +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = $(CFS_APP_SRC) +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +#QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES += "event=\xrefitem cfeevents \"Event Message\" \"cFE Event Message Cross Reference\" " +ALIASES += "retdesc= " +ALIASES += "retcode= " +ALIASES += endcode= +ALIASES += "returns=\return " +ALIASES += endreturns=
+ALIASES += "retstmt= " +ALIASES += endstmt= +ALIASES += "lccmd=\xrefitem cfslccmds \"Name\" \"Limit Checker Commands\" " +ALIASES += "lctlm=\xrefitem cfslctlm \"Name\" \"Limit Checker Telemetry\" " +ALIASES += "lccmdmnemonic=\xrefitem cfslccmdmnems \"Command Mnemonic(s)\" \"LC Command Mnemonic Cross Reference\" \b \c " +ALIASES += "lctlmmnemonic=\xrefitem cfslctlmmnems \"Telemetry Mnemonic(s)\" \"LC Telemetry Mnemonic Cross Reference\" \b \c " +ALIASES += "lccfg=\xrefitem cfslccfg \"Purpose\" \"CFS Limit Checker Configuration Parameters\" " +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +#CPP_CLI_SUPPORT = NO +#SIP_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#TYPEDEF_HIDES_STRUCT = NO +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +#EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = NO +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = YES +WARN_FORMAT = "$file:$line: $text " +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = $(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/users_guide/cfs_$(APPTARGET).dox +#INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/public_inc +INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_msgdefs.h +INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_msg.h +INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_tbldefs.h +INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_tbl.h +INPUT += $(CFS_APP_SRC)/$(APPTARGET)/fsw/src/$(APPTARGET)_events.h +INPUT += ../../mission_inc/$(APPTARGET)_perfids.h +INPUT += ../../mission_inc/$(APPTARGET)_mission_cfg.h +INPUT += ../inc/$(APPTARGET)_msgids.h +INPUT += ../inc/$(APPTARGET)_platform_cfg.h +#INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.h +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +#EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = "./" +IMAGE_PATH += "$(CFS_APP_SRC)/$(APPTARGET)/docs/dox_src/users_guide/" +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = . +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +#HTML_DYNAMIC_SECTIONS = NO +CHM_FILE = CFS_Help.chm +HHC_LOCATION = "C:/Program Files/HTML Help Workshop/hhc.exe" +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = ../../latex/$(APPTARGET) +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = YES +PAPER_TYPE = letter +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = ../../rtf/$(APPTARGET) +COMPACT_RTF = YES +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = __PPC__ \ + MESSAGE_FORMAT_IS_CCSDS \ + CFE_TIME_CFG_SRC_TIME \ + CFE_TIME_CFG_SRC_GPS \ + CFE_TIME_CFG_SRC_MET +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = ../cfe/cfe.tag=../cfe +GENERATE_TAGFILE = $(APPTARGET).tag +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +#MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = NO +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = NO +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = YES +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = NO +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +#DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/fsw/mission_inc/lc_mission_cfg.h b/fsw/mission_inc/lc_mission_cfg.h index 528a805..9d876d7 100644 --- a/fsw/mission_inc/lc_mission_cfg.h +++ b/fsw/mission_inc/lc_mission_cfg.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_mission_cfg.h 1.2 2015/03/04 16:09:55EST sstrege Exp $ +** $Id: lc_mission_cfg.h 1.3 2017/01/22 17:24:26EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -16,21 +16,6 @@ ** ** Notes: ** -** $Log: lc_mission_cfg.h $ -** Revision 1.2 2015/03/04 16:09:55EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:34EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/mission_inc/project.pj -** Revision 1.4 2010/04/14 11:55:45EDT lwalling -** Update stored command message ID, command code appears OK -** Revision 1.3 2010/03/03 15:23:16EST lwalling -** Change RTS command code from 2 to 4, change some Doxygen pound symbols to forward slashes -** Revision 1.2 2010/01/07 13:53:10EST lwalling -** Update LC configuration header files and configuration verification header file -** Revision 1.1 2008/12/03 13:51:47EST dahardis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/mission_inc/project.pj ** *************************************************************************/ #ifndef _lc_mission_cfg_ diff --git a/fsw/mission_inc/lc_perfids.h b/fsw/mission_inc/lc_perfids.h index df4a9aa..e782cad 100644 --- a/fsw/mission_inc/lc_perfids.h +++ b/fsw/mission_inc/lc_perfids.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_perfids.h 1.2 2015/03/04 16:09:51EST sstrege Exp $ +** $Id: lc_perfids.h 1.3 2017/01/22 17:24:45EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -16,17 +16,6 @@ ** ** Notes: ** -** $Log: lc_perfids.h $ -** Revision 1.2 2015/03/04 16:09:51EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:34EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/mission_inc/project.pj -** Revision 1.2 2008/12/03 13:59:41EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:18:05EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/mission_inc/project.pj ** *************************************************************************/ #ifndef _lc_perfids_ diff --git a/fsw/platform_inc/lc_msgids.h b/fsw/platform_inc/lc_msgids.h index 0bbd2c6..457b13b 100644 --- a/fsw/platform_inc/lc_msgids.h +++ b/fsw/platform_inc/lc_msgids.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_msgids.h 1.2 2015/03/04 16:09:56EST sstrege Exp $ +** $Id: lc_msgids.h 1.3 2017/01/22 17:24:20EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -16,17 +16,6 @@ ** ** Notes: ** -** $Log: lc_msgids.h $ -** Revision 1.2 2015/03/04 16:09:56EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:35EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/platform_inc/project.pj -** Revision 1.2 2011/01/19 12:45:40EST jmdagost -** Moved two message parameters to the message IDs file for scheduler table access. -** Revision 1.1 2008/10/29 14:18:12EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/platform_inc/project.pj ** *************************************************************************/ #ifndef _lc_msgids_ diff --git a/fsw/platform_inc/lc_platform_cfg.h b/fsw/platform_inc/lc_platform_cfg.h index fe3afff..8306dcc 100644 --- a/fsw/platform_inc/lc_platform_cfg.h +++ b/fsw/platform_inc/lc_platform_cfg.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_platform_cfg.h 1.2 2015/03/04 16:09:54EST sstrege Exp $ +** $Id: lc_platform_cfg.h 1.4 2017/03/07 17:35:09EST mdeschu Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -16,31 +16,6 @@ ** ** Notes: ** -** $Log: lc_platform_cfg.h $ -** Revision 1.2 2015/03/04 16:09:54EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:35EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/platform_inc/project.pj -** Revision 1.8 2011/03/04 09:47:04EST lwalling -** Change default table directory from ram to cf/apps -** Revision 1.7 2011/01/19 11:32:05EST jmdagost -** Moved mission revision number from lc_version.h to lc_platform_cfg.h. -** Revision 1.6 2010/02/23 11:24:14EST lwalling -** Change application name from LC_APP to LC per CFS naming convention -** Revision 1.5 2009/12/22 13:17:45EST lwalling -** Create common definition for LC application name -** Revision 1.4 2008/12/10 15:59:26EST dahardis -** Reduced the maximum number of watchpoints and actionpoints config params -** from 256 to 176 -** Revision 1.3 2008/12/10 15:33:21EST dahardis -** Changed default configuration parameter setting to not attempt a restore -** from CDS on application restart -** Revision 1.2 2008/12/03 13:59:40EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:18:17EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/platform_inc/project.pj ** *************************************************************************/ #ifndef _lc_platform_cfg_ @@ -84,8 +59,10 @@ ** ** \par Limits: ** This parameter can't be larger than 65520 (0xFFF0) because -** higher values are reserved for use as Reversh Polish -** operators. +** higher values are reserved for use as Reverse Polish +** operators. It must be a multiple of 4 to avoid +** indexing past the end of the array as LC indexes +** ahead to build the packed status bytes. ** ** This parameter will dictate the size of the Watchpoint ** Definition Table: @@ -106,7 +83,9 @@ ** ** \par Limits: ** This parameter can't be larger than an unsigned 16 bit -** integer (65535). +** integer (65535). It must be a multiple of 2 to avoid +** indexing past the end of the array as LC indexes +** ahead to build the packed status bytes. ** ** This parameter will dictate the size of the Actionpoint ** Definition Table: diff --git a/fsw/src/lc_action.c b/fsw/src/lc_action.c index 6c76de1..f0ff9fa 100644 --- a/fsw/src/lc_action.c +++ b/fsw/src/lc_action.c @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_action.c 1.3.1.2 2015/03/04 16:15:46EST sstrege Exp $ +** $Id: lc_action.c 1.8 2017/07/06 12:00:28EDT mdeschu Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -14,42 +14,6 @@ ** Purpose: ** Functions used for CFS Limit Checker actionpoint processing ** -** $Log: lc_action.c $ -** Revision 1.3.1.2 2015/03/04 16:15:46EST sstrege -** Added copyright information -** Revision 1.3.1.1 2012/10/01 18:40:07EDT lwalling -** Apply 1.4 changes to branch -** Revision 1.4 2012/10/01 13:20:48PDT lwalling -** Removed unused variable Operand from function LC_EvaluateRPN() -** Revision 1.3 2012/08/01 11:41:07PDT lwalling -** Cleanup actionpoint operators use of STALE -** Revision 1.2 2012/08/01 11:20:22PDT lwalling -** Change NOT_MEASURED to STALE -** Revision 1.1 2012/07/31 13:53:36PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.10 2012/06/26 17:59:09EDT lwalling -** Fix ap logic for OR and AND operators when wp result = LC_WATCH_NOT_MEASURED -** Revision 1.9 2011/02/07 14:58:33PST lwalling -** Modify sample AP commands to target groups of AP's -** Revision 1.8 2011/01/19 12:45:39EST jmdagost -** Moved two message parameters to the message IDs file for scheduler table access. -** Revision 1.7 2011/01/19 11:35:21EST jmdagost -** Initialize local variables RPNIndex and RPNStackDepth. -** Revision 1.6 2010/04/12 14:29:31EDT lwalling -** Changed bitwise RPN comparisons to logical comparisons -** Revision 1.5 2010/02/19 17:43:54EST lwalling -** Change state events limits to individual limits for Passive AP, FailToPass and PassToFail -** Revision 1.4 2009/12/28 14:47:21EST lwalling -** Add event limits, change limited events from debug to info -** Revision 1.3 2009/01/29 15:39:03EST dahardis -** Changed an event message from INFO to DEBUG as documented -** in DCR #6811 -** Revision 1.2 2008/12/03 13:59:46EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:18:36EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ @@ -64,88 +28,6 @@ #include -/************************************************************************* -** Local Function Prototypes -*************************************************************************/ -/************************************************************************/ -/** \brief Sample single actionpoint -** -** \par Description -** Support function for actionpoint processing that will sample -** a single actionpoint and handle the result as needed -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] APNumber The actionpoint number to sample (zero -** based actionpoint definition table index) -** -*************************************************************************/ -void LC_SampleSingleAP(uint16 APNumber); - -/************************************************************************/ -/** \brief Evaluate RPN -** -** \par Description -** Support function for actionpoint processing that evaluates -** the reverse polish notation (RPN) equation for the specified -** actionpoint and returns the result -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] APNumber The actionpoint number to evaluate (zero -** based actionpoint definition table index) -** -** \returns -** \retcode #LC_ACTION_PASS \retdesc \copydoc LC_ACTION_PASS \endcode -** \retcode #LC_ACTION_FAIL \retdesc \copydoc LC_ACTION_FAIL \endcode -** \retcode #LC_ACTION_STALE \retdesc \copydoc LC_ACTION_STALE \endcode -** \retcode #LC_ACTION_ERROR \retdesc \copydoc LC_ACTION_ERROR \endcode -** \endreturns -** -*************************************************************************/ -uint8 LC_EvaluateRPN(uint16 APNumber); - -/************************************************************************/ -/** \brief Validate RPN expression -** -** \par Description -** Support function for actionpoint definition table validation -** that checks a reverse polish notation (RPN) equation for -** possible errors. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] RPNPtr Pointer to the RPN equation -** -** \param [in] IndexValue A pointer where to store the equation -** index value if an error is detected -** -** \param [in] StackDepthValue A pointer where to store the equation -** stack depth value if an error is detected -** -** \param [out] *IndexValue Equation index value where error was -** found. Not modified if return code is -** #LC_ADTVAL_NO_ERR -** -** \param [out] *StackDepthValue Equation stack depth value where error -** found. Not modified if return code is -** #LC_ADTVAL_NO_ERR -** -** \returns -** \retcode #LC_ADTVAL_NO_ERR \retdesc \copydoc LC_ADTVAL_NO_ERR \endcode -** \retcode #LC_ADTVAL_ERR_RPN \retdesc \copydoc LC_ADTVAL_ERR_RPN \endcode -** \endreturns -** -** \sa #LC_ValidateADT -** -*************************************************************************/ -int32 LC_ValidateRPN(uint16 *RPNPtr, - int32 *IndexValue, - int32 *StackDepthValue); - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* Sample one or all actionpoints */ @@ -256,6 +138,7 @@ void LC_SampleSingleAP(uint16 APNumber) CFE_EVS_SendEvent(LC_AP_PASSTOFAIL_INF_EID, CFE_EVS_INFORMATION, "AP state change from PASS to FAIL: AP = %d", APNumber); + LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent++; } } @@ -310,6 +193,8 @@ void LC_SampleSingleAP(uint16 APNumber) EventText, APNumber, LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, LC_OperData.ADTPtr[APNumber].RTSId); + + LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent++; } else { @@ -323,7 +208,7 @@ void LC_SampleSingleAP(uint16 APNumber) CFE_EVS_SendEvent(LC_PASSIVE_FAIL_DBG_EID, CFE_EVS_DEBUG, "AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d", APNumber, - LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, + (int)LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, LC_OperData.ADTPtr[APNumber].RTSId); } } @@ -333,18 +218,20 @@ void LC_SampleSingleAP(uint16 APNumber) ** The actionpoint failed while the actionpoint state is passive */ LC_OperData.ARTPtr[APNumber].PassiveAPCount++; + LC_AppData.PassiveRTSExecCount++; /* ** Send only a limited number of AP is Passive events */ - if (LC_OperData.ARTPtr[APNumber].PassiveAPCount <= + if (LC_OperData.ARTPtr[APNumber].PassiveAPCount <= LC_OperData.ADTPtr[APNumber].MaxPassiveEvents) - { + { CFE_EVS_SendEvent(LC_AP_PASSIVE_FAIL_INF_EID, CFE_EVS_INFORMATION, "AP failed while passive: AP = %d, FailCount = %d, RTS = %d", APNumber, - LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, + (int)LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, LC_OperData.ADTPtr[APNumber].RTSId); + LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent++; } } @@ -373,6 +260,7 @@ void LC_SampleSingleAP(uint16 APNumber) CFE_EVS_SendEvent(LC_AP_FAILTOPASS_INF_EID, CFE_EVS_INFORMATION, "AP state change from FAIL to PASS: AP = %d", APNumber); + LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent++; } } /* @@ -598,7 +486,7 @@ uint8 LC_EvaluateRPN(uint16 APNumber) { CFE_EVS_SendEvent(LC_INVALID_RPN_ERR_EID, CFE_EVS_ERROR, "AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d", - APNumber, (RPNEquationPtr - 1), StackPtr); + APNumber, (int)(RPNEquationPtr - 1), (int)StackPtr); EvalResult = LC_ACTION_ERROR; } @@ -732,13 +620,13 @@ int32 LC_ValidateADT(void *TableData) { CFE_EVS_SendEvent(LC_ADTVAL_RPNERR_EID, CFE_EVS_ERROR, "ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d", - TableIndex, RPNIndex, RPNStackDepth); + (int)TableIndex, (int)RPNIndex, (int)RPNStackDepth); } else { CFE_EVS_SendEvent(LC_ADTVAL_ERR_EID, CFE_EVS_ERROR, "ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d", - TableIndex, EntryResult, DefaultState, RTSId, MaxFailsBeforeRTS, EventType ); + (int)TableIndex, (int)EntryResult, DefaultState, RTSId, MaxFailsBeforeRTS, EventType ); } TableResult = EntryResult; @@ -751,7 +639,7 @@ int32 LC_ValidateADT(void *TableData) */ CFE_EVS_SendEvent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, "ADT verify results: good = %d, bad = %d, unused = %d", - GoodCount, BadCount, UnusedCount); + (int)GoodCount, (int)BadCount, (int)UnusedCount); return(TableResult); diff --git a/fsw/src/lc_action.h b/fsw/src/lc_action.h index fcaeeb3..f4bd596 100644 --- a/fsw/src/lc_action.h +++ b/fsw/src/lc_action.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_action.h 1.2 2015/03/04 16:09:56EST sstrege Exp $ +** $Id: lc_action.h 1.4 2017/01/22 17:24:52EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -17,17 +17,6 @@ ** ** Notes: ** -** $Log: lc_action.h $ -** Revision 1.2 2015/03/04 16:09:56EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:36EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.2 2011/02/07 17:58:22EST lwalling -** Modify sample AP commands to target groups of AP's -** Revision 1.1 2008/10/29 14:18:48EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** **************************************************************************/ #ifndef _lc_action_ @@ -106,6 +95,85 @@ void LC_SampleAPs(uint16 StartIndex, uint16 EndIndex); ** *************************************************************************/ int32 LC_ValidateADT(void *TableData); + +/************************************************************************/ +/** \brief Sample single actionpoint +** +** \par Description +** Support function for actionpoint processing that will sample +** a single actionpoint and handle the result as needed +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] APNumber The actionpoint number to sample (zero +** based actionpoint definition table index) +** +*************************************************************************/ +void LC_SampleSingleAP(uint16 APNumber); + +/************************************************************************/ +/** \brief Evaluate RPN +** +** \par Description +** Support function for actionpoint processing that evaluates +** the reverse polish notation (RPN) equation for the specified +** actionpoint and returns the result +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] APNumber The actionpoint number to evaluate (zero +** based actionpoint definition table index) +** +** \returns +** \retcode #LC_ACTION_PASS \retdesc \copydoc LC_ACTION_PASS \endcode +** \retcode #LC_ACTION_FAIL \retdesc \copydoc LC_ACTION_FAIL \endcode +** \retcode #LC_ACTION_STALE \retdesc \copydoc LC_ACTION_STALE \endcode +** \retcode #LC_ACTION_ERROR \retdesc \copydoc LC_ACTION_ERROR \endcode +** \endreturns +** +*************************************************************************/ +uint8 LC_EvaluateRPN(uint16 APNumber); + +/************************************************************************/ +/** \brief Validate RPN expression +** +** \par Description +** Support function for actionpoint definition table validation +** that checks a reverse polish notation (RPN) equation for +** possible errors. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] RPNPtr Pointer to the RPN equation +** +** \param [in] IndexValue A pointer where to store the equation +** index value if an error is detected +** +** \param [in] StackDepthValue A pointer where to store the equation +** stack depth value if an error is detected +** +** \param [out] *IndexValue Equation index value where error was +** found. Not modified if return code is +** #LC_ADTVAL_NO_ERR +** +** \param [out] *StackDepthValue Equation stack depth value where error +** found. Not modified if return code is +** #LC_ADTVAL_NO_ERR +** +** \returns +** \retcode #LC_ADTVAL_NO_ERR \retdesc \copydoc LC_ADTVAL_NO_ERR \endcode +** \retcode #LC_ADTVAL_ERR_RPN \retdesc \copydoc LC_ADTVAL_ERR_RPN \endcode +** \endreturns +** +** \sa #LC_ValidateADT +** +*************************************************************************/ +int32 LC_ValidateRPN(uint16 *RPNPtr, + int32 *IndexValue, + int32 *StackDepthValue); #endif /* _lc_action_ */ diff --git a/fsw/src/lc_app.c b/fsw/src/lc_app.c index b97d7dc..5fe0315 100644 --- a/fsw/src/lc_app.c +++ b/fsw/src/lc_app.c @@ -1,8 +1,8 @@ /************************************************************************ ** File: -** $Id: lc_app.c 1.1.1.2 2015/03/04 16:15:46EST sstrege Exp $ +** $Id: lc_app.c 1.7 2017/01/22 17:24:23EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -16,52 +16,6 @@ ** that provides telemetry monitoring and autonomous response ** capabilities to Core Flight Executive (cFE) based systems. ** -** $Log: lc_app.c $ -** Revision 1.1.1.2 2015/03/04 16:15:46EST sstrege -** Added copyright information -** Revision 1.1.1.1 2012/10/01 18:35:45EDT lwalling -** Apply changes to branch -** Revision 1.2 2012/10/01 13:23:59PDT lwalling -** Added local variable to avoid comparing 2 macros in function LC_CreateTaskCDS() -** Revision 1.1 2012/07/31 13:53:36PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.16 2011/10/04 17:00:30EDT lwalling -** Must load AP def table before init AP results table -** Revision 1.15 2011/06/08 16:07:40EDT lwalling -** Change call from LC_SubscribeWP() to LC_CreateHashTable() -** Revision 1.14 2011/03/10 14:11:10EST lwalling -** Cleanup use of debug events during task startup -** Revision 1.13 2011/03/02 10:53:23EST lwalling -** Explicitly state return value when known to be CFE_SUCCESS -** Revision 1.12 2011/03/01 15:38:50EST lwalling -** Cleanup local function prototypes, move LC_SubscribeWP() and LC_UpdateTaskCDS() to lc_cmds.c -** Revision 1.11 2011/03/01 09:35:30EST lwalling -** Modified startup logic re use of CDS and critical tables -** Revision 1.10 2011/02/14 16:57:13EST lwalling -** Created LC_StartedNoCDS() to clear results tables after CDS load error -** Revision 1.9 2011/01/19 11:32:06EST jmdagost -** Moved mission revision number from lc_version.h to lc_platform_cfg.h. -** Revision 1.8 2010/03/08 10:37:09EST lwalling -** Move saved, not saved state definitions to common header file -** Revision 1.7 2009/06/12 14:17:23EDT rmcgraw -** DCR82191:1 Changed OS_Mem function calls to CFE_PSP_Mem -** Revision 1.6 2009/02/23 11:15:10EST dahardis -** Added code to update the application data in the CDS on -** application startup after the "saved on exit" flag is reset -** (see DCR 7084) -** Revision 1.5 2009/01/15 15:36:11EST dahardis -** Unit test fixes -** Revision 1.4 2008/12/10 15:34:07EST dahardis -** Altered CDS restoration processing according to -** DCR 4680 -** Revision 1.3 2008/12/10 09:38:33EST dahardis -** Fixed calls to CFE_TBL_GetAddress (DCR #4699) -** Revision 1.2 2008/12/03 13:59:44EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:18:51EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ @@ -86,180 +40,6 @@ LC_OperData_t LC_OperData; LC_AppData_t LC_AppData; -/************************************************************************ -** Local Function Prototypes -*************************************************************************/ -/************************************************************************/ -/** \brief Initialize the CFS Limit Checker (LC) application -** -** \par Description -** Limit Checker application initialization routine. This -** function performs all the required startup steps to -** initialize (or restore from CDS) LC data structures and get -** the application registered with the cFE services so it can -** begin to receive command messages. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode -** \retstmt Return codes from #LC_EvsInit \endcode -** \retstmt Return codes from #LC_SbInit \endcode -** \retstmt Return codes from #LC_InitFromCDS \endcode -** \retstmt Return codes from #LC_InitNoCDS \endcode -** \endreturns -** -*************************************************************************/ -int32 LC_AppInit(void); - -/************************************************************************/ -/** \brief Initialize Event Services -** -** \par Description -** This function performs the steps required to setup -** cFE Events Services for use by the LC application -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode -** \retstmt Return codes from #CFE_EVS_Register \endcode -** \endreturns -** -*************************************************************************/ -int32 LC_EvsInit(void); - -/************************************************************************/ -/** \brief Initialize Software Bus -** -** \par Description -** This function performs the steps required to setup the -** cFE software bus for use by the LC application -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode -** \retstmt Return codes from #CFE_SB_CreatePipe \endcode -** \retstmt Return codes from #CFE_SB_Subscribe \endcode -** \endreturns -** -*************************************************************************/ -int32 LC_SbInit(void); - -/************************************************************************/ -/** \brief Initialize Table Services (includes CDS) -** -** \par Description -** This function creates the tables used by the LC application and -** establishes the initial table values based on the configuration -** setting that enables the use of Critical Data Store (CDS) and -** the availability of stored data to restore. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode -** \retstmt Return codes from #LC_CreateResultTables \endcode -** \retstmt Return codes from #LC_CreateDefinitionTables \endcode -** \retstmt Return codes from #LC_LoadDefaultTables \endcode -** \retstmt Return codes from #CFE_TBL_GetAddress \endcode -** \endreturns -** -** \sa #LC_SAVE_TO_CDS -** -*************************************************************************/ -int32 LC_TableInit(void); - -/************************************************************************/ -/** \brief Create Watchpoint and Actionpoint Result Tables -** -** \par Description -** This function creates the dump only result tables used by the LC -** application. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode -** \retstmt Return codes from #CFE_TBL_Register \endcode -** \retstmt Return codes from #CFE_TBL_GetAddress \endcode -** \endreturns -** -** \sa #LC_TableInit -** -*************************************************************************/ -int32 LC_CreateResultTables(void); - -/************************************************************************/ -/** \brief Create Watchpoint and Actionpoint Definition Tables -** -** \par Description -** This function creates the loadable definition tables used by the -** LC application. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode -** \retstmt Return codes from #CFE_TBL_Register \endcode -** \endreturns -** -** \sa #LC_TableInit -** -*************************************************************************/ -int32 LC_CreateDefinitionTables(void); - -/************************************************************************/ -/** \brief Create Result Table and Application Data CDS Areas -** -** \par Description -** This function creates the loadable definition tables used by the -** LC application. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode -** \retstmt Return codes from #CFE_ES_RegisterCDS \endcode -** \endreturns -** -** \sa #LC_TableInit -** -*************************************************************************/ -int32 LC_CreateTaskCDS(void); - -/************************************************************************/ -/** \brief Load Default Table Values -** -** \par Description -** This function loads the definition tables from table files named -** in the LC platform configuration header file. The function also -** initializes the contents of the dump only results tables and -** initializes the global application data structure. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \returns -** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode -** \retstmt Return codes from #CFE_TBL_Load \endcode -** \endreturns -** -** \sa #LC_TableInit -** -*************************************************************************/ -int32 LC_LoadDefaultTables(void); - - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* LC application entry point and main process loop */ @@ -270,7 +50,6 @@ void LC_AppMain(void) { int32 Status = CFE_SUCCESS; uint32 RunStatus = CFE_ES_APP_RUN; - boolean initSuccess = TRUE; /* ** Performance Log, Start @@ -299,12 +78,6 @@ void LC_AppMain(void) ** Set run status to terminate main loop */ RunStatus = CFE_ES_APP_ERROR; - - /* - ** Set flag that init failed so we don't - ** attempt application cleanup before exit - */ - initSuccess = FALSE; } /* @@ -359,12 +132,12 @@ void LC_AppMain(void) ** Send an event describing the reason for the termination */ CFE_EVS_SendEvent(LC_TASK_EXIT_EID, CFE_EVS_CRITICAL, - "Task terminating, err = 0x%08X", Status); + "Task terminating, err = 0x%08X", (unsigned int)Status); /* ** In case cFE Event Services is not working */ - CFE_ES_WriteToSysLog("LC task terminating, err = 0x%08X\n", Status); + CFE_ES_WriteToSysLog("LC task terminating, err = 0x%08X\n", (unsigned int)Status); } /* @@ -470,7 +243,7 @@ int32 LC_EvsInit(void) if (Status != CFE_SUCCESS) { - CFE_ES_WriteToSysLog("LC App: Error Registering For Event Services, RC = 0x%08X\n", Status); + CFE_ES_WriteToSysLog("LC App: Error Registering For Event Services, RC = 0x%08X\n", (unsigned int)Status); return (Status); } @@ -508,7 +281,7 @@ int32 LC_SbInit(void) if (Status != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_CR_PIPE_ERR_EID, CFE_EVS_ERROR, - "Error Creating LC Pipe, RC=0x%08X", Status); + "Error Creating LC Pipe, RC=0x%08X", (unsigned int)Status); return(Status); } @@ -520,7 +293,7 @@ int32 LC_SbInit(void) { CFE_EVS_SendEvent(LC_SUB_HK_REQ_ERR_EID, CFE_EVS_ERROR, "Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X", - LC_SEND_HK_MID, Status); + LC_SEND_HK_MID, (unsigned int)Status); return(Status); } @@ -532,7 +305,7 @@ int32 LC_SbInit(void) { CFE_EVS_SendEvent(LC_SUB_GND_CMD_ERR_EID, CFE_EVS_ERROR, "Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X", - LC_CMD_MID, Status); + LC_CMD_MID, (unsigned int)Status); return(Status); } @@ -544,7 +317,7 @@ int32 LC_SbInit(void) { CFE_EVS_SendEvent(LC_SUB_SAMPLE_CMD_ERR_EID, CFE_EVS_ERROR, "Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X", - LC_SAMPLE_AP_MID, Status); + LC_SAMPLE_AP_MID, (unsigned int)Status); return(Status); } @@ -664,7 +437,7 @@ int32 LC_TableInit(void) if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) { CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, - "Error getting WDT address, RC=0x%08X", Result); + "Error getting WDT address, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -676,7 +449,7 @@ int32 LC_TableInit(void) if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) { CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, - "Error getting ADT address, RC=0x%08X", Result); + "Error getting ADT address, RC=0x%08X", (unsigned int)Result); return(Result); } } @@ -707,14 +480,15 @@ int32 LC_TableInit(void) { CFE_EVS_SendEvent(LC_CDS_UPDATED_INF_EID, CFE_EVS_INFORMATION, "Default state loaded and written to CDS, activity mask = 0x%08X", - LC_OperData.TableResults); - } - else - { - CFE_EVS_SendEvent(LC_CDS_DISABLED_INF_EID, CFE_EVS_INFORMATION, - "LC use of Critical Data Store disabled, activity mask = 0x%08X", - LC_OperData.TableResults); + (unsigned int)LC_OperData.TableResults); } + + } + else + { + CFE_EVS_SendEvent(LC_CDS_DISABLED_INF_EID, CFE_EVS_INFORMATION, + "LC use of Critical Data Store disabled, activity mask = 0x%08X", + (unsigned int)LC_OperData.TableResults); } return(CFE_SUCCESS); @@ -749,7 +523,7 @@ int32 LC_CreateResultTables(void) if (Result != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_WRT_REGISTER_ERR_EID, CFE_EVS_ERROR, - "Error registering WRT, RC=0x%08X", Result); + "Error registering WRT, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -758,7 +532,7 @@ int32 LC_CreateResultTables(void) if (Result != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_WRT_GETADDR_ERR_EID, CFE_EVS_ERROR, - "Error getting WRT address, RC=0x%08X", Result); + "Error getting WRT address, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -774,7 +548,7 @@ int32 LC_CreateResultTables(void) if (Result != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_ART_REGISTER_ERR_EID, CFE_EVS_ERROR, - "Error registering ART, RC=0x%08X", Result); + "Error registering ART, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -783,7 +557,7 @@ int32 LC_CreateResultTables(void) if (Result != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_ART_GETADDR_ERR_EID, CFE_EVS_ERROR, - "Error getting ART address, RC=0x%08X", Result); + "Error getting ART address, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -805,12 +579,6 @@ int32 LC_CreateDefinitionTables(void) int32 Result; uint32 DataSize; uint32 OptionFlags; - boolean HadActiveCDS; - - /* - ** Initial state of table restoration - */ - HadActiveCDS = LC_OperData.HaveActiveCDS; /* ** If CDS is still enabled, try to register the 2 definition tables as critical @@ -867,7 +635,7 @@ int32 LC_CreateDefinitionTables(void) ** Task initialization fails without this table */ CFE_EVS_SendEvent(LC_WDT_REGISTER_ERR_EID, CFE_EVS_ERROR, - "Error registering WDT, RC=0x%08X", Result); + "Error registering WDT, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -913,7 +681,7 @@ int32 LC_CreateDefinitionTables(void) ** Task initialization fails without this table */ CFE_EVS_SendEvent(LC_ADT_REGISTER_ERR_EID, CFE_EVS_ERROR, - "Error registering ADT, RC=0x%08X", Result); + "Error registering ADT, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -945,7 +713,7 @@ int32 LC_CreateDefinitionTables(void) ** Task initialization fails without this table */ CFE_EVS_SendEvent(LC_WDT_REREGISTER_ERR_EID, CFE_EVS_ERROR, - "Error re-registering WDT, RC=0x%08X", Result); + "Error re-registering WDT, RC=0x%08X", (unsigned int)Result); return(Result); } } @@ -965,7 +733,6 @@ int32 LC_CreateTaskCDS(void) { int32 Result; uint32 DataSize; - uint8 RestoredLCState; /* ** Create CDS and try to restore Watchpoint Results Table (WRT) data @@ -997,7 +764,7 @@ int32 LC_CreateTaskCDS(void) else { CFE_EVS_SendEvent(LC_WRT_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, - "Error registering WRT CDS Area, RC=0x%08X", Result); + "Error registering WRT CDS Area, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -1031,7 +798,7 @@ int32 LC_CreateTaskCDS(void) else { CFE_EVS_SendEvent(LC_ART_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, - "Error registering ART CDS Area, RC=0x%08X", Result); + "Error registering ART CDS Area, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -1067,17 +834,16 @@ int32 LC_CreateTaskCDS(void) /* ** May need to override the restored application state */ - RestoredLCState = LC_STATE_WHEN_CDS_RESTORED; - if (RestoredLCState != LC_STATE_FROM_CDS) - { - LC_AppData.CurrentLCState = RestoredLCState; - } + +#if LC_STATE_WHEN_CDS_RESTORED != LC_STATE_FROM_CDS + LC_AppData.CurrentLCState = LC_STATE_WHEN_CDS_RESTORED; +#endif } } else { CFE_EVS_SendEvent(LC_APP_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, - "Error registering application data CDS Area, RC=0x%08X", Result); + "Error registering application data CDS Area, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -1111,7 +877,7 @@ int32 LC_LoadDefaultTables(void) ** Task initialization fails without this table */ CFE_EVS_SendEvent(LC_WDT_LOAD_ERR_EID, CFE_EVS_ERROR, - "Error (RC=0x%08X) Loading WDT with '%s'", Result, LC_WDT_FILENAME); + "Error (RC=0x%08X) Loading WDT with '%s'", (unsigned int)Result, LC_WDT_FILENAME); return(Result); } @@ -1123,7 +889,7 @@ int32 LC_LoadDefaultTables(void) if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) { CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, - "Error getting WDT address, RC=0x%08X", Result); + "Error getting WDT address, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -1142,7 +908,7 @@ int32 LC_LoadDefaultTables(void) ** Task initialization fails without this table */ CFE_EVS_SendEvent(LC_ADT_LOAD_ERR_EID, CFE_EVS_ERROR, - "Error (RC=0x%08X) Loading ADT with '%s'", Result, LC_ADT_FILENAME); + "Error (RC=0x%08X) Loading ADT with '%s'", (unsigned int)Result, LC_ADT_FILENAME); return(Result); } @@ -1154,7 +920,7 @@ int32 LC_LoadDefaultTables(void) if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) { CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, - "Error getting ADT address, RC=0x%08X", Result); + "Error getting ADT address, RC=0x%08X", (unsigned int)Result); return(Result); } diff --git a/fsw/src/lc_app.h b/fsw/src/lc_app.h index d1612c7..99246f6 100644 --- a/fsw/src/lc_app.h +++ b/fsw/src/lc_app.h @@ -1,8 +1,8 @@ /************************************************************************ ** File: -** $Id: lc_app.h 1.2 2015/03/04 16:09:50EST sstrege Exp $ +** $Id: lc_app.h 1.4 2017/01/22 17:24:19EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -17,26 +17,6 @@ ** ** Notes: ** -** $Log: lc_app.h $ -** Revision 1.2 2015/03/04 16:09:50EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:37EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.6 2011/06/08 16:06:15EDT lwalling -** Removed WPsInUse and subscription vars, added hash table definitions and link data arrays -** Revision 1.5 2011/03/10 14:12:57EST lwalling -** Cleanup use of debug events during task startup -** Revision 1.4 2011/03/01 09:35:47EST lwalling -** Modified startup logic re use of CDS and critical tables -** Revision 1.3 2008/12/10 10:58:35EST dahardis -** Modified header includes to include lc_tbl.h -** instead of lc_tbldefs.h -** Revision 1.2 2008/12/03 13:59:40EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:18:59EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ #ifndef _lc_app_ @@ -240,6 +220,175 @@ extern LC_AppData_t LC_AppData; *************************************************************************/ void LC_AppMain(void); +/************************************************************************/ +/** \brief Initialize the CFS Limit Checker (LC) application +** +** \par Description +** Limit Checker application initialization routine. This +** function performs all the required startup steps to +** initialize (or restore from CDS) LC data structures and get +** the application registered with the cFE services so it can +** begin to receive command messages. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode +** \retstmt Return codes from #LC_EvsInit \endcode +** \retstmt Return codes from #LC_SbInit \endcode +** \retstmt Return codes from #LC_InitFromCDS \endcode +** \retstmt Return codes from #LC_InitNoCDS \endcode +** \endreturns +** +*************************************************************************/ +int32 LC_AppInit(void); + +/************************************************************************/ +/** \brief Initialize Event Services +** +** \par Description +** This function performs the steps required to setup +** cFE Events Services for use by the LC application +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode +** \retstmt Return codes from #CFE_EVS_Register \endcode +** \endreturns +** +*************************************************************************/ +int32 LC_EvsInit(void); + +/************************************************************************/ +/** \brief Initialize Software Bus +** +** \par Description +** This function performs the steps required to setup the +** cFE software bus for use by the LC application +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode +** \retstmt Return codes from #CFE_SB_CreatePipe \endcode +** \retstmt Return codes from #CFE_SB_Subscribe \endcode +** \endreturns +** +*************************************************************************/ +int32 LC_SbInit(void); + +/************************************************************************/ +/** \brief Initialize Table Services (includes CDS) +** +** \par Description +** This function creates the tables used by the LC application and +** establishes the initial table values based on the configuration +** setting that enables the use of Critical Data Store (CDS) and +** the availability of stored data to restore. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode +** \retstmt Return codes from #LC_CreateResultTables \endcode +** \retstmt Return codes from #LC_CreateDefinitionTables \endcode +** \retstmt Return codes from #LC_LoadDefaultTables \endcode +** \retstmt Return codes from #CFE_TBL_GetAddress \endcode +** \endreturns +** +** \sa #LC_SAVE_TO_CDS +** +*************************************************************************/ +int32 LC_TableInit(void); + +/************************************************************************/ +/** \brief Create Watchpoint and Actionpoint Result Tables +** +** \par Description +** This function creates the dump only result tables used by the LC +** application. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode +** \retstmt Return codes from #CFE_TBL_Register \endcode +** \retstmt Return codes from #CFE_TBL_GetAddress \endcode +** \endreturns +** +** \sa #LC_TableInit +** +*************************************************************************/ +int32 LC_CreateResultTables(void); + +/************************************************************************/ +/** \brief Create Watchpoint and Actionpoint Definition Tables +** +** \par Description +** This function creates the loadable definition tables used by the +** LC application. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode +** \retstmt Return codes from #CFE_TBL_Register \endcode +** \endreturns +** +** \sa #LC_TableInit +** +*************************************************************************/ +int32 LC_CreateDefinitionTables(void); + +/************************************************************************/ +/** \brief Create Result Table and Application Data CDS Areas +** +** \par Description +** This function creates the loadable definition tables used by the +** LC application. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode +** \retstmt Return codes from #CFE_ES_RegisterCDS \endcode +** \endreturns +** +** \sa #LC_TableInit +** +*************************************************************************/ +int32 LC_CreateTaskCDS(void); + +/************************************************************************/ +/** \brief Load Default Table Values +** +** \par Description +** This function loads the definition tables from table files named +** in the LC platform configuration header file. The function also +** initializes the contents of the dump only results tables and +** initializes the global application data structure. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \returns +** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode +** \retstmt Return codes from #CFE_TBL_Load \endcode +** \endreturns +** +** \sa #LC_TableInit +** +*************************************************************************/ +int32 LC_LoadDefaultTables(void); + #endif /* _lc_app_ */ /************************/ diff --git a/fsw/src/lc_cmds.c b/fsw/src/lc_cmds.c index 33d7f06..7ec337d 100644 --- a/fsw/src/lc_cmds.c +++ b/fsw/src/lc_cmds.c @@ -1,8 +1,8 @@ /************************************************************************ ** File: -** $Id: lc_cmds.c 1.6 2015/03/04 16:09:55EST sstrege Exp $ +** $Id: lc_cmds.c 1.6 2017/05/07 23:59:05EDT mdeschu Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -14,53 +14,6 @@ ** Purpose: ** CFS Limit Checker (LC) command handling routines ** -** $Log: lc_cmds.c $ -** Revision 1.6 2015/03/04 16:09:55EST sstrege -** Added copyright information -** Revision 1.5 2012/08/22 17:17:02EDT lwalling -** Modified true to false transition monitor to also accept stale to false -** Revision 1.4 2012/08/01 14:03:03PDT lwalling -** Add age WP results option to AP sample command -** Revision 1.3 2012/08/01 12:40:48PDT lwalling -** Add STALE counters to watchpoint definition and result tables -** Revision 1.2 2012/08/01 11:20:12PDT lwalling -** Change NOT_MEASURED to STALE -** Revision 1.1 2012/07/31 13:53:37PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.15 2011/06/08 16:11:29EDT lwalling -** Changed call from LC_SubscribeWP() to LC_CreateHashTable(), removed function LC_SubscribeWP() -** Revision 1.14 2011/03/02 10:53:35EST lwalling -** Explicitly state return value when known to be CFE_SUCCESS -** Revision 1.13 2011/03/01 15:42:08EST lwalling -** Fix typo in manage function, move LC_SubscribeWP() and LC_UpdateTaskCDS() to lc_cmds.c -** Revision 1.12 2011/03/01 09:37:34EST lwalling -** Modified table management logic and updates to CDS -** Revision 1.11 2011/02/14 16:53:21EST lwalling -** Created LC_ResetResultsAP() and LC_ResetResultsWP(), modified reset stats cmd handlers to call them -** Revision 1.10 2011/02/07 17:58:12EST lwalling -** Modify sample AP commands to target groups of AP's -** Revision 1.9 2011/01/19 11:32:07EST jmdagost -** Moved mission revision number from lc_version.h to lc_platform_cfg.h. -** Revision 1.8 2010/03/01 11:12:10EST lwalling -** Set data saved state flag whenever critical data is stored -** Revision 1.7 2010/02/23 12:12:01EST lwalling -** Add PassiveAPCount to list of AP results cleared by command -** Revision 1.6 2010/01/04 14:10:03EST lwalling -** Update CDS when report housekeeping -** Revision 1.5 2009/01/15 15:36:14EST dahardis -** Unit test fixes -** Revision 1.4 2009/01/09 11:34:53EST dahardis -** Fixed call to CFE_TBL_GetAddress for the Actionpoint Definition Table that was -** passing in the wrong table handle, causing the Actionpoint Results Table to be -** initialized incorrectly. -** Revision 1.3 2008/12/10 09:38:36EST dahardis -** Fixed calls to CFE_TBL_GetAddress (DCR #4699) -** Revision 1.2 2008/12/03 13:59:34EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:03EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ @@ -76,202 +29,6 @@ #include "lc_watch.h" #include "lc_platform_cfg.h" -/************************************************************************ -** Local function prototypes -*************************************************************************/ -/************************************************************************/ -/** \brief Sample actionpoints request -** -** \par Description -** Processes an on-board sample actionpoints request message. -** -** \par Assumptions, External Events, and Notes: -** This message does not affect the command execution counter -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -*************************************************************************/ -void LC_SampleAPReq(CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Housekeeping request -** -** \par Description -** Processes an on-board housekeeping request message. -** -** \par Assumptions, External Events, and Notes: -** This message does not affect the command execution counter -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -** \returns -** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode -** \retstmt Return codes from #LC_AcquirePointers \endcode -** \endreturns -** -*************************************************************************/ -int32 LC_HousekeepingReq(CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Noop command -** -** \par Description -** Processes a noop ground command. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -** \sa #LC_NOOP_CC -** -*************************************************************************/ -void LC_NoopCmd(CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Reset counters command -** -** \par Description -** Processes a reset counters ground command which will reset -** the following LC application counters to zero: -** - Command counter -** - Command error counter -** - Actionpoint sample counter -** - Monitored message counter -** - RTS execution counter -** - Passive RTS execution counter -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -** \sa #LC_RESET_CC -** -*************************************************************************/ -void LC_ResetCmd(CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Set LC state command -** -** \par Description -** Processes a set LC application state ground command. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -** \sa #LC_SET_LC_STATE_CC -** -*************************************************************************/ -void LC_SetLCStateCmd(CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Set AP state command -** -** \par Description -** Processes a set actionpoint state ground command. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -** \sa #LC_SET_AP_STATE_CC -** -*************************************************************************/ -void LC_SetAPStateCmd(CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Set AP permanently off command -** -** \par Description -** Processes a set actionpoint permanently off ground command. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -** \sa #LC_SET_AP_PERMOFF_CC -** -*************************************************************************/ -void LC_SetAPPermOffCmd(CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Reset AP statistics command -** -** \par Description -** Processes a reset actionpoint statistics ground command. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -** \sa #LC_RESET_AP_STATS_CC -** -*************************************************************************/ -void LC_ResetAPStatsCmd(CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Reset WP statistics command -** -** \par Description -** Processes a reset watchpoint statistics ground command. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -** \sa #LC_RESET_WP_STATS_CC -** -*************************************************************************/ -void LC_ResetWPStatsCmd(CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Verify message length -** -** \par Description -** Checks if the actual length of a software bus message matches -** the expected length and sends an error event if a mismatch -** occures -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] msg A #CFE_SB_MsgPtr_t pointer that -** references the software bus message -** -** \param [in] ExpectedLength The expected length of the message -** based upon the command code -** -** \returns -** \retstmt Returns TRUE if the length is as expected \endcode -** \retstmt Returns FALSE if the length is not as expected \endcode -** \endreturns -** -** \sa #LC_LEN_ERR_EID -** -*************************************************************************/ -boolean LC_VerifyMsgLength(CFE_SB_MsgPtr_t msg, - uint16 ExpectedLength); - -int32 LC_ManageTables(void); - - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* Process a command pipe message */ @@ -1149,6 +906,7 @@ void LC_ResetResultsAP(uint32 StartIndex, uint32 EndIndex, boolean ResetStatsCmd LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount = 0; LC_OperData.ARTPtr[TableIndex].CumulativeFailCount = 0; LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount = 0; + LC_OperData.ARTPtr[TableIndex].CumulativeEventMsgsSent = 0; } return; @@ -1345,7 +1103,7 @@ int32 LC_ManageTables(void) else if (Result != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, - "Error getting WDT address, RC=0x%08X", Result); + "Error getting WDT address, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -1361,7 +1119,7 @@ int32 LC_ManageTables(void) else if (Result != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, - "Error getting ADT address, RC=0x%08X", Result); + "Error getting ADT address, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -1388,7 +1146,7 @@ int32 LC_UpdateTaskCDS(void) if (Result != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_WRT_NO_SAVE_ERR_EID, CFE_EVS_ERROR, - "Unable to update watchpoint results in CDS, RC=0x%08X", Result); + "Unable to update watchpoint results in CDS, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -1400,7 +1158,7 @@ int32 LC_UpdateTaskCDS(void) if (Result != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_ART_NO_SAVE_ERR_EID, CFE_EVS_ERROR, - "Unable to update actionpoint results in CDS, RC=0x%08X", Result); + "Unable to update actionpoint results in CDS, RC=0x%08X", (unsigned int)Result); return(Result); } @@ -1417,7 +1175,7 @@ int32 LC_UpdateTaskCDS(void) if (Result != CFE_SUCCESS) { CFE_EVS_SendEvent(LC_APP_NO_SAVE_START_ERR_EID, CFE_EVS_ERROR, - "Unable to update application data in CDS, RC=0x%08X", Result); + "Unable to update application data in CDS, RC=0x%08X", (unsigned int)Result); return(Result); } diff --git a/fsw/src/lc_cmds.h b/fsw/src/lc_cmds.h index 49fe558..0300551 100644 --- a/fsw/src/lc_cmds.h +++ b/fsw/src/lc_cmds.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_cmds.h 1.2 2015/03/04 16:09:54EST sstrege Exp $ +** $Id: lc_cmds.h 1.4 2017/01/22 17:24:53EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -17,23 +17,6 @@ ** ** Notes: ** -** $Log: lc_cmds.h $ -** Revision 1.2 2015/03/04 16:09:54EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:37EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.5 2011/06/08 16:00:21EDT lwalling -** Remove prototype for LC_SubscribeWP() -** Revision 1.4 2011/03/01 15:40:49EST lwalling -** Move prototypes for LC_SubscribeWP() and LC_UpdateTaskCDS() to lc_cmds.h -** Revision 1.3 2011/03/01 09:37:46EST lwalling -** Modified table management logic and updates to CDS -** Revision 1.2 2011/02/14 16:50:55EST lwalling -** Added prototypes for LC_ResetResultsAP() and LC_ResetResultsWP() -** Revision 1.1 2008/10/29 14:19:06EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** **************************************************************************/ #ifndef _lc_cmds_ @@ -140,6 +123,197 @@ void LC_ResetResultsWP(uint32 StartIndex, uint32 EndIndex, boolean ResetCmd); *************************************************************************/ int32 LC_UpdateTaskCDS(void); +/************************************************************************/ +/** \brief Sample actionpoints request +** +** \par Description +** Processes an on-board sample actionpoints request message. +** +** \par Assumptions, External Events, and Notes: +** This message does not affect the command execution counter +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +*************************************************************************/ +void LC_SampleAPReq(CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Housekeeping request +** +** \par Description +** Processes an on-board housekeeping request message. +** +** \par Assumptions, External Events, and Notes: +** This message does not affect the command execution counter +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +** \returns +** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode +** \retstmt Return codes from #LC_AcquirePointers \endcode +** \endreturns +** +*************************************************************************/ +int32 LC_HousekeepingReq(CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Noop command +** +** \par Description +** Processes a noop ground command. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +** \sa #LC_NOOP_CC +** +*************************************************************************/ +void LC_NoopCmd(CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Reset counters command +** +** \par Description +** Processes a reset counters ground command which will reset +** the following LC application counters to zero: +** - Command counter +** - Command error counter +** - Actionpoint sample counter +** - Monitored message counter +** - RTS execution counter +** - Passive RTS execution counter +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +** \sa #LC_RESET_CC +** +*************************************************************************/ +void LC_ResetCmd(CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Set LC state command +** +** \par Description +** Processes a set LC application state ground command. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +** \sa #LC_SET_LC_STATE_CC +** +*************************************************************************/ +void LC_SetLCStateCmd(CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Set AP state command +** +** \par Description +** Processes a set actionpoint state ground command. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +** \sa #LC_SET_AP_STATE_CC +** +*************************************************************************/ +void LC_SetAPStateCmd(CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Set AP permanently off command +** +** \par Description +** Processes a set actionpoint permanently off ground command. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +** \sa #LC_SET_AP_PERMOFF_CC +** +*************************************************************************/ +void LC_SetAPPermOffCmd(CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Reset AP statistics command +** +** \par Description +** Processes a reset actionpoint statistics ground command. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +** \sa #LC_RESET_AP_STATS_CC +** +*************************************************************************/ +void LC_ResetAPStatsCmd(CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Reset WP statistics command +** +** \par Description +** Processes a reset watchpoint statistics ground command. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +** \sa #LC_RESET_WP_STATS_CC +** +*************************************************************************/ +void LC_ResetWPStatsCmd(CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Verify message length +** +** \par Description +** Checks if the actual length of a software bus message matches +** the expected length and sends an error event if a mismatch +** occures +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] msg A #CFE_SB_MsgPtr_t pointer that +** references the software bus message +** +** \param [in] ExpectedLength The expected length of the message +** based upon the command code +** +** \returns +** \retstmt Returns TRUE if the length is as expected \endcode +** \retstmt Returns FALSE if the length is not as expected \endcode +** \endreturns +** +** \sa #LC_LEN_ERR_EID +** +*************************************************************************/ +boolean LC_VerifyMsgLength(CFE_SB_MsgPtr_t msg, + uint16 ExpectedLength); + +int32 LC_ManageTables(void); + #endif /* _lc_cmds_ */ /************************/ diff --git a/fsw/src/lc_custom.c b/fsw/src/lc_custom.c index 3f49309..03339bb 100644 --- a/fsw/src/lc_custom.c +++ b/fsw/src/lc_custom.c @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_custom.c 1.2 2015/03/04 16:09:52EST sstrege Exp $ +** $Id: lc_custom.c 1.3 2017/01/22 17:24:49EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -15,19 +15,6 @@ ** CFS Limit Checker (LC) mission specific code, including the ** custom function template. ** -** $Log: lc_custom.c $ -** Revision 1.2 2015/03/04 16:09:52EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:38EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.3 2009/12/18 14:48:28EST lwalling -** Update local copy of SC start RTS command packet -** Revision 1.2 2008/12/03 13:59:43EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:08EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ diff --git a/fsw/src/lc_custom.h b/fsw/src/lc_custom.h index 05af123..f83029f 100644 --- a/fsw/src/lc_custom.h +++ b/fsw/src/lc_custom.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_custom.h 1.2 2015/03/04 16:09:52EST sstrege Exp $ +** $Id: lc_custom.h 1.3 2017/01/22 17:24:48EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -17,17 +17,6 @@ ** ** Notes: ** -** $Log: lc_custom.h $ -** Revision 1.2 2015/03/04 16:09:52EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:38EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.2 2008/12/03 13:59:40EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:12EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** **************************************************************************/ #ifndef _lc_custom_ diff --git a/fsw/src/lc_events.h b/fsw/src/lc_events.h index fec25df..57f31d5 100644 --- a/fsw/src/lc_events.h +++ b/fsw/src/lc_events.h @@ -1,8 +1,8 @@ /************************************************************************ ** File: -** $Id: lc_events.h 1.2 2015/03/04 16:09:56EST sstrege Exp $ +** $Id: lc_events.h 1.3 2017/01/22 17:24:47EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -16,38 +16,6 @@ ** ** Notes: ** -** $Log: lc_events.h $ -** Revision 1.2 2015/03/04 16:09:56EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:38EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.11 2011/03/10 14:13:18EST lwalling -** Cleanup use of debug events during task startup -** Revision 1.10 2011/03/01 09:36:38EST lwalling -** Modified startup logic re use of CDS and critical tables, remove unused event IDs -** Revision 1.9 2011/02/07 17:57:58EST lwalling -** Modify sample AP commands to target groups of AP's -** Revision 1.8 2010/03/03 15:17:17EST lwalling -** Removed pound symbols from some Doxygen names -** Revision 1.7 2010/02/25 11:45:22EST lwalling -** Defined LC_BASE_AP_EID for use in actionpoint definition table -** Revision 1.6 2009/12/28 14:51:15EST lwalling -** Change limited events from debug to info -** Revision 1.5 2009/02/23 11:17:10EST dahardis -** Added two event messages and modified two others for -** consistency when addressing DCR 7084 -** Revision 1.4 2009/01/29 15:39:21EST dahardis -** Changed an event message from INFO to DEBUG as documented -** in DCR #6811 -** Revision 1.3 2008/12/10 15:34:47EST dahardis -** Added an event message needed for -** DCR 4680 -** Revision 1.2 2008/12/03 13:59:47EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:27EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ #ifndef _lc_events_ diff --git a/fsw/src/lc_msg.h b/fsw/src/lc_msg.h index dfab559..2a087d1 100644 --- a/fsw/src/lc_msg.h +++ b/fsw/src/lc_msg.h @@ -1,8 +1,8 @@ /************************************************************************ ** File: -** $Id: lc_msg.h 1.3 2015/03/04 16:09:57EST sstrege Exp $ +** $Id: lc_msg.h 1.3.1.1 2017/08/25 13:05:29EDT sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -22,27 +22,6 @@ ** declarations (see the main comment block in lc_msgdefs.h for more ** info). ** -** $Log: lc_msg.h $ -** Revision 1.3 2015/03/04 16:09:57EST sstrege -** Added copyright information -** Revision 1.2 2012/08/01 17:02:52EDT lwalling -** Add age WP results option to AP sample command -** Revision 1.1 2012/07/31 13:53:38PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.6 2011/07/04 13:26:54EDT lwalling -** Change cmd counter from 16 to 8 bits, adjust alignment pad fields, sort fields by data type -** Revision 1.5 2011/02/07 17:57:48EST lwalling -** Modify sample AP commands to target groups of AP's -** Revision 1.4 2010/03/03 15:30:19EST lwalling -** Fixed typo in Doxygen name (changed WPSINUSD to WPSINUSE) -** Revision 1.3 2008/12/10 10:17:15EST dahardis -** Fixed HK structure alignment (DCR #4701) -** Revision 1.2 2008/12/03 13:59:42EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:34EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ #ifndef _lc_msg_ @@ -169,7 +148,9 @@ typedef struct uint16 PassiveRTSExecCount; /**< \lctlmmnemonic \LC_PASSRTSCNT \brief Total count of RTS sequences not initiated because the LC state is - set to #LC_STATE_PASSIVE */ + set to #LC_STATE_PASSIVE or the state + of the actionpoint that failed is set + to #LC_APSTATE_PASSIVE */ uint16 WPsInUse; /**< \lctlmmnemonic \LC_WPSINUSE \brief How many watchpoints are currently diff --git a/fsw/src/lc_msgdefs.h b/fsw/src/lc_msgdefs.h index 94c22fb..bd02c61 100644 --- a/fsw/src/lc_msgdefs.h +++ b/fsw/src/lc_msgdefs.h @@ -1,8 +1,8 @@ /************************************************************************ ** File: -** $Id: lc_msgdefs.h 1.3 2015/03/04 16:09:57EST sstrege Exp $ +** $Id: lc_msgdefs.h 1.3 2017/01/22 17:24:29EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -23,21 +23,6 @@ ** TYPEDEFS OR STRUCTURE DEFINITIONS IN THIS FILE! ** ADD THEM TO lc_msg.h IF NEEDED! ** -** $Log: lc_msgdefs.h $ -** Revision 1.3 2015/03/04 16:09:57EST sstrege -** Added copyright information -** Revision 1.2 2012/08/01 14:19:40EDT lwalling -** Change NOT_MEASURED to STALE -** Revision 1.1 2012/07/31 13:53:39PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.3 2011/01/19 12:45:40EST jmdagost -** Moved two message parameters to the message IDs file for scheduler table access. -** Revision 1.2 2008/12/10 10:17:17EST dahardis -** Fixed HK structure alignment (DCR #4701) -** Revision 1.1 2008/10/29 14:19:37EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ #ifndef _lc_msgdefs_ diff --git a/fsw/src/lc_tbl.h b/fsw/src/lc_tbl.h index f049b20..059f87c 100644 --- a/fsw/src/lc_tbl.h +++ b/fsw/src/lc_tbl.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_tbl.h 1.3 2015/03/04 16:09:53EST sstrege Exp $ +** $Id: lc_tbl.h 1.7 2017/06/30 12:59:53EDT mdeschu Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -22,25 +22,6 @@ ** declarations (see the main comment block in lc_tbldefs.h for more ** info). ** -** $Log: lc_tbl.h $ -** Revision 1.3 2015/03/04 16:09:53EST sstrege -** Added copyright information -** Revision 1.2 2012/08/01 15:41:30EDT lwalling -** Add STALE counters to watchpoint definition and result tables -** Revision 1.1 2012/07/31 13:53:39PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.5 2010/02/19 17:44:15EST lwalling -** Change state events limits to individual limits for Passive AP, FailToPass and PassToFail -** Revision 1.4 2009/12/28 14:50:53EST lwalling -** Add event limiter to a/p def table, add event counter to a/p results table -** Revision 1.3 2009/04/18 14:50:45EDT dkobe -** Cleaned up comments for users guide generation -** Revision 1.2 2009/01/15 15:36:17EST dahardis -** Unit test fixes -** Revision 1.1 2008/12/10 10:57:04EST dahardis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ #ifndef _lc_tbl_ @@ -56,118 +37,24 @@ /************************************************************************* ** Type Definitions *************************************************************************/ -/* -** We need to know if we are being compiled for a big or little endian -** target to layout these structures correctly. These compiler switches -** are defined in the OSAL header common_types.h and assume the processor -** family has been defined properly in the make file. -*/ -#ifdef _STRUCT_HIGH_BIT_FIRST_ - - /** - ** \brief Signed 8-bit byte in 32 bit double word data type, Big Endian - */ - typedef struct { - int8 Bits31to24; - int8 Bits23to16; - int8 Bits15to8; - int8 Signed8; - - } LC_Signed8in32_t; - - /** - ** \brief Unsigned 8-bit byte in 32 bit double word data type, Big Endian - */ - typedef struct { - uint8 Bits31to24; - uint8 Bits23to16; - uint8 Bits15to8; - uint8 Unsigned8; - - } LC_Unsigned8in32_t; - - /** - ** \brief Signed 16-bit word in 32 bit double word data type, Big Endian - */ - typedef struct { - int16 Bits31to16; - int16 Signed16; - - } LC_Signed16in32_t; - - /** - ** \brief Unsigned 16-bit word in 32 bit double word data type, Big Endian - */ - typedef struct { - uint16 Bits31to16; - uint16 Unsigned16; - - } LC_Unsigned16in32_t; - -#endif /* _STRUCT_HIGH_BIT_FIRST_ */ - -#ifdef _STRUCT_LOW_BIT_FIRST_ - - /** - ** \brief Signed 8-bit byte in 32 bit double word data type, Little Endian - */ - typedef struct { - int8 Signed8; - int8 Bits15to8; - int8 Bits23to16; - int8 Bits31to24; - - } LC_Signed8in32_t; - - /** - ** \brief Unsigned 8-bit byte in 32 bit double word data type, Little Endian - */ - typedef struct { - uint8 Unsigned8; - uint8 Bits15to8; - uint8 Bits23to16; - uint8 Bits31to24; - - } LC_Unsigned8in32_t; - /** - ** \brief Signed 16-bit word in 32 bit double word data type, Little Endian - */ - typedef struct { - int16 Signed16; - int16 Bits31to16; - - } LC_Signed16in32_t; - - /** - ** \brief Unsigned 16-bit word in 32 bit double word data type, Little Endian - */ - typedef struct { - uint16 Unsigned16; - uint16 Bits31to16; - - } LC_Unsigned16in32_t; - -#endif /* _STRUCT_LOW_BIT_FIRST_ */ - -/** - \brief Watchpoint Definition Table (WDT) MultiType Union - This union is used to set and extract the comparison value - in each WDT entry since it needs to fill a 32 bit fixed - width field. A conditional compile switch gets the endianess - right. -*/ -typedef union { - LC_Signed8in32_t Signed8in32; - LC_Unsigned8in32_t Unsigned8in32; - - LC_Signed16in32_t Signed16in32; - LC_Unsigned16in32_t Unsigned16in32; - - int32 Signed32; - uint32 Unsigned32; - float Float32; - +/** + * A union type provides a way to have many different data types occupy + * the same memory and legally alias each other. + * + * This is used to store the watch data points, as they may be 8, 16, or 32 + * bits and this is defined in the table / not known until runtime. + */ +typedef union +{ + uint32 Unsigned32; + int32 Signed32; + float Float32; + uint16 Unsigned16; + int16 Signed16; + uint8 Unsigned8; + int8 Signed8; + uint8 RawByte[4]; } LC_MultiType_t; /** @@ -231,6 +118,10 @@ typedef struct { uint32 Value; /**< \brief Watchpoint value at comparison that caused the transition */ + uint8 DataType; /**< \brief Same as Watchpoint Data Type (enumerated) */ + + uint8 Padding[3]; + CFE_TIME_SysTime_t Timestamp; /**< \brief Timstamp when the transition was detected */ } LC_WRTTransition_t; @@ -281,6 +172,7 @@ typedef struct { has evaluated to Fail */ uint32 CumulativeRTSExecCount; /**< \brief Total number of times an RTS request has been sent for this actionpoint */ + uint32 CumulativeEventMsgsSent; /**< \brief Total number of event messages sent */ } LC_ARTEntry_t; #endif /*_lc_tbl_*/ diff --git a/fsw/src/lc_tbldefs.h b/fsw/src/lc_tbldefs.h index 82bd041..d2fc881 100644 --- a/fsw/src/lc_tbldefs.h +++ b/fsw/src/lc_tbldefs.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_tbldefs.h 1.3 2015/03/04 16:09:55EST sstrege Exp $ +** $Id: lc_tbldefs.h 1.3 2017/01/22 17:24:57EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -23,26 +23,6 @@ ** TYPEDEFS OR STRUCTURE DEFINITIONS IN THIS FILE! ** ADD THEM TO lc_tbl.h IF NEEDED! ** -** $Log: lc_tbldefs.h $ -** Revision 1.3 2015/03/04 16:09:55EST sstrege -** Added copyright information -** Revision 1.2 2012/08/01 14:19:28EDT lwalling -** Change NOT_MEASURED to STALE -** Revision 1.1 2012/07/31 13:53:39PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.5 2010/03/08 10:36:31EST lwalling -** Move saved, not saved state definitions to common header file -** Revision 1.4 2009/01/15 15:36:19EST dahardis -** Unit test fixes -** Revision 1.3 2008/12/10 10:59:29EST dahardis -** Moved data type declarations to new file lc_tbl.h -** so this file can be included in ASIST RDL files. -** Revision 1.2 2008/12/03 13:59:42EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:41EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ #ifndef _lc_tbldefs_ diff --git a/fsw/src/lc_verify.h b/fsw/src/lc_verify.h index c40d2c9..d488a5f 100644 --- a/fsw/src/lc_verify.h +++ b/fsw/src/lc_verify.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_verify.h 1.2 2015/03/04 16:09:51EST sstrege Exp $ +** $Id: lc_verify.h 1.4 2017/03/07 17:35:09EST mdeschu Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -17,19 +17,6 @@ ** ** Notes: ** -** $Log: lc_verify.h $ -** Revision 1.2 2015/03/04 16:09:51EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:39EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.3 2010/01/07 13:53:47EST lwalling -** Update LC configuration header files and configuration verification header file -** Revision 1.2 2008/12/03 13:59:31EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:45EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ #ifndef _lc_verify_ @@ -94,6 +81,8 @@ #error LC_MAX_WATCHPOINTS must not be less than 1 #elif LC_MAX_WATCHPOINTS > 65520 #error LC_MAX_WATCHPOINTS must not exceed 65520 (OxFFF0) + #elif LC_MAX_WATCHPOINTS % 4 != 0 + #error LC_MAX_WATCHPOINTS must be a multiple of 4 #endif /* @@ -105,6 +94,8 @@ #error LC_MAX_ACTIONPOINTS must not be less than 1 #elif LC_MAX_ACTIONPOINTS > 65535 #error LC_MAX_ACTIONPOINTS must not exceed 65535 + #elif LC_MAX_ACTIONPOINTS % 2 != 0 + #error LC_MAX_ACTIONPOINTS must be a multiple of 2 #endif /* diff --git a/fsw/src/lc_version.h b/fsw/src/lc_version.h index a57efcd..61169cf 100644 --- a/fsw/src/lc_version.h +++ b/fsw/src/lc_version.h @@ -1,8 +1,8 @@ /************************************************************************ ** File: -** $Id: lc_version.h 1.1.1.6 2015/03/04 16:54:18EST sstrege Exp $ +** $Id: lc_version.h 1.3.1.3 2017/08/29 16:50:51EDT sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -17,27 +17,6 @@ ** ** Notes: ** -** $Log: lc_version.h $ -** Revision 1.1.1.6 2015/03/04 16:54:18EST sstrege -** Changing the version number to 2.0.0 for documentation update release -** Revision 1.1.1.5 2015/03/04 16:15:46EST sstrege -** Added copyright information -** Revision 1.1.1.4 2012/10/12 17:39:33EDT sstrege -** Changing the version number for the branch tip to 9.9.9. -** Revision 1.1.1.3 2012/10/12 17:35:50EDT sstrege -** Changing the version number for the release to 2.0.0. -** Revision 1.1.1.2 2012/09/20 15:38:15EDT nschweis -** Changing the version number for the branch tip to 9.9.9. -** Revision 1.1.1.1 2012/09/20 15:33:05EDT nschweis -** Changing the version number for the variant to 2.0.0. -** Revision 1.1 2012/07/31 16:53:40EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.2 2011/01/19 11:32:08EST jmdagost -** Moved mission revision number from lc_version.h to lc_platform_cfg.h. -** Revision 1.1 2008/10/29 14:19:48EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ #ifndef _lc_version_ @@ -50,7 +29,7 @@ ** \name LC Version Identifiers */ /** \{ */ #define LC_MAJOR_VERSION 2 -#define LC_MINOR_VERSION 0 +#define LC_MINOR_VERSION 1 #define LC_REVISION 0 /** \} */ diff --git a/fsw/src/lc_watch.c b/fsw/src/lc_watch.c index cb2d56d..e4e3704 100644 --- a/fsw/src/lc_watch.c +++ b/fsw/src/lc_watch.c @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_watch.c 1.5 2015/03/04 16:09:52EST sstrege Exp $ +** $Id: lc_watch.c 1.7 2017/05/08 00:19:28EDT mdeschu Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -14,34 +14,6 @@ ** Purpose: ** Functions used for CFS Limit Checker watchpoint processing ** -** $Log: lc_watch.c $ -** Revision 1.5 2015/03/04 16:09:52EST sstrege -** Added copyright information -** Revision 1.4 2012/08/22 17:19:06EDT lwalling -** Modified true to false transition monitor to also accept stale to false -** Revision 1.3 2012/08/01 12:42:12PDT lwalling -** Add STALE counters to watchpoint definition and result tables -** Revision 1.2 2012/08/01 11:19:54PDT lwalling -** Change NOT_MEASURED to STALE -** Revision 1.1 2012/07/31 13:53:40PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.7 2011/06/08 16:17:16EDT lwalling -** Added hash table functions, modified LC_CheckMsgForWPs() to use hash table functions -** Revision 1.6 2011/01/19 12:43:11EST jmdagost -** Added lc_watch.h to include list. -** Revision 1.5 2011/01/19 11:38:40EST jmdagost -** Initialize local variables per IV&V. -** Revision 1.4 2009/02/26 11:01:01EST dahardis -** Modified so a watchponit transition from Not Measured to True -** will get treated the same as a transition from False to True (DCR #7097) -** Revision 1.3 2009/01/15 15:36:17EST dahardis -** Unit test fixes -** Revision 1.2 2008/12/03 13:59:46EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:52EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ @@ -54,382 +26,6 @@ #include "lc_custom.h" #include "lc_perfids.h" -/************************************************************************ -** Local Macro Definitions -*************************************************************************/ -/** -** \name LC Byte Order Identifiers */ -/** \{ */ -#define LC_BIG_ENDIAN 1 -#define LC_LITTLE_ENDIAN 2 -/** \} */ - -/************************************************************************* -** Local Function Prototypes -*************************************************************************/ -/************************************************************************/ -/** \brief Process a single watchpoint -** -** \par Description -** Support function for watchpoint processing that will -** evaluate a single watchpoint -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] WatchIndex The watchpoint number to evaluate (zero -** based watchpoint definition table index) -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message that -** contains the watchpoint data -** -** \param [in] Timestamp A #CFE_TIME_SysTime_t timestamp to use -** to update the watchpoint results data -** if a state transition is detected -** -*************************************************************************/ -void LC_ProcessWP(uint16 WatchIndex, - CFE_SB_MsgPtr_t MessagePtr, - CFE_TIME_SysTime_t Timestamp); - -/************************************************************************/ -/** \brief Operator comparison -** -** \par Description -** Support function for watchpoint processing that will perform -** the watchpoint data comparison based upon the operator and -** data type specified in the watchpoint definition table -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] WatchIndex The watchpoint number to compare (zero -** based watchpoint definition table index) -** -** \param [in] ProcessedWPData The watchpoint data extracted from -** the message that it was contained -** in. This is the data after any -** sizing, bit-masking, and endianess -** fixing that LC might have done -** according to the watchpoint definition -** -** \returns -** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode -** \retstmt Return codes from #LC_SignedCompare \endcode -** \retstmt Return codes from #LC_UnsignedCompare \endcode -** \retstmt Return codes from #LC_FloatCompare \endcode -** \endreturns -** -*************************************************************************/ -uint8 LC_OperatorCompare(uint16 WatchIndex, - uint32 ProcessedWPData); - -/************************************************************************/ -/** \brief Signed comparison -** -** \par Description -** Support function for watchpoint processing that will perform -** a signed watchpoint data comparison based upon the operator -** specified in the watchpoint definition table -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] WatchIndex The watchpoint number to compare (zero -** based watchpoint definition table index) -** -** \param [in] WPValue The watchpoint data extracted from -** the message that it was contained -** in. This is the data after any -** sizing, bit-masking, and endianess -** fixing that LC might have done -** according to the watchpoint definition -** -** \param [in] CompareValue The comparison value specified in the -** watchpoint definition table (sign -** extended, if needed, in an int32) -** -** \returns -** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode -** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode -** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode -** \endreturns -** -*************************************************************************/ -uint8 LC_SignedCompare(uint16 WatchIndex, - int32 WPValue, - int32 CompareValue); - -/************************************************************************/ -/** \brief Unsigned comparison -** -** \par Description -** Support function for watchpoint processing that will perform -** an unsigned watchpoint data comparison based upon the operator -** specified in the watchpoint definition table -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] WatchIndex The watchpoint number to compare (zero -** based watchpoint definition table index) -** -** \param [in] WPValue The watchpoint data extracted from -** the message that it was contained -** in. This is the data after any -** sizing, bit-masking, and endianess -** fixing that LC might have done -** according to the watchpoint definition -** -** \param [in] CompareValue The comparison value specified in the -** watchpoint definition table (zero -** extended, if needed, in an uint32) -** -** \returns -** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode -** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode -** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode -** \endreturns -** -*************************************************************************/ -uint8 LC_UnsignedCompare(uint16 WatchIndex, - uint32 WPValue, - uint32 CompareValue); - -/************************************************************************/ -/** \brief Float comparison -** -** \par Description -** Support function for watchpoint processing that will perform -** an floating point watchpoint data comparison based upon the operator -** specified in the watchpoint definition table -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] WatchIndex The watchpoint number to compare (zero -** based watchpoint definition table index) -** -** \param [in] WPMultiType The watchpoint data extracted from -** the message that it was contained -** in. Stored in a multi-type union. -** This is the data after any sizing, -** bit-masking, and endianess fixing -** that LC might have done according -** to the watchpoint definition -** -** \param [in] CompareMultiType The comparison value specified in the -** watchpoint definition table. Stored -** in a muti-type union so it can easily -** be accessed as a uint32 for validity -** checks -** -** \returns -** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode -** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode -** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode -** \endreturns -** -*************************************************************************/ -uint8 LC_FloatCompare(uint16 WatchIndex, - LC_MultiType_t WPMultiType, - LC_MultiType_t CompareMultiType); - -/************************************************************************/ -/** \brief Watchpoint offset valid -** -** \par Description -** Support function for watchpoint processing that will check if -** the watchpoint offset specified in the definition table would -** extend past the message that contains the watchpoint data -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] WatchIndex The watchpoint number to check (zero -** based watchpoint definition table index) -** -** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that -** references the software bus message that -** contains the watchpoint data -** -** \returns -** \retstmt Returns TRUE if the offset is within the message size \endcode -** \retstmt Returns FALSE if the offset extends past message end \endcode -** \endreturns -** -*************************************************************************/ -boolean LC_WPOffsetValid(uint16 WatchIndex, - CFE_SB_MsgPtr_t MessagePtr); - -/************************************************************************/ -/** \brief Get sized data -** -** \par Description -** Support function for watchpoint processing that will extract -** the watchpoint data from a software bus message based upon the -** data type specified in the watchpoint definition table and -** store it in a uint32. If there are any endian differences between -** LC and the watchpoint data, this is where it will get fixed up. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] WatchIndex The watchpoint number to extract (zero -** based watchpoint definition table index) -** -** \param [in] WPDataPtr A pointer to the first byte of the -** watchpoint data as it exists in the -** software bus message it was received in -** -** \param [in] SizedDataPtr A pointer to where the extracted watchpoint -* data should be stored -** -** \param [out] *SizedDataPtr Contains the extracted watchpoint data. -** This will be set to zero on error -** -** \returns -** \retstmt Returns TRUE if no error \endcode -** \retstmt Returns FALSE if an error occurred \endcode -** \endreturns -** -*************************************************************************/ -boolean LC_GetSizedWPData(uint16 WatchIndex, - uint8 *WPDataPtr, - uint32 *SizedDataPtr); - -/************************************************************************/ -/** \brief Check uint32 for float NAN -** -** \par Description -** Utility function for watchpoint processing that will test if -** a uint32 value would result in a NAN (not-a-number) value if -** it was interpreted as a float. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] Data The uint32 value to check -** -** \returns -** \retstmt Returns TRUE if value is a float NAN \endcode -** \retstmt Returns FALSE if value is not a float NAN \endcode -** \endreturns -** -*************************************************************************/ -boolean LC_Uint32IsNAN(uint32 Data); - -/************************************************************************/ -/** \brief Check uint32 for float infinite -** -** \par Description -** Utility function for watchpoint processing that will test if -** a uint32 value would result in an infinite value if -** it was interpreted as a float. -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] Data The uint32 value to check -** -** \returns -** \retstmt Returns TRUE if value is an inifinite float \endcode -** \retstmt Returns FALSE if value is not an inifinite float \endcode -** \endreturns -** -*************************************************************************/ -boolean LC_Uint32IsInfinite(uint32 Data); - -/************************************************************************/ -/** \brief Convert messageID into hash table index -** -** \par Description -** Utility function for watchpoint processing that converts a -** messageID into an index into the watchpoint hash table. -** -** The following code supports use of the watchpoint hash table: -** -** 1) #LC_GetHashTableIndex - convert messageID to hash table index -** 2) #LC_CreateHashTable - after load Watchpoint Definition Table -** 3) #LC_AddWatchpoint - add one watchpoint to hash table -** 4) #LC_CheckMsgForWPs - process all WP's that reference messageID -** -** The following data structures support the hash table: -** -** 1) Hash table (256 entries) -** 2) Array of links for messageID linked lists (LC_MAX_WATCHPOINTS) -** 3) Array of links for watchpoint linked lists (LC_MAX_WATCHPOINTS) -** -** Rather than search the entire Watchpoint Definition Table to find -** the watchpoints that reference a particular messageID, LC does -** the following: -** -** 1) Call hash table function (convert messageID to hash table index) -** 2) Get messageID linked list from indexed hash table entry -** 3) Search messageID list (max 8) for matching messageID -** 4) Get watchpoint linked list from matching messageID link -** 5) Done - only watchpoints that reference messageID are in list -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] MessageID SoftwareBus packet message ID -** -** \returns -** \retstmt Returns index into watchpoint hash table \endcode -** \endreturns -** -*************************************************************************/ -uint32 LC_GetHashTableIndex(CFE_SB_MsgId_t MessageID); - -/************************************************************************/ -/** \brief Add one watchpoint linked list entry during creation of hash table -** -** \par Description -** Utility function that adds another link to the watchpoint linked list -** for the specified messageID. The function will also add a messageID -** linked list entry to the hash table if this is the first reference -** to that messageID. The function will also subscribe to the messageID -** if this is the first reference to that messageID. The function will -** return a pointer to the watchpoint linked list entry just added. -** -** The following code supports use of the watchpoint hash table: -** -** 1) #LC_GetHashTableIndex - convert messageID to hash table index -** 2) #LC_CreateHashTable - after load Watchpoint Definition Table -** 3) #LC_AddWatchpoint - add one watchpoint to hash table -** 4) #LC_CheckMsgForWPs - process all WP's that reference messageID -** -** The following data structures support the hash table: -** -** 1) Hash table (256 entries) -** 2) Array of links for messageID linked lists (LC_MAX_WATCHPOINTS) -** 3) Array of links for watchpoint linked lists (LC_MAX_WATCHPOINTS) -** -** Rather than search the entire Watchpoint Definition Table to find -** the watchpoints that reference a particular messageID, LC does -** the following: -** -** 1) Call hash table function (convert messageID to hash table index) -** 2) Get messageID linked list from indexed hash table entry -** 3) Search messageID list (max 8) for matching messageID -** 4) Get watchpoint linked list from matching messageID link -** 5) Done - only watchpoints that reference messageID are in list -** -** \par Assumptions, External Events, and Notes: -** None -** -** \param [in] MessageID SoftwareBus packet message ID -** -** \returns -** \retstmt Returns pointer to the watchpoint linked list entry just added \endcode -** \endreturns -** -*************************************************************************/ -LC_WatchPtList_t *LC_AddWatchpoint(CFE_SB_MsgId_t MessageID); - - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* LC_GetHashTableIndex() - convert messageID to hash table index */ @@ -487,7 +83,7 @@ void LC_CreateHashTable(void) { CFE_EVS_SendEvent(LC_UNSUB_WP_ERR_EID, CFE_EVS_ERROR, "Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X", - MessageID, Result); + MessageID, (unsigned int)Result); } } @@ -608,7 +204,7 @@ LC_WatchPtList_t *LC_AddWatchpoint(CFE_SB_MsgId_t MessageID) /* Signal the error, but continue */ CFE_EVS_SendEvent(LC_SUB_WP_ERR_EID, CFE_EVS_ERROR, "Error subscribing watchpoint: MID=0x%04X, RC=0x%08X", - MessageID, Result); + MessageID, (unsigned int)Result); } } @@ -800,6 +396,9 @@ void LC_ProcessWP(uint16 WatchIndex, if ((PreviousResult == LC_WATCH_FALSE) || (PreviousResult == LC_WATCH_STALE)) { + LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.DataType = + LC_OperData.WDTPtr[WatchIndex].DataType; + LC_OperData.WRTPtr[WatchIndex].FalseToTrueCount++; LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue @@ -821,6 +420,9 @@ void LC_ProcessWP(uint16 WatchIndex, if ((PreviousResult == LC_WATCH_TRUE) || (PreviousResult == LC_WATCH_STALE)) { + LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.DataType = + LC_OperData.WDTPtr[WatchIndex].DataType; + LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse .Value = MaskedWPData; @@ -857,7 +459,36 @@ uint8 LC_OperatorCompare(uint16 WatchIndex, LC_MultiType_t WatchpointValue; LC_MultiType_t ComparisonValue; - WatchpointValue.Unsigned32 = ProcessedWPData; + /* + * The "ProcessedWPData" has been already normalized to be + * 32 bits wide and in the native CPU byte order. For actual + * comparison, it needs to be truncated back down to the same + * size as the reference value. + */ + switch (LC_OperData.WDTPtr[WatchIndex].DataType) + { + case LC_DATA_UBYTE: + case LC_DATA_BYTE: + WatchpointValue.Unsigned8 = ProcessedWPData & 0xFF; + break; + + case LC_DATA_WORD_BE: + case LC_DATA_WORD_LE: + case LC_DATA_UWORD_BE: + case LC_DATA_UWORD_LE: + WatchpointValue.Unsigned16 = ProcessedWPData & 0xFFFF; + break; + + case LC_DATA_DWORD_BE: + case LC_DATA_DWORD_LE: + case LC_DATA_UDWORD_BE: + case LC_DATA_UDWORD_LE: + case LC_DATA_FLOAT_BE: + case LC_DATA_FLOAT_LE: + default: + WatchpointValue.Unsigned32 = ProcessedWPData; + break; + } ComparisonValue = LC_OperData.WDTPtr[WatchIndex].ComparisonValue; /* @@ -872,15 +503,15 @@ uint8 LC_OperatorCompare(uint16 WatchIndex, */ case LC_DATA_BYTE: EvalResult = LC_SignedCompare(WatchIndex, - WatchpointValue.Signed8in32.Signed8, - ComparisonValue.Signed8in32.Signed8); + WatchpointValue.Signed8, + ComparisonValue.Signed8); break; case LC_DATA_WORD_BE: case LC_DATA_WORD_LE: EvalResult = LC_SignedCompare(WatchIndex, - WatchpointValue.Signed16in32.Signed16, - ComparisonValue.Signed16in32.Signed16); + WatchpointValue.Signed16, + ComparisonValue.Signed16); break; case LC_DATA_DWORD_BE: @@ -895,15 +526,15 @@ uint8 LC_OperatorCompare(uint16 WatchIndex, */ case LC_DATA_UBYTE: EvalResult = LC_UnsignedCompare(WatchIndex, - WatchpointValue.Unsigned8in32.Unsigned8, - ComparisonValue.Unsigned8in32.Unsigned8); + WatchpointValue.Unsigned8, + ComparisonValue.Unsigned8); break; case LC_DATA_UWORD_BE: case LC_DATA_UWORD_LE: EvalResult = LC_UnsignedCompare(WatchIndex, - WatchpointValue.Unsigned16in32.Unsigned16, - ComparisonValue.Unsigned16in32.Unsigned16); + WatchpointValue.Unsigned16, + ComparisonValue.Unsigned16); break; case LC_DATA_UDWORD_BE: @@ -1136,7 +767,7 @@ uint8 LC_FloatCompare(uint16 WatchIndex, { CFE_EVS_SendEvent(LC_WP_NAN_ERR_EID, CFE_EVS_ERROR, "WP data value is a float NAN: WP = %d, Value = 0x%08X", - WatchIndex, WPMultiType.Unsigned32); + WatchIndex, (unsigned int)WPMultiType.Unsigned32); EvalResult = LC_WATCH_ERROR; } @@ -1220,7 +851,7 @@ boolean LC_WPOffsetValid(uint16 WatchIndex, CFE_EVS_SendEvent(LC_WP_OFFSET_ERR_EID, CFE_EVS_ERROR, "WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d", - MessageID, WatchIndex, Offset, NumOfDataBytes, MsgLength); + MessageID, WatchIndex, (int)Offset, (int)NumOfDataBytes, MsgLength); LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0; @@ -1230,6 +861,21 @@ boolean LC_WPOffsetValid(uint16 WatchIndex, } /* end LC_WPOffsetValid */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* */ +/* Copy a single watchpoint datum and simultaneously byteswap it */ +/* */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +void LC_CopyBytesWithSwap(LC_MultiType_t *DestBuffer, const uint8 *SrcPtr, + const LC_MultiType_t SwapMap, uint32 NumBytes) +{ + while (NumBytes > 0) + { + --NumBytes; + DestBuffer->RawByte[NumBytes] = SrcPtr[SwapMap.RawByte[NumBytes] & 0x3]; + } +} + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* */ /* Get sized watchpoint data */ @@ -1240,29 +886,11 @@ boolean LC_GetSizedWPData(uint16 WatchIndex, uint32 *SizedDataPtr) { boolean Success = TRUE; - uint32 uint32Data = 0; - uint16 uint16Data = 0; + LC_MultiType_t ConvBuffer; + LC_MultiType_t TempBuffer; - int32 int32Data = 0; - int16 int16Data = 0; - int8 int8Data = 0; - - uint8 *uint8Ptr; - uint8 *RawBytePtr = WPDataPtr; - - /* - ** Use these OSAL compiler flags to figure out what - ** the target's byte order is that LC was compiled for. - ** We define these this way so if neither (or both) are - ** defined, we'll get a build error - */ -#ifdef _STRUCT_HIGH_BIT_FIRST_ - int32 OurByteOrder = LC_BIG_ENDIAN; -#endif - -#ifdef _STRUCT_LOW_BIT_FIRST_ - int32 OurByteOrder = LC_LITTLE_ENDIAN; -#endif + ConvBuffer.Unsigned32 = 0; + TempBuffer.Unsigned32 = 0; /* ** Get the watchpoint data value (which may be on a misaligned @@ -1272,116 +900,53 @@ boolean LC_GetSizedWPData(uint16 WatchIndex, switch (LC_OperData.WDTPtr[WatchIndex].DataType) { case LC_DATA_BYTE: - int8Data = (int8) RawBytePtr[0]; - int32Data = (int32) int8Data; - uint32Data = (uint32) int32Data; - break; + TempBuffer.Unsigned8 = *WPDataPtr; + ConvBuffer.Signed32 = TempBuffer.Signed8; /* Extend signed 8 bit value to 32 bits */ + break; case LC_DATA_UBYTE: - uint32Data = (uint32) RawBytePtr[0]; - break; + ConvBuffer.Unsigned32 = *WPDataPtr; /* Extend unsigned 8 bit value to 32 bits */ + break; case LC_DATA_WORD_BE: - uint8Ptr = (uint8 *) &int16Data; - if (OurByteOrder == LC_BIG_ENDIAN) - { - uint8Ptr[0] = RawBytePtr[0]; - uint8Ptr[1] = RawBytePtr[1]; - } - else - { - uint8Ptr[0] = RawBytePtr[1]; - uint8Ptr[1] = RawBytePtr[0]; - } - int32Data = (int32) int16Data; - uint32Data = (uint32) int32Data; - break; + ConvBuffer.Unsigned16 = 0x0001; + LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(int16)); + ConvBuffer.Signed32 = TempBuffer.Signed16; /* Extend signed 16 bit value to 32 bits */ + break; case LC_DATA_WORD_LE: - uint8Ptr = (uint8 *) &int16Data; - if (OurByteOrder == LC_LITTLE_ENDIAN) - { - uint8Ptr[0] = RawBytePtr[0]; - uint8Ptr[1] = RawBytePtr[1]; - } - else - { - uint8Ptr[0] = RawBytePtr[1]; - uint8Ptr[1] = RawBytePtr[0]; - } - int32Data = (int32) int16Data; - uint32Data = (uint32) int32Data; - break; + ConvBuffer.Unsigned16 = 0x0100; + LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(int16)); + ConvBuffer.Signed32 = TempBuffer.Signed16; /* Extend signed 16 bit value to 32 bits */ + break; case LC_DATA_UWORD_BE: - uint8Ptr = (uint8 *) &uint16Data; - if (OurByteOrder == LC_BIG_ENDIAN) - { - uint8Ptr[0] = RawBytePtr[0]; - uint8Ptr[1] = RawBytePtr[1]; - } - else - { - uint8Ptr[0] = RawBytePtr[1]; - uint8Ptr[1] = RawBytePtr[0]; - } - uint32Data = (uint32) uint16Data; - break; + ConvBuffer.Unsigned16 = 0x0001; + LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(uint16)); + ConvBuffer.Unsigned32 = TempBuffer.Unsigned16; /* Extend unsigned 16 bit value to 32 bits */ + break; case LC_DATA_UWORD_LE: - uint8Ptr = (uint8 *) &uint16Data; - if (OurByteOrder == LC_LITTLE_ENDIAN) - { - uint8Ptr[0] = RawBytePtr[0]; - uint8Ptr[1] = RawBytePtr[1]; - } - else - { - uint8Ptr[0] = RawBytePtr[1]; - uint8Ptr[1] = RawBytePtr[0]; - } - uint32Data = (uint32) uint16Data; - break; + ConvBuffer.Unsigned16 = 0x0100; + LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(uint16)); + ConvBuffer.Unsigned32 = TempBuffer.Unsigned16; /* Extend unsigned 16 bit value to 32 bits */ + break; case LC_DATA_DWORD_BE: case LC_DATA_UDWORD_BE: case LC_DATA_FLOAT_BE: - uint8Ptr = (uint8 *) &uint32Data; - if (OurByteOrder == LC_BIG_ENDIAN) - { - uint8Ptr[0] = RawBytePtr[0]; - uint8Ptr[1] = RawBytePtr[1]; - uint8Ptr[2] = RawBytePtr[2]; - uint8Ptr[3] = RawBytePtr[3]; - } - else - { - uint8Ptr[0] = RawBytePtr[3]; - uint8Ptr[1] = RawBytePtr[2]; - uint8Ptr[2] = RawBytePtr[1]; - uint8Ptr[3] = RawBytePtr[0]; - } - break; + ConvBuffer.Unsigned32 = 0x00010203; + LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(uint32)); + ConvBuffer.Unsigned32 = TempBuffer.Unsigned32; /* Straight copy - no extension (signed or unsigned) */ + break; case LC_DATA_DWORD_LE: case LC_DATA_UDWORD_LE: case LC_DATA_FLOAT_LE: - uint8Ptr = (uint8 *) &uint32Data; - if (OurByteOrder == LC_LITTLE_ENDIAN) - { - uint8Ptr[0] = RawBytePtr[0]; - uint8Ptr[1] = RawBytePtr[1]; - uint8Ptr[2] = RawBytePtr[2]; - uint8Ptr[3] = RawBytePtr[3]; - } - else - { - uint8Ptr[0] = RawBytePtr[3]; - uint8Ptr[1] = RawBytePtr[2]; - uint8Ptr[2] = RawBytePtr[1]; - uint8Ptr[3] = RawBytePtr[0]; - } - break; + ConvBuffer.Unsigned32 = 0x03020100; + LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(uint32)); + ConvBuffer.Unsigned32 = TempBuffer.Unsigned32; /* Straight copy - no extension (signed or unsigned) */ + break; default: /* @@ -1403,7 +968,7 @@ boolean LC_GetSizedWPData(uint16 WatchIndex, /* ** Set result value */ - *SizedDataPtr = uint32Data; + *SizedDataPtr = ConvBuffer.Unsigned32; /* ** Return success flag @@ -1539,13 +1104,13 @@ int32 LC_ValidateWDT(void *TableData) { CFE_EVS_SendEvent(LC_WDTVAL_FPERR_EID, CFE_EVS_ERROR, "WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X", - TableIndex, EntryResult, CompareValue); + (int)TableIndex, (int)EntryResult, (unsigned int)CompareValue); } else { CFE_EVS_SendEvent(LC_WDTVAL_ERR_EID, CFE_EVS_ERROR, "WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d", - TableIndex, EntryResult, DataType, OperatorID, MessageID); + (int)TableIndex, (int)EntryResult, DataType, OperatorID, MessageID); } TableResult = EntryResult; @@ -1558,7 +1123,7 @@ int32 LC_ValidateWDT(void *TableData) */ CFE_EVS_SendEvent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, "WDT verify results: good = %d, bad = %d, unused = %d", - GoodCount, BadCount, UnusedCount); + (int)GoodCount, (int)BadCount, (int)UnusedCount); return(TableResult); diff --git a/fsw/src/lc_watch.h b/fsw/src/lc_watch.h index f3b997e..d255680 100644 --- a/fsw/src/lc_watch.h +++ b/fsw/src/lc_watch.h @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_watch.h 1.2 2015/03/04 16:09:51EST sstrege Exp $ +** $Id: lc_watch.h 1.4 2017/01/22 17:24:25EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -17,17 +17,6 @@ ** ** Notes: ** -** $Log: lc_watch.h $ -** Revision 1.2 2015/03/04 16:09:51EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:40EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj -** Revision 1.2 2011/06/08 15:59:08EDT lwalling -** Add prototype for LC_CreateHashTable() -** Revision 1.1 2008/10/29 14:19:54EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** **************************************************************************/ #ifndef _lc_watch_ @@ -37,6 +26,7 @@ ** Includes *************************************************************************/ #include "cfe.h" +#include "lc_app.h" /************************************************************************* ** Exported Functions @@ -107,6 +97,368 @@ int32 LC_ValidateWDT(void *TableData); ** *************************************************************************/ void LC_CreateHashTable(void); + +/************************************************************************/ +/** \brief Process a single watchpoint +** +** \par Description +** Support function for watchpoint processing that will +** evaluate a single watchpoint +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] WatchIndex The watchpoint number to evaluate (zero +** based watchpoint definition table index) +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message that +** contains the watchpoint data +** +** \param [in] Timestamp A #CFE_TIME_SysTime_t timestamp to use +** to update the watchpoint results data +** if a state transition is detected +** +*************************************************************************/ +void LC_ProcessWP(uint16 WatchIndex, + CFE_SB_MsgPtr_t MessagePtr, + CFE_TIME_SysTime_t Timestamp); + +/************************************************************************/ +/** \brief Operator comparison +** +** \par Description +** Support function for watchpoint processing that will perform +** the watchpoint data comparison based upon the operator and +** data type specified in the watchpoint definition table +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] WatchIndex The watchpoint number to compare (zero +** based watchpoint definition table index) +** +** \param [in] ProcessedWPData The watchpoint data extracted from +** the message that it was contained +** in. This is the data after any +** sizing, bit-masking, and endianess +** fixing that LC might have done +** according to the watchpoint definition +** +** \returns +** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode +** \retstmt Return codes from #LC_SignedCompare \endcode +** \retstmt Return codes from #LC_UnsignedCompare \endcode +** \retstmt Return codes from #LC_FloatCompare \endcode +** \endreturns +** +*************************************************************************/ +uint8 LC_OperatorCompare(uint16 WatchIndex, + uint32 ProcessedWPData); + +/************************************************************************/ +/** \brief Signed comparison +** +** \par Description +** Support function for watchpoint processing that will perform +** a signed watchpoint data comparison based upon the operator +** specified in the watchpoint definition table +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] WatchIndex The watchpoint number to compare (zero +** based watchpoint definition table index) +** +** \param [in] WPValue The watchpoint data extracted from +** the message that it was contained +** in. This is the data after any +** sizing, bit-masking, and endianess +** fixing that LC might have done +** according to the watchpoint definition +** +** \param [in] CompareValue The comparison value specified in the +** watchpoint definition table (sign +** extended, if needed, in an int32) +** +** \returns +** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode +** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode +** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode +** \endreturns +** +*************************************************************************/ +uint8 LC_SignedCompare(uint16 WatchIndex, + int32 WPValue, + int32 CompareValue); + +/************************************************************************/ +/** \brief Unsigned comparison +** +** \par Description +** Support function for watchpoint processing that will perform +** an unsigned watchpoint data comparison based upon the operator +** specified in the watchpoint definition table +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] WatchIndex The watchpoint number to compare (zero +** based watchpoint definition table index) +** +** \param [in] WPValue The watchpoint data extracted from +** the message that it was contained +** in. This is the data after any +** sizing, bit-masking, and endianess +** fixing that LC might have done +** according to the watchpoint definition +** +** \param [in] CompareValue The comparison value specified in the +** watchpoint definition table (zero +** extended, if needed, in an uint32) +** +** \returns +** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode +** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode +** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode +** \endreturns +** +*************************************************************************/ +uint8 LC_UnsignedCompare(uint16 WatchIndex, + uint32 WPValue, + uint32 CompareValue); + +/************************************************************************/ +/** \brief Float comparison +** +** \par Description +** Support function for watchpoint processing that will perform +** an floating point watchpoint data comparison based upon the operator +** specified in the watchpoint definition table +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] WatchIndex The watchpoint number to compare (zero +** based watchpoint definition table index) +** +** \param [in] WPMultiType The watchpoint data extracted from +** the message that it was contained +** in. Stored in a multi-type union. +** This is the data after any sizing, +** bit-masking, and endianess fixing +** that LC might have done according +** to the watchpoint definition +** +** \param [in] CompareMultiType The comparison value specified in the +** watchpoint definition table. Stored +** in a muti-type union so it can easily +** be accessed as a uint32 for validity +** checks +** +** \returns +** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode +** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode +** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode +** \endreturns +** +*************************************************************************/ +uint8 LC_FloatCompare(uint16 WatchIndex, + LC_MultiType_t WPMultiType, + LC_MultiType_t CompareMultiType); + +/************************************************************************/ +/** \brief Watchpoint offset valid +** +** \par Description +** Support function for watchpoint processing that will check if +** the watchpoint offset specified in the definition table would +** extend past the message that contains the watchpoint data +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] WatchIndex The watchpoint number to check (zero +** based watchpoint definition table index) +** +** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that +** references the software bus message that +** contains the watchpoint data +** +** \returns +** \retstmt Returns TRUE if the offset is within the message size \endcode +** \retstmt Returns FALSE if the offset extends past message end \endcode +** \endreturns +** +*************************************************************************/ +boolean LC_WPOffsetValid(uint16 WatchIndex, + CFE_SB_MsgPtr_t MessagePtr); + +/************************************************************************/ +/** \brief Get sized data +** +** \par Description +** Support function for watchpoint processing that will extract +** the watchpoint data from a software bus message based upon the +** data type specified in the watchpoint definition table and +** store it in a uint32. If there are any endian differences between +** LC and the watchpoint data, this is where it will get fixed up. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] WatchIndex The watchpoint number to extract (zero +** based watchpoint definition table index) +** +** \param [in] WPDataPtr A pointer to the first byte of the +** watchpoint data as it exists in the +** software bus message it was received in +** +** \param [in] SizedDataPtr A pointer to where the extracted watchpoint +* data should be stored +** +** \param [out] *SizedDataPtr Contains the extracted watchpoint data. +** This will be set to zero on error +** +** \returns +** \retstmt Returns TRUE if no error \endcode +** \retstmt Returns FALSE if an error occurred \endcode +** \endreturns +** +*************************************************************************/ +boolean LC_GetSizedWPData(uint16 WatchIndex, + uint8 *WPDataPtr, + uint32 *SizedDataPtr); + +/************************************************************************/ +/** \brief Check uint32 for float NAN +** +** \par Description +** Utility function for watchpoint processing that will test if +** a uint32 value would result in a NAN (not-a-number) value if +** it was interpreted as a float. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] Data The uint32 value to check +** +** \returns +** \retstmt Returns TRUE if value is a float NAN \endcode +** \retstmt Returns FALSE if value is not a float NAN \endcode +** \endreturns +** +*************************************************************************/ +boolean LC_Uint32IsNAN(uint32 Data); + +/************************************************************************/ +/** \brief Check uint32 for float infinite +** +** \par Description +** Utility function for watchpoint processing that will test if +** a uint32 value would result in an infinite value if +** it was interpreted as a float. +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] Data The uint32 value to check +** +** \returns +** \retstmt Returns TRUE if value is an inifinite float \endcode +** \retstmt Returns FALSE if value is not an inifinite float \endcode +** \endreturns +** +*************************************************************************/ +boolean LC_Uint32IsInfinite(uint32 Data); + +/************************************************************************/ +/** \brief Convert messageID into hash table index +** +** \par Description +** Utility function for watchpoint processing that converts a +** messageID into an index into the watchpoint hash table. +** +** The following code supports use of the watchpoint hash table: +** +** 1) #LC_GetHashTableIndex - convert messageID to hash table index +** 2) #LC_CreateHashTable - after load Watchpoint Definition Table +** 3) #LC_AddWatchpoint - add one watchpoint to hash table +** 4) #LC_CheckMsgForWPs - process all WP's that reference messageID +** +** The following data structures support the hash table: +** +** 1) Hash table (256 entries) +** 2) Array of links for messageID linked lists (LC_MAX_WATCHPOINTS) +** 3) Array of links for watchpoint linked lists (LC_MAX_WATCHPOINTS) +** +** Rather than search the entire Watchpoint Definition Table to find +** the watchpoints that reference a particular messageID, LC does +** the following: +** +** 1) Call hash table function (convert messageID to hash table index) +** 2) Get messageID linked list from indexed hash table entry +** 3) Search messageID list (max 8) for matching messageID +** 4) Get watchpoint linked list from matching messageID link +** 5) Done - only watchpoints that reference messageID are in list +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] MessageID SoftwareBus packet message ID +** +** \returns +** \retstmt Returns index into watchpoint hash table \endcode +** \endreturns +** +*************************************************************************/ +uint32 LC_GetHashTableIndex(CFE_SB_MsgId_t MessageID); + +/************************************************************************/ +/** \brief Add one watchpoint linked list entry during creation of hash table +** +** \par Description +** Utility function that adds another link to the watchpoint linked list +** for the specified messageID. The function will also add a messageID +** linked list entry to the hash table if this is the first reference +** to that messageID. The function will also subscribe to the messageID +** if this is the first reference to that messageID. The function will +** return a pointer to the watchpoint linked list entry just added. +** +** The following code supports use of the watchpoint hash table: +** +** 1) #LC_GetHashTableIndex - convert messageID to hash table index +** 2) #LC_CreateHashTable - after load Watchpoint Definition Table +** 3) #LC_AddWatchpoint - add one watchpoint to hash table +** 4) #LC_CheckMsgForWPs - process all WP's that reference messageID +** +** The following data structures support the hash table: +** +** 1) Hash table (256 entries) +** 2) Array of links for messageID linked lists (LC_MAX_WATCHPOINTS) +** 3) Array of links for watchpoint linked lists (LC_MAX_WATCHPOINTS) +** +** Rather than search the entire Watchpoint Definition Table to find +** the watchpoints that reference a particular messageID, LC does +** the following: +** +** 1) Call hash table function (convert messageID to hash table index) +** 2) Get messageID linked list from indexed hash table entry +** 3) Search messageID list (max 8) for matching messageID +** 4) Get watchpoint linked list from matching messageID link +** 5) Done - only watchpoints that reference messageID are in list +** +** \par Assumptions, External Events, and Notes: +** None +** +** \param [in] MessageID SoftwareBus packet message ID +** +** \returns +** \retstmt Returns pointer to the watchpoint linked list entry just added \endcode +** \endreturns +** +*************************************************************************/ +LC_WatchPtList_t *LC_AddWatchpoint(CFE_SB_MsgId_t MessageID); #endif /* _lc_watch_ */ diff --git a/fsw/tables/lc_def_adt.c b/fsw/tables/lc_def_adt.c index 579b39d..d559424 100644 --- a/fsw/tables/lc_def_adt.c +++ b/fsw/tables/lc_def_adt.c @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_def_adt.c 1.2 2015/03/04 16:09:53EST sstrege Exp $ +** $Id: lc_def_adt.c 1.3 2017/01/22 17:25:08EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -35,37 +35,6 @@ ** solution is to replace "-ansi" with "-std=c99" and leave the ** "-pedantic" flag in place ** -** $Log: lc_def_adt.c $ -** Revision 1.2 2015/03/04 16:09:53EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:41EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/tables/project.pj -** Revision 1.7 2012/07/20 13:50:29EDT lwalling -** Remove compiler warning for unused data structure -** Revision 1.6 2010/04/20 12:03:22PDT lwalling -** Fix ART vs ADT and WRT vs WDT typo in LC table files -** Revision 1.5 2010/02/25 11:46:40EST lwalling -** Modified sample table entries to reference LC_BASE_AP_EID -** Revision 1.4 2010/02/19 17:44:39EST lwalling -** Change state events limits to individual limits for Passive AP, FailToPass and PassToFail -** Revision 1.3 2009/12/28 14:48:04EST lwalling -** Add initializer for event limiter value -** Revision 1.2 2009/12/22 13:19:02EST lwalling -** Update list of included header files, modify contents of table file header structure -** Revision 1.1 2009/12/18 14:10:49EST lwalling -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/tables/project.pj -** Revision 1.4 2009/01/15 15:36:19EST dahardis -** Unit test fixes -** Revision 1.3 2008/12/10 16:00:26EST dahardis -** Changed the size of the template definition table from -** 256 to 176 entries -** Revision 1.2 2008/12/03 13:59:45EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:16EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ diff --git a/fsw/tables/lc_def_wdt.c b/fsw/tables/lc_def_wdt.c index 0d4acac..d80941e 100644 --- a/fsw/tables/lc_def_wdt.c +++ b/fsw/tables/lc_def_wdt.c @@ -1,8 +1,8 @@ /************************************************************************* ** File: -** $Id: lc_def_wdt.c 1.3 2015/03/04 16:09:49EST sstrege Exp $ +** $Id: lc_def_wdt.c 1.3 2017/01/22 17:25:02EST sstrege Exp $ ** -** Copyright © 2007-2014 United States Government as represented by the +** Copyright (c) 2007-2014 United States Government as represented by the ** Administrator of the National Aeronautics and Space Administration. ** All Other Rights Reserved. ** @@ -31,33 +31,6 @@ ** solution is to replace "-ansi" with "-std=c99" and leave the ** "-pedantic" flag in place ** -** $Log: lc_def_wdt.c $ -** Revision 1.3 2015/03/04 16:09:49EST sstrege -** Added copyright information -** Revision 1.2 2012/08/06 17:59:42EDT lwalling -** Add ResultAgeWhenStale to WP definition table -** Revision 1.1 2012/07/31 13:53:42PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/tables/project.pj -** Revision 1.4 2012/07/20 13:50:19EDT lwalling -** Remove compiler warning for unused data structure -** Revision 1.3 2010/04/20 12:03:23PDT lwalling -** Fix ART vs ADT and WRT vs WDT typo in LC table files -** Revision 1.2 2009/12/22 13:18:56EST lwalling -** Update list of included header files, modify contents of table file header structure -** Revision 1.1 2009/12/18 14:10:50EST lwalling -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/tables/project.pj -** Revision 1.4 2009/01/15 15:36:18EST dahardis -** Unit test fixes -** Revision 1.3 2008/12/10 16:00:29EST dahardis -** Changed the size of the template definition table from -** 256 to 176 entries -** Revision 1.2 2008/12/03 13:59:47EST dahardis -** Corrections from peer code review -** Revision 1.1 2008/10/29 14:19:19EDT dahardison -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj ** *************************************************************************/ diff --git a/fsw/unit_test/Makefile b/fsw/unit_test/Makefile deleted file mode 100644 index 465847d..0000000 --- a/fsw/unit_test/Makefile +++ /dev/null @@ -1,186 +0,0 @@ -############################################################################## -## File: -## $Id: Makefile 1.1.1.1 2012/10/01 18:44:15EDT lwalling Exp $ -## -## Purpose: -## Makefile for building the CFS Limit Checker (LC) UTF unit tests -## -## $Log: Makefile $ -## Revision 1.1.1.1 2012/10/01 18:44:15EDT lwalling -## Apply revision 1.3 changes to branch -## Revision 1.3 2012/10/01 13:32:39PDT lwalling -## Remove LC/LCX folder name dependencies from Makefile -## Revision 1.2 2012/10/01 07:58:29PDT lwalling -## Changed makefile folder references from LC to LCX -## Revision 1.1 2012/07/31 13:53:42PDT nschweis -## Initial revision -## Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/project.pj -## Revision 1.4 2012/05/24 11:33:50EDT jmdagost -## Updated makefile to reference environment variables. -## Revision 1.3 2012/01/04 16:03:58EST jmdagost -## Added gcov rule to LC unit test makefile. -## Revision 1.2 2009/12/28 14:19:06EST lwalling -## Update unit tests per latest version of CFE tools -## Revision 1.1 2009/01/15 15:23:36EST dahardis -## Initial revision -## Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/project.pj -## -############################################################################## -# -# Compiler/linker definitions -# -COMPILER=gcc -LINKER=gcc -# -# Compiler/linker options -# -DEFAULT_COPT= -m32 -fPIC -Wall -Wstrict-prototypes -Wunreachable-code -ansi -g -COPT= -D_ix86_ -DSOFTWARE_LITTLE_BIT_ORDER -D_EL -LOPT= -m32 -# -# Options for gcov -# -GCOV_COPT= -fprofile-arcs -ftest-coverage -GCOV_LOPT= -pg -fprofile-arcs -ftest-coverage -# -########################################################################### -# -# Search path definitions -# -# -########################################################################### -# -# Source file path definitions -# -VPATH := . -VPATH += .. -VPATH += ../src -VPATH += ../tables -VPATH += $(CFS_APP_SRC)/cfs_lib/fsw/src -VPATH += $(UTF_SRC)/src -VPATH += $(CFE_CORE_SRC)/sb -VPATH += $(CFE_CORE_SRC)/time -VPATH += $(CFE_CORE_SRC)/es -VPATH += $(CFE_CORE_SRC)/evs -VPATH += $(CFE_CORE_SRC)/fs -VPATH += $(CFE_CORE_SRC)/tbl -VPATH += $(OSAL_SRC)/posix -VPATH += $(OSAL_SRC)/../bsp/pc-linux/src -VPATH += $(CFE_PSP_SRC)/pc-linux/src -# -########################################################################### -# -# Header file path definitions -# -INCLUDES := -I. -INCLUDES += -I.. -INCLUDES += -I../src -INCLUDES += -I../platform_inc -INCLUDES += -I../mission_inc -INCLUDES += -I$(OSAL_SRC)/../../build/inc -INCLUDES += -I$(OSAL_SRC)/inc -INCLUDES += -I$(CFE_PSP_SRC)/inc -INCLUDES += -I$(CFE_PSP_SRC)/pc-linux/inc -INCLUDES += -I$(UTF_SRC)/inc -INCLUDES += -I$(CFS_APP_SRC)/cfs_lib/fsw/public_inc -INCLUDES += -I$(CFE_CORE_SRC)/../../mission_inc -INCLUDES += -I$(CFE_CORE_SRC)/../../platform_inc/cpu1 -INCLUDES += -I$(CFE_CORE_SRC)/inc -INCLUDES += -I$(CFE_CORE_SRC)/time -INCLUDES += -I$(CFE_CORE_SRC)/sb -INCLUDES += -I$(CFE_CORE_SRC)/es -INCLUDES += -I$(CFE_CORE_SRC)/evs -INCLUDES += -I$(CFE_CORE_SRC)/fs -INCLUDES += -I$(CFE_CORE_SRC)/tbl -# -########################################################################### -# -# UTF object files -# -UTF_OBJS := utf_cfe_es_api.o -UTF_OBJS += utf_cfe_es_cds.o -UTF_OBJS += utf_cfe_esmempool.o -UTF_OBJS += utf_cfe_evs.o -UTF_OBJS += utf_cfe_psp_eeprom.o -UTF_OBJS += utf_cfe_psp_memory.o -UTF_OBJS += utf_cfe_psp_memrange.o -UTF_OBJS += utf_cfe_psp_memutils.o -UTF_OBJS += utf_cfe_psp_port.o -UTF_OBJS += utf_cfe_psp_ram.o -UTF_OBJS += utf_cfe_psp_support.o -UTF_OBJS += utf_cfe_sb.o -UTF_OBJS += utf_cfe_sb_api.o -UTF_OBJS += utf_cfe_tbl_api.o -UTF_OBJS += utf_cfe_tbl_internal.o -UTF_OBJS += utf_cfe_time_api.o -UTF_OBJS += utf_cfe_time_utils.o -UTF_OBJS += utf_osapi.o -UTF_OBJS += utf_osfileapi.o -UTF_OBJS += utf_osfilesys.o -UTF_OBJS += utf_osloader.o -UTF_OBJS += utf_ostimer.o -UTF_OBJS += utf_cfe_time_utils.o -UTF_OBJS += utf_sim.o -# -########################################################################### -# -# cFE object files -# -CFE_OBJS := ccsds.o -CFE_OBJS += cfe_sb_util.o -CFE_OBJS += cfe_es_cds_mempool.o -CFE_OBJS += cfe_fs_api.o -# -########################################################################### -# -# PSP object files -# -PSP_OBJS := cfe_psp_timer.o -# -########################################################################### -# -# CFSLIB object files -# -CFSLIB_OBJS := -# -########################################################################### -# -# LC object files -# -LC_OBJS := lc_app.o -LC_OBJS += lc_cmds.o -LC_OBJS += lc_action.o -LC_OBJS += lc_watch.o -LC_OBJS += lc_custom.o -LC_OBJS += lc_def_adt.o -LC_OBJS += lc_def_wdt.o -# -########################################################################### -# -# Rules to make the specified targets -# -%.o: %.c - $(COMPILER) -c $(COPT) $(DEFAULT_COPT) $(GCOV_COPT) $(INCLUDES) $< -# -%.exe: %.o - $(LINKER) $(LOPT) $(GCOV_LOPT) $^ -o $*.exe -# -all: lc_utest.exe -# -lc_utest.exe: lc_utest.o lc_utest_adt.o lc_utest_wdt.o \ -$(UTF_OBJS) $(CFE_OBJS) $(PSP_OBJS) $(CFSLIB_OBJS) $(LC_OBJS) -# -clean: - rm -f *.o *.exe *.da *.out *.bbg *.bb *.gcda *.gcno *.gcov -# -gcov :: - @echo - @gcov $(LC_OBJS:.o=.gcda) | sed 'N;s/\n/ /' | \ - sed -n '/File/p' | sed -e '/\.h/d' | \ - sed 's/ Lines executed:/ /; s/File/gcov:/; s/of// ' - @rm -f *.gcda *.gcno - @echo -# -########################################################################### -# -# end of file diff --git a/fsw/unit_test/README.txt b/fsw/unit_test/README.txt index 8293a86..a1b7fa3 100644 --- a/fsw/unit_test/README.txt +++ b/fsw/unit_test/README.txt @@ -1,39 +1,89 @@ +############################################################################## +## $Id: README.txt 1.5 2017/07/06 12:26:36EDT mdeschu Exp $ +## +## Purpose: CFS LC application unit test instructions, results, and code coverage +## +## Author: Charles Zogby +## +############################################################################## -README for CFS Limit Checker (LC) unit tests run on 1/15/09 -Platform --------- -Cygwin on Windows XP - -Supporting Software Used: ------------------------- -cFE v5.2/OSAL 2.12 with bundled UTF - -Unit Test Files ---------------- -lc_utest.c - This is the main unit test driver. This - file when compiled is the executable - used to unit test LC. - -lc_utest.in - This is a script of input data used - to test high level software bus message - processing. - -lc_utest.out - Program output from lc_utest.exe - -Makefile - This is the make file used to build lc_utest.exe - Be aware that this file may need to be modified if - a different platform or directory structure is used. - -/output_CDS - Directory that contains the executable and output for unit - tests compiled and ran with the platform configuration - parameter LC_SAVE_TO_CDS defined - -/output_noCDS - Directory that contains the executable and output for unit - tests compiled and ran with the platform configuration - parameter LC_SAVE_TO_CDS NOT defined - -Coverage Summary ----------------- -See /output_CDS/README_CDS.txt or - /output_noCDS/README_noCDS.txt +LC Unit Test Instructions +------------------------- +This unit test was run in a virtual machine running CentOS and uses the ut-assert stubs and default hooks for the +cFE, OSAL and PSP. The ut-assert framework, stubs, and hooks are located in the directory cfe/tools/ut-assert and +are configuration managed in MKS in the FSW tools repository on server tlserver3. + +To run the unit test enter the following commands at the command line prompt in +unit test directory. + +make clean +make +make run +make gcov + +LC 2.1.0.0 Unit Test Results for default configuration (LC_SAVE_TO_CDS not defined): +GCOV results this configuration can be found under output_noCDS + +Tests Executed: 233 +Assert Pass Count: 779 +Assert Fail Count: 0 + +gcov: '../src/lc_custom.c' 100.00% 11 +gcov: '../src/lc_action.c' 100.00% 199 +gcov: '../src/lc_app.c' 96.67% 240 +gcov: '../src/lc_cmds.c' 100.00% 357 +gcov: '../src/lc_watch.c' 99.71% 341 + +========================================================================== +lc_custom.c - 100.00% coverage + +========================================================================== +lc_action.c - 100.00% coverage + +========================================================================== +lc_app.c - 96.67% coverage + +Unit test code for CDS is covered by the alternate configuration + +========================================================================== +lc_cmds.c - 100.00% coverage + +========================================================================== +lc_watch.c - 99.70% coverage + +========================================================================== + +LC 2.1.0.0 Unit Test Results for alternate configuration (LC_SAVE_TO_CDS defined): +GCOV results for this configuration can be found under output_CDS + +Tests Executed: 231 +Assert Pass Count: 761 +Assert Fail Count: 0 + +gcov: '../src/lc_custom.c' 100.00% 11 +gcov: '../src/lc_action.c' 100.00% 199 +gcov: '../src/lc_app.c' 95.02% 241 +gcov: '../src/lc_cmds.c' 100.00% 357 +gcov: '../src/lc_watch.c' 99.71% 341 + +========================================================================== +lc_custom.c - 100.00% coverage + +========================================================================== +lc_action.c - 100.00% coverage + +========================================================================== +lc_app.c - 95.02% coverage + +Lines not covered here are already covered in the default configuration. + +========================================================================== +lc_cmds.c - 100.00% coverage + +========================================================================== +lc_watch.c - 99.71% coverage + +========================================================================== + diff --git a/fsw/unit_test/lc_action.c.gcov b/fsw/unit_test/lc_action.c.gcov new file mode 100644 index 0000000..b776220 --- /dev/null +++ b/fsw/unit_test/lc_action.c.gcov @@ -0,0 +1,756 @@ + -: 0:Source:../src/lc_action.c + -: 0:Programs:5 + -: 1:/************************************************************************* + -: 2:** File: + -: 3:** $Id: lc_action.c.gcov 1.5 2017/07/06 12:26:36EDT mdeschu Exp $ + -: 4:** + -: 5:** Copyright (c) 2007-2014 United States Government as represented by the + -: 6:** Administrator of the National Aeronautics and Space Administration. + -: 7:** All Other Rights Reserved. + -: 8:** + -: 9:** This software was created at NASA's Goddard Space Flight Center. + -: 10:** This software is governed by the NASA Open Source Agreement and may be + -: 11:** used, distributed and modified only pursuant to the terms of that + -: 12:** agreement. + -: 13:** + -: 14:** Purpose: + -: 15:** Functions used for CFS Limit Checker actionpoint processing + -: 16:** + -: 17:** + -: 18:*************************************************************************/ + -: 19: + -: 20:/************************************************************************* + -: 21:** Includes + -: 22:*************************************************************************/ + -: 23:#include "lc_app.h" + -: 24:#include "lc_action.h" + -: 25:#include "lc_msgids.h" + -: 26:#include "lc_events.h" + -: 27:#include "lc_custom.h" + -: 28: + -: 29:#include + -: 30: + -: 31:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 32:/* */ + -: 33:/* Sample one or all actionpoints */ + -: 34:/* */ + -: 35:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 5: 36:void LC_SampleAPs(uint16 StartIndex, uint16 EndIndex) + -: 37:{ + -: 38: uint16 TableIndex; + -: 39: uint8 CurrentAPState; + -: 40: + -: 41: /* + -: 42: ** If we're specifying a single actionpoint, make sure it's + -: 43: ** current state is valid for a sample request + -: 44: */ + 5: 45: if (StartIndex == EndIndex) + -: 46: { + 3: 47: CurrentAPState = LC_OperData.ARTPtr[StartIndex].CurrentState; + -: 48: + 5: 49: if ((CurrentAPState != LC_ACTION_NOT_USED) && + -: 50: (CurrentAPState != LC_APSTATE_PERMOFF)) + -: 51: { + -: 52: /* + -: 53: ** Sample the specified actionpoint + -: 54: */ + 2: 55: LC_SampleSingleAP(StartIndex); + -: 56: } + -: 57: else + -: 58: { + -: 59: /* + -: 60: ** Actionpoint isn't currently operational + -: 61: */ + 1: 62: CFE_EVS_SendEvent(LC_APSAMPLE_CURR_ERR_EID, CFE_EVS_ERROR, + -: 63: "Sample AP error, invalid current AP state: AP = %d, State = %d", + -: 64: StartIndex, CurrentAPState); + -: 65: } + -: 66: } + -: 67: else + -: 68: { + -: 69: /* + -: 70: ** Sample selected actionpoints + -: 71: */ + 180: 72: for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++) + -: 73: { + 178: 74: LC_SampleSingleAP(TableIndex); + -: 75: } + -: 76: + -: 77: } + -: 78: + 5: 79: return; + -: 80: + -: 81:} /* end LC_SampleAP */ + -: 82: + -: 83:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 84:/* */ + -: 85:/* Sample a single actionpoint */ + -: 86:/* */ + -: 87:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 187: 88:void LC_SampleSingleAP(uint16 APNumber) + -: 89:{ + -: 90: uint8 CurrentAPState; + -: 91: uint8 PreviousResult; + -: 92: uint8 CurrentResult; + -: 93: char EventText[CFE_EVS_MAX_MESSAGE_LENGTH]; + -: 94: + -: 95: /* + -: 96: ** We only do the sample if the actionpoint is active + -: 97: ** or passive. Other states are ignored since this + -: 98: ** routine is called in a loop to process ALL actionpoints. + -: 99: */ + 187: 100: CurrentAPState = LC_OperData.ARTPtr[APNumber].CurrentState; + -: 101: + 187: 102: if ((CurrentAPState == LC_APSTATE_ACTIVE) || + -: 103: (CurrentAPState == LC_APSTATE_PASSIVE)) + -: 104: { + -: 105: /* + -: 106: ** Evaluate the actionpoint and update the results + -: 107: ** as needed + -: 108: */ + 7: 109: LC_AppData.APSampleCount++; + -: 110: + 7: 111: PreviousResult = LC_OperData.ARTPtr[APNumber].ActionResult; + -: 112: + 7: 113: CurrentResult = LC_EvaluateRPN(APNumber); + -: 114: + 7: 115: LC_OperData.ARTPtr[APNumber].ActionResult = CurrentResult; + -: 116: + -: 117: /***************************************** + -: 118: ** If actionpoint fails current evaluation + -: 119: ******************************************/ + 7: 120: if (CurrentResult == LC_ACTION_FAIL) + -: 121: { + 4: 122: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount++; + 4: 123: LC_OperData.ARTPtr[APNumber].CumulativeFailCount++; + -: 124: + 4: 125: if (PreviousResult == LC_ACTION_PASS) + -: 126: { + -: 127: /* + -: 128: ** We failed this time, but we passed last time + -: 129: */ + 1: 130: LC_OperData.ARTPtr[APNumber].PassToFailCount++; + -: 131: + -: 132: /* + -: 133: ** Send only a limited number of Pass to Fail events + -: 134: */ + 2: 135: if (LC_OperData.ARTPtr[APNumber].PassToFailCount <= + 1: 136: LC_OperData.ADTPtr[APNumber].MaxPassFailEvents) + -: 137: { + 1: 138: CFE_EVS_SendEvent(LC_AP_PASSTOFAIL_INF_EID, CFE_EVS_INFORMATION, + -: 139: "AP state change from PASS to FAIL: AP = %d", + -: 140: APNumber); + 1: 141: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent++; + -: 142: } + -: 143: } + -: 144: + 8: 145: if (LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount >= + 4: 146: LC_OperData.ADTPtr[APNumber].MaxFailsBeforeRTS) + -: 147: { + -: 148: /* + -: 149: ** We have failed enough times to request the RTS + -: 150: */ + 4: 151: if (CurrentAPState == LC_APSTATE_ACTIVE) + -: 152: { + -: 153: /* + -: 154: ** Actions go to passive after they've failed + -: 155: */ + 3: 156: LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_PASSIVE; + -: 157: + 3: 158: if (LC_AppData.CurrentLCState == LC_STATE_ACTIVE) + -: 159: { + -: 160: /* + -: 161: ** If the LC application state is active, request the + -: 162: ** specified RTS be executed + -: 163: */ + 1: 164: LC_ExecuteRTS(LC_OperData.ADTPtr[APNumber].RTSId); + -: 165: + 1: 166: LC_OperData.ARTPtr[APNumber].CumulativeRTSExecCount++; + -: 167: + 1: 168: LC_AppData.RTSExecCount++; + -: 169: + -: 170: /* + -: 171: ** Copy event text specific to this action + -: 172: ** making sure to NUL terminate in case the event + -: 173: ** text is too long since strncpy won't + -: 174: */ + 1: 175: strncpy(EventText, + 1: 176: LC_OperData.ADTPtr[APNumber].EventText, + -: 177: LC_MAX_ACTION_TEXT); + 1: 178: EventText[LC_MAX_ACTION_TEXT - 1] = '\0'; + -: 179: + -: 180: /* + -: 181: ** Add our trailer with AP specific info making + -: 182: ** sure we won't exceed our character buffer. + -: 183: ** strncat will always NUL terminate so we have + -: 184: ** to subtract 1 from the max to leave room for it. + -: 185: */ + 1: 186: strncat(EventText, + -: 187: LC_AP_EVENT_TAIL_STR, + -: 188: (CFE_EVS_MAX_MESSAGE_LENGTH - LC_MAX_ACTION_TEXT) - 1); + -: 189: + 4: 190: CFE_EVS_SendEvent( + 1: 191: LC_OperData.ADTPtr[APNumber].EventID, + 1: 192: LC_OperData.ADTPtr[APNumber].EventType, + -: 193: EventText, APNumber, + 1: 194: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, + 1: 195: LC_OperData.ADTPtr[APNumber].RTSId); + -: 196: + 1: 197: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent++; + -: 198: } + -: 199: else + -: 200: { + -: 201: /* + -: 202: ** The LC application state is passive so we don't + -: 203: ** do the RTS request. We bump the passive RTS execution + -: 204: ** counter and send out a generic event message + -: 205: */ + 2: 206: LC_AppData.PassiveRTSExecCount++; + -: 207: + 4: 208: CFE_EVS_SendEvent(LC_PASSIVE_FAIL_DBG_EID, CFE_EVS_DEBUG, + -: 209: "AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d", + -: 210: APNumber, + 2: 211: (int)LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, + 2: 212: LC_OperData.ADTPtr[APNumber].RTSId); + -: 213: } + -: 214: } + -: 215: else + -: 216: { + -: 217: /* + -: 218: ** The actionpoint failed while the actionpoint state is passive + -: 219: */ + 1: 220: LC_OperData.ARTPtr[APNumber].PassiveAPCount++; + 1: 221: LC_AppData.PassiveRTSExecCount++; + -: 222: + -: 223: /* + -: 224: ** Send only a limited number of AP is Passive events + -: 225: */ + 2: 226: if (LC_OperData.ARTPtr[APNumber].PassiveAPCount <= + 1: 227: LC_OperData.ADTPtr[APNumber].MaxPassiveEvents) + -: 228: { + 2: 229: CFE_EVS_SendEvent(LC_AP_PASSIVE_FAIL_INF_EID, CFE_EVS_INFORMATION, + -: 230: "AP failed while passive: AP = %d, FailCount = %d, RTS = %d", + -: 231: APNumber, + 1: 232: (int)LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, + 1: 233: LC_OperData.ADTPtr[APNumber].RTSId); + 1: 234: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent++; + -: 235: } + -: 236: } + -: 237: + -: 238: } /* end (ConsecutiveFailCount >= MaxFailsBeforeRTS) if */ + -: 239: + -: 240: } /* end (CurrentResult == LC_ACTION_FAIL) if */ + -: 241: + -: 242: /****************************************** + -: 243: ** If actionpoint passes current evaluation + -: 244: *******************************************/ + 3: 245: else if (CurrentResult == LC_ACTION_PASS) + -: 246: { + 1: 247: if (PreviousResult == LC_ACTION_FAIL) + -: 248: { + -: 249: /* + -: 250: ** We passed this time, but we failed last time + -: 251: */ + 1: 252: LC_OperData.ARTPtr[APNumber].FailToPassCount++; + -: 253: + -: 254: /* + -: 255: ** Send only a limited number of Fail to Pass events + -: 256: */ + 2: 257: if (LC_OperData.ARTPtr[APNumber].FailToPassCount <= + 1: 258: LC_OperData.ADTPtr[APNumber].MaxFailPassEvents) + -: 259: { + 1: 260: CFE_EVS_SendEvent(LC_AP_FAILTOPASS_INF_EID, CFE_EVS_INFORMATION, + -: 261: "AP state change from FAIL to PASS: AP = %d", + -: 262: APNumber); + 1: 263: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent++; + -: 264: } + -: 265: } + -: 266: /* + -: 267: ** Clear consecutive failure counter for this AP + -: 268: */ + 1: 269: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount = 0; + -: 270: } + -: 271: + -: 272: /* + -: 273: ** If actionpoint is not measured or has gone stale + -: 274: */ + 2: 275: else if (CurrentResult == LC_ACTION_STALE) + -: 276: { + -: 277: /* + -: 278: ** Make sure the consecutive fail count is zeroed + -: 279: */ + 1: 280: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount = 0; + -: 281: } + -: 282: else + -: 283: { + -: 284: /* + -: 285: ** We got back a LC_ACTION_ERROR result, send event + -: 286: */ + 1: 287: CFE_EVS_SendEvent(LC_ACTION_ERROR_ERR_EID, CFE_EVS_ERROR, + -: 288: "AP evaluated to error: AP = %d, Result = %d", + -: 289: APNumber, CurrentResult); + -: 290: } + -: 291: + -: 292: } /* end CurrentAPState if */ + -: 293: + 187: 294: return; + -: 295: + -: 296:} /* end LC_SampleSingleAP */ + -: 297: + -: 298:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 299:/* */ + -: 300:/* Evaluate the Reverse Polish Notation (RPN) equation for an */ + -: 301:/* actionpoint */ + -: 302:/* */ + -: 303:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 304:#define POP_RPN_DATA ((StackPtr <= 0) \ + -: 305: ? (IllegalRPN = TRUE) \ + -: 306: : (RPNStack [--StackPtr])) + -: 307: + -: 308:#define PUSH_RPN_DATA(x) ((StackPtr >= LC_MAX_RPN_EQU_SIZE) \ + -: 309: ? (IllegalRPN = TRUE) \ + -: 310: : (RPNStack [StackPtr++] = x)) + 33: 311:uint8 LC_EvaluateRPN(uint16 APNumber) + -: 312:{ + -: 313: boolean Done; + -: 314: boolean IllegalRPN; + -: 315: boolean IllegalOperand; + 33: 316: uint8 EvalResult = LC_ACTION_ERROR; + -: 317: int32 RPNEquationPtr; + -: 318: int32 StackPtr; + -: 319: uint16 RPNData; + -: 320: uint16 RPNStack [LC_MAX_RPN_EQU_SIZE]; + -: 321: uint16 Operand1; + -: 322: uint16 Operand2; + -: 323: + 33: 324: StackPtr = 0; + 33: 325: RPNEquationPtr = 0; + 33: 326: IllegalRPN = FALSE; + 33: 327: IllegalOperand = FALSE; + 33: 328: Done = FALSE; + -: 329: + -: 330: /* + -: 331: ** Keep going till we're done or till we get an error + -: 332: */ + 191: 333: while ((Done == FALSE) && + -: 334: (IllegalRPN == FALSE) && + -: 335: (IllegalOperand == FALSE)) + -: 336: { + -: 337: /* + -: 338: ** Pick off each piece of the RPN equation and handle + -: 339: ** one at a time + -: 340: */ + 125: 341: RPNData = LC_OperData.ADTPtr[APNumber].RPNEquation[RPNEquationPtr++]; + -: 342: + -: 343: /* + -: 344: ** The data is either an RPN operator or a watchpoint number + -: 345: */ + 125: 346: switch (RPNData) + -: 347: { + -: 348: /* + -: 349: ** If the data is an RPN operator then each operand is + -: 350: ** either a watchpoint evaluation result or it is the + -: 351: ** result of a previous RPN operation + -: 352: */ + -: 353: case LC_RPN_AND: + 7: 354: Operand2 = POP_RPN_DATA; + 7: 355: Operand1 = POP_RPN_DATA; + 9: 356: if ((Operand1 == LC_WATCH_FALSE) || + -: 357: (Operand2 == LC_WATCH_FALSE)) + -: 358: { + 2: 359: PUSH_RPN_DATA (LC_WATCH_FALSE); + -: 360: } + 7: 361: else if ((Operand1 == LC_WATCH_ERROR) || + -: 362: (Operand2 == LC_WATCH_ERROR)) + -: 363: { + 2: 364: PUSH_RPN_DATA (LC_WATCH_ERROR); + -: 365: } + 5: 366: else if ((Operand1 == LC_WATCH_STALE) || + -: 367: (Operand2 == LC_WATCH_STALE)) + -: 368: { + 2: 369: PUSH_RPN_DATA (LC_WATCH_STALE); + -: 370: } + -: 371: else + -: 372: { + 1: 373: PUSH_RPN_DATA (LC_WATCH_TRUE); + -: 374: } + 7: 375: break; + -: 376: + -: 377: case LC_RPN_OR: + 7: 378: Operand2 = POP_RPN_DATA; + 7: 379: Operand1 = POP_RPN_DATA; + 9: 380: if ((Operand1 == LC_WATCH_TRUE) || + -: 381: (Operand2 == LC_WATCH_TRUE)) + -: 382: { + 2: 383: PUSH_RPN_DATA (LC_WATCH_TRUE); + -: 384: } + 7: 385: else if ((Operand1 == LC_WATCH_ERROR) || + -: 386: (Operand2 == LC_WATCH_ERROR)) + -: 387: { + 2: 388: PUSH_RPN_DATA (LC_WATCH_ERROR); + -: 389: } + 5: 390: else if ((Operand1 == LC_WATCH_STALE) || + -: 391: (Operand2 == LC_WATCH_STALE)) + -: 392: { + 2: 393: PUSH_RPN_DATA (LC_WATCH_STALE); + -: 394: } + -: 395: else + -: 396: { + 1: 397: PUSH_RPN_DATA (LC_WATCH_FALSE); + -: 398: } + 7: 399: break; + -: 400: + -: 401: case LC_RPN_XOR: + 5: 402: Operand2 = POP_RPN_DATA; + 5: 403: Operand1 = POP_RPN_DATA; + 7: 404: if ((Operand1 == LC_WATCH_ERROR) || + -: 405: (Operand2 == LC_WATCH_ERROR)) + -: 406: { + 2: 407: PUSH_RPN_DATA (LC_WATCH_ERROR); + -: 408: } + 5: 409: else if ((Operand1 == LC_WATCH_STALE) || + -: 410: (Operand2 == LC_WATCH_STALE)) + -: 411: { + 2: 412: PUSH_RPN_DATA (LC_WATCH_STALE); + -: 413: } + -: 414: else + -: 415: { + 1: 416: PUSH_RPN_DATA (Operand1 != Operand2); + -: 417: } + 5: 418: break; + -: 419: + -: 420: case LC_RPN_NOT: + 3: 421: Operand1 = POP_RPN_DATA; + 3: 422: if (Operand1 == LC_WATCH_ERROR) + -: 423: { + 1: 424: PUSH_RPN_DATA (LC_WATCH_ERROR); + -: 425: } + 2: 426: else if (Operand1 == LC_WATCH_STALE) + -: 427: { + 1: 428: PUSH_RPN_DATA (LC_WATCH_STALE); + -: 429: } + -: 430: else + -: 431: { + 1: 432: PUSH_RPN_DATA (Operand1 == LC_WATCH_FALSE); + -: 433: } + 3: 434: break; + -: 435: + -: 436: case LC_RPN_EQUAL: + 31: 437: EvalResult = POP_RPN_DATA; + 31: 438: if ((EvalResult == LC_WATCH_ERROR) || + -: 439: (EvalResult == LC_WATCH_STALE)) + -: 440: { + 16: 441: IllegalOperand = TRUE; + -: 442: } + 31: 443: if (StackPtr == 0) + -: 444: { + 30: 445: Done = TRUE; + -: 446: } + -: 447: else + -: 448: { + 1: 449: IllegalRPN = TRUE; + -: 450: } + 31: 451: break; + -: 452: + -: 453: /* + -: 454: ** If the data is a watchpoint number then the operand is + -: 455: ** the current value of that watchpoint result + -: 456: */ + -: 457: default: + 72: 458: if (RPNData < LC_MAX_WATCHPOINTS) + -: 459: { + 71: 460: PUSH_RPN_DATA (LC_OperData.WRTPtr[RPNData].WatchResult); + -: 461: } + -: 462: else + -: 463: { + 1: 464: IllegalRPN = TRUE; + -: 465: } + -: 466: break; + -: 467: + -: 468: } /* end switch */ + -: 469: + -: 470: /* + -: 471: ** If still not done and have no errors - check for the end of the buffer + -: 472: */ + 125: 473: if ((Done == FALSE) && + -: 474: (IllegalRPN == FALSE) && + -: 475: (IllegalOperand == FALSE)) + -: 476: { + 93: 477: if (RPNEquationPtr >= LC_MAX_RPN_EQU_SIZE) + -: 478: { + 1: 479: IllegalRPN = TRUE; + -: 480: } + -: 481: } + -: 482: + -: 483: } /* end while */ + -: 484: + 33: 485: if (IllegalRPN == TRUE) + -: 486: { + 3: 487: CFE_EVS_SendEvent(LC_INVALID_RPN_ERR_EID, CFE_EVS_ERROR, + -: 488: "AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d", + 3: 489: APNumber, (int)(RPNEquationPtr - 1), (int)StackPtr); + -: 490: + 3: 491: EvalResult = LC_ACTION_ERROR; + -: 492: } + 30: 493: else if (EvalResult == LC_WATCH_ERROR) + -: 494: { + 8: 495: EvalResult = LC_ACTION_ERROR; + -: 496: } + 22: 497: else if (EvalResult == LC_WATCH_STALE) + -: 498: { + 8: 499: EvalResult = LC_ACTION_STALE; + -: 500: } + 14: 501: else if (EvalResult == LC_WATCH_FALSE) + -: 502: { + 5: 503: EvalResult = LC_ACTION_PASS; + -: 504: } + 9: 505: else if (EvalResult == LC_WATCH_TRUE) + -: 506: { + 8: 507: EvalResult = LC_ACTION_FAIL; + -: 508: } + -: 509: + 33: 510: return (EvalResult); + -: 511: + -: 512:} /* end LC_EvaluateRPN */ + -: 513: + -: 514:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 515:/* */ + -: 516:/* Validate the actionpoint definition table (ADT) */ + -: 517:/* */ + -: 518:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 7: 519:int32 LC_ValidateADT(void *TableData) + -: 520:{ + 7: 521: LC_ADTEntry_t *TableArray = (LC_ADTEntry_t *) TableData; + -: 522: + 7: 523: int32 EntryResult = LC_ADTVAL_NO_ERR; + 7: 524: int32 TableResult = CFE_SUCCESS; + -: 525: int32 TableIndex; + -: 526: + -: 527: uint8 DefaultState; + -: 528: uint16 RTSId; + -: 529: uint16 MaxFailsBeforeRTS; + -: 530: uint16 EventType; + -: 531: + -: 532: uint16 *RPNPtr; + 7: 533: int32 RPNIndex = 0; + 7: 534: int32 RPNStackDepth = 0; + -: 535: + 7: 536: int32 GoodCount = 0; + 7: 537: int32 BadCount = 0; + 7: 538: int32 UnusedCount = 0; + -: 539: + -: 540: /* + -: 541: ** Verify each entry in the pending actionpoint definition table + -: 542: */ + 1239: 543: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) + -: 544: { + 1232: 545: DefaultState = TableArray[TableIndex].DefaultState; + 1232: 546: RTSId = TableArray[TableIndex].RTSId; + 1232: 547: MaxFailsBeforeRTS = TableArray[TableIndex].MaxFailsBeforeRTS; + 1232: 548: RPNPtr = TableArray[TableIndex].RPNEquation; + 1232: 549: EventType = TableArray[TableIndex].EventType; + -: 550: + 1232: 551: if (DefaultState == LC_ACTION_NOT_USED) + -: 552: { + -: 553: /* + -: 554: ** Unused table entry + -: 555: */ + 176: 556: UnusedCount++; + -: 557: } + 1232: 558: else if ((DefaultState != LC_APSTATE_ACTIVE) && + -: 559: (DefaultState != LC_APSTATE_PASSIVE) && + -: 560: (DefaultState != LC_APSTATE_DISABLED) && + -: 561: (DefaultState != LC_APSTATE_PERMOFF)) + -: 562: { + -: 563: /* + -: 564: ** Invalid default state + -: 565: */ + 176: 566: BadCount++; + 176: 567: EntryResult = LC_ADTVAL_ERR_DEFSTATE; + -: 568: } + 880: 569: else if (RTSId > LC_MAX_VALID_ADT_RTSID) + -: 570: { + -: 571: /* + -: 572: ** Bad RTS ID (limit set by configuration parameter, + -: 573: ** see lc_platform_cfg.h) + -: 574: */ + 176: 575: BadCount++; + 176: 576: EntryResult = LC_ADTVAL_ERR_RTSID; + -: 577: } + 704: 578: else if (MaxFailsBeforeRTS == 0) + -: 579: { + -: 580: /* + -: 581: ** Bad fail count + -: 582: */ + 176: 583: BadCount++; + 176: 584: EntryResult = LC_ADTVAL_ERR_FAILCNT; + -: 585: } + 704: 586: else if ((EventType != CFE_EVS_DEBUG) && + -: 587: (EventType != CFE_EVS_INFORMATION) && + -: 588: (EventType != CFE_EVS_ERROR) && + -: 589: (EventType != CFE_EVS_CRITICAL)) + -: 590: { + -: 591: /* + -: 592: ** Invalid event type + -: 593: */ + 176: 594: BadCount++; + 176: 595: EntryResult = LC_ADTVAL_ERR_EVTTYPE; + -: 596: } + -: 597: else + -: 598: { + -: 599: /* + -: 600: ** Validate reverse polish equation syntax + -: 601: */ + 352: 602: EntryResult = LC_ValidateRPN(RPNPtr, &RPNIndex, &RPNStackDepth); + -: 603: + 352: 604: if (EntryResult != LC_ADTVAL_NO_ERR) + -: 605: { + 176: 606: BadCount++; + -: 607: } + -: 608: else + -: 609: { + 176: 610: GoodCount++; + -: 611: } + -: 612: } + -: 613: + -: 614: /* + -: 615: ** Generate detailed event for "first" error + -: 616: */ + 1232: 617: if ((EntryResult != LC_ADTVAL_NO_ERR) && (TableResult == CFE_SUCCESS)) + -: 618: { + 5: 619: if (EntryResult == LC_ADTVAL_ERR_RPN) + -: 620: { + 1: 621: CFE_EVS_SendEvent(LC_ADTVAL_RPNERR_EID, CFE_EVS_ERROR, + -: 622: "ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d", + -: 623: (int)TableIndex, (int)RPNIndex, (int)RPNStackDepth); + -: 624: } + -: 625: else + -: 626: { + 4: 627: CFE_EVS_SendEvent(LC_ADTVAL_ERR_EID, CFE_EVS_ERROR, + -: 628: "ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d", + -: 629: (int)TableIndex, (int)EntryResult, DefaultState, RTSId, MaxFailsBeforeRTS, EventType ); + -: 630: } + -: 631: + 5: 632: TableResult = EntryResult; + -: 633: } + -: 634: + -: 635: } /* end TableIndex for */ + -: 636: + -: 637: /* + -: 638: ** Generate informational event with error totals + -: 639: */ + 7: 640: CFE_EVS_SendEvent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, + -: 641: "ADT verify results: good = %d, bad = %d, unused = %d", + -: 642: (int)GoodCount, (int)BadCount, (int)UnusedCount); + -: 643: + 7: 644: return(TableResult); + -: 645: + -: 646:} /* end LC_ValidateADT */ + -: 647: + -: 648:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 649:/* */ + -: 650:/* Validate a reverse polish notation (RPN) equation */ + -: 651:/* */ + -: 652:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 358: 653:int32 LC_ValidateRPN(uint16 *RPNPtr, + -: 654: int32 *IndexValue, + -: 655: int32 *StackDepthValue) + -: 656:{ + 358: 657: int32 Result = LC_ADTVAL_NO_ERR; + -: 658: int32 BufferIndex; + -: 659: int32 StackDepth; + -: 660: uint16 BufferItem; + -: 661: + -: 662: /* + -: 663: ** Each equation consists only of watchpoint ID numbers + -: 664: ** and polish symbols (and, or, equal, etc). + -: 665: ** + -: 666: ** Each watchpoint ID increases the stack depth and + -: 667: ** each polish symbol (except "not" which has no + -: 668: ** effect) decreases the stack depth. + -: 669: ** + -: 670: ** The stack depth must never become negative and the + -: 671: ** depth must equal 1 when the "=" symbol is found. + -: 672: ** + -: 673: ** The last symbol in the equation is assumed to be + -: 674: ** the "=" symbol, and the test does not examine any + -: 675: ** further data. + -: 676: */ + 358: 677: StackDepth = 0; + -: 678: + 721: 679: for (BufferIndex = 0; BufferIndex < LC_MAX_RPN_EQU_SIZE; BufferIndex++) + -: 680: { + 721: 681: BufferItem = RPNPtr[BufferIndex]; + -: 682: + 724: 683: if ((BufferItem == LC_RPN_AND) || + -: 684: (BufferItem == LC_RPN_OR) || + -: 685: (BufferItem == LC_RPN_XOR)) + -: 686: { + -: 687: /* + -: 688: ** Depth test will fail if we haven't already counted 2 + -: 689: ** watchpoint ID values + -: 690: */ + 3: 691: StackDepth--; + -: 692: } + 718: 693: else if (BufferItem == LC_RPN_NOT) + -: 694: { + -: 695: /* + -: 696: ** Depth test will fail if this is 1st symbol + -: 697: */ + -: 698: } + 540: 699: else if (BufferItem == LC_RPN_EQUAL) + -: 700: { + -: 701: /* + -: 702: ** Equation ends when LC_RPN_EQUAL is found + -: 703: */ + 180: 704: break; + -: 705: } + 360: 706: else if (BufferItem < LC_MAX_WATCHPOINTS) + -: 707: { + -: 708: /* + -: 709: ** Valid watchpoint ID + -: 710: */ + 183: 711: StackDepth++; + -: 712: } + -: 713: else + -: 714: { + -: 715: /* + -: 716: ** Not a valid polish symbol or watchpoint ID + -: 717: */ + 177: 718: break; + -: 719: } + -: 720: + -: 721: /* + -: 722: ** Must have more watchpoint ID's than polish symbols + -: 723: */ + 364: 724: if (StackDepth <= 0) + -: 725: { + 1: 726: break; + -: 727: } + -: 728: } + -: 729: + -: 730: /* + -: 731: ** Check for valid Reverse Polish Notation equation + -: 732: */ + 538: 733: if ((BufferItem == LC_RPN_EQUAL) && (StackDepth == 1)) + -: 734: { + 180: 735: Result = LC_ADTVAL_NO_ERR; + -: 736: } + -: 737: else + -: 738: { + 178: 739: Result = LC_ADTVAL_ERR_RPN; + -: 740: + -: 741: /* + -: 742: ** Provide additional error information + -: 743: */ + 178: 744: *IndexValue = BufferIndex; + 178: 745: *StackDepthValue = StackDepth; + -: 746: } + -: 747: + 358: 748: return(Result); + -: 749: + -: 750:} /* end LC_ValidateRPN */ + -: 751: + -: 752:/************************/ + -: 753:/* End of File Comment */ + -: 754:/************************/ diff --git a/fsw/unit_test/lc_action_test.c b/fsw/unit_test/lc_action_test.c new file mode 100644 index 0000000..fd5ef4d --- /dev/null +++ b/fsw/unit_test/lc_action_test.c @@ -0,0 +1,1332 @@ + /************************************************************************* + ** File: + ** $Id: lc_action_test.c 1.6 2017/07/06 12:00:29EDT mdeschu Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains unit test cases for the functions contained in the file lc_action.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "lc_action_test.h" +#include "lc_action.h" +#include "lc_app.h" +#include "lc_msg.h" +#include "lc_msgdefs.h" +#include "lc_msgids.h" +#include "lc_events.h" +#include "lc_version.h" +#include "lc_test_utils.h" +#include "ut_osapi_stubs.h" +#include "ut_cfe_sb_stubs.h" +#include "ut_cfe_es_stubs.h" +#include "ut_cfe_es_hooks.h" +#include "ut_cfe_evs_stubs.h" +#include "ut_cfe_evs_hooks.h" +#include "ut_cfe_time_stubs.h" +#include "ut_cfe_psp_memutils_stubs.h" +#include "ut_cfe_psp_watchdog_stubs.h" +#include "ut_cfe_psp_timer_stubs.h" +#include "ut_cfe_tbl_stubs.h" +#include "ut_cfe_fs_stubs.h" +#include "ut_cfe_time_stubs.h" +#include +#include +#include + +/* + * Function Definitions + */ + +void LC_SampleAPs_Test_SingleActionPointNominal(void) +{ + uint16 StartIndex = 0; + uint16 EndIndex = 0; + + LC_OperData.ARTPtr[StartIndex].CurrentState = 99; + + /* Execute the function being tested */ + LC_SampleAPs(StartIndex, EndIndex); + + /* Verify results */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SampleAPs_Test_SingleActionPointNominal */ + +void LC_SampleAPs_Test_SingleActionPointError(void) +{ + uint16 StartIndex = 0; + uint16 EndIndex = 0; + + LC_OperData.ARTPtr[StartIndex].CurrentState = LC_ACTION_NOT_USED; + + /* Execute the function being tested */ + LC_SampleAPs(StartIndex, EndIndex); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSAMPLE_CURR_ERR_EID, CFE_EVS_ERROR, "Sample AP error, invalid current AP state: AP = 0, State = 255"), + "Sample AP error, invalid current AP state: AP = 0, State = 255"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SampleAPs_Test_SingleActionPointError */ + +void LC_SampleAPs_Test_MultiActionPointNominal(void) +{ + uint16 StartIndex = 0; + uint16 EndIndex = 1; + + /* Execute the function being tested */ + LC_SampleAPs(StartIndex, EndIndex); + + /* Verify results */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SampleAPs_Test_MultiActionPointNominal */ + +void LC_SampleSingleAP_Test_StateChangePassToFail(void) +{ + uint16 APNumber = 0; + + LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_ACTIVE; + LC_OperData.ARTPtr[APNumber].ActionResult = LC_ACTION_PASS; + LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent = 0; + LC_OperData.ADTPtr[APNumber].MaxPassFailEvents = 100; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; + + /* Execute the function being tested */ + LC_SampleSingleAP(APNumber); + + /* Verify results */ + UtAssert_True (LC_AppData.APSampleCount == 1, "LC_AppData.APSampleCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_FAIL, "LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_FAIL"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 1, "LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].CumulativeFailCount == 1, "LC_OperData.ARTPtr[APNumber].CumulativeFailCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].PassToFailCount == 1, "LC_OperData.ARTPtr[APNumber].PassToFailCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1, "LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_AP_PASSTOFAIL_INF_EID, CFE_EVS_INFORMATION, "AP state change from PASS to FAIL: AP = 0"), + "AP state change from PASS to FAIL: AP = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_SampleSingleAP_Test_StateChangePassToFail */ + +void LC_SampleSingleAP_Test_ActiveRequestRTS(void) +{ + uint16 APNumber = 0; + + LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_ACTIVE; + LC_OperData.ARTPtr[APNumber].ActionResult = LC_ACTION_FAIL; + LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent = 0; + LC_OperData.ADTPtr[APNumber].MaxPassFailEvents = 100; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; + + LC_OperData.ADTPtr[APNumber].EventID = 1; + LC_OperData.ADTPtr[APNumber].EventType = 2; + + LC_AppData.CurrentLCState = LC_STATE_ACTIVE; + + LC_OperData.ADTPtr[APNumber].MaxFailsBeforeRTS = 5; + LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount = LC_OperData.ADTPtr[APNumber].MaxFailsBeforeRTS; + strncpy(LC_OperData.ADTPtr[APNumber].EventText, "Event Message", 50); + + /* Execute the function being tested */ + LC_SampleSingleAP(APNumber); + + /* Verify results */ + UtAssert_True (LC_OperData.ARTPtr[APNumber].CurrentState == LC_APSTATE_PASSIVE, "LC_OperData.ARTPtr[APNumber].CurrentState == LC_APSTATE_PASSIVE"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].CumulativeRTSExecCount == 1, "LC_OperData.ARTPtr[APNumber].CumulativeRTSExecCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1, "LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1"); + UtAssert_True (LC_AppData.RTSExecCount == 1, "LC_AppData.RTSExecCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_OperData.ADTPtr[APNumber].EventID, LC_OperData.ADTPtr[APNumber].EventType, "Event Message: AP = 0, FailCount = 6, RTS = 0"), + "Event Message: AP = 0, FailCount = 6, RTS = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SampleSingleAP_Test_ActiveRequestRTS */ + +void LC_SampleSingleAP_Test_APFailWhileLCStatePassive(void) +{ + uint16 APNumber = 0; + + LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_ACTIVE; + LC_OperData.ARTPtr[APNumber].ActionResult = LC_ACTION_FAIL; + LC_OperData.ADTPtr[APNumber].MaxPassFailEvents = 100; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; + + LC_OperData.ADTPtr[APNumber].EventID = 1; + LC_OperData.ADTPtr[APNumber].EventType = 2; + + LC_AppData.CurrentLCState = LC_STATE_PASSIVE; + + LC_OperData.ADTPtr[APNumber].MaxFailsBeforeRTS = 5; + LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount = LC_OperData.ADTPtr[APNumber].MaxFailsBeforeRTS; + strncpy(LC_OperData.ADTPtr[APNumber].EventText, "Event Message", 50); + + /* Execute the function being tested */ + LC_SampleSingleAP(APNumber); + + /* Verify results */ + UtAssert_True (LC_OperData.ARTPtr[APNumber].CurrentState == LC_APSTATE_PASSIVE, "LC_OperData.ARTPtr[APNumber].CurrentState == LC_APSTATE_PASSIVE"); + UtAssert_True (LC_AppData.PassiveRTSExecCount == 1, "LC_AppData.PassiveRTSExecCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_PASSIVE_FAIL_DBG_EID, CFE_EVS_DEBUG, "AP failed while LC App passive: AP = 0, FailCount = 6, RTS = 0"), + "AP failed while LC App passive: AP = 0, FailCount = 6, RTS = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SampleSingleAP_Test_APFailWhileLCStatePassive */ + +void LC_SampleSingleAP_Test_APFailWhilePassive(void) +{ + uint16 APNumber = 0; + + LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_PASSIVE; + LC_OperData.ARTPtr[APNumber].ActionResult = LC_ACTION_FAIL; + LC_OperData.ADTPtr[APNumber].MaxPassFailEvents = 100; + LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; + + LC_OperData.ADTPtr[APNumber].EventID = 1; + LC_OperData.ADTPtr[APNumber].EventType = 2; + + LC_OperData.ADTPtr[APNumber].MaxFailsBeforeRTS = 5; + LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount = LC_OperData.ADTPtr[APNumber].MaxFailsBeforeRTS; + strncpy(LC_OperData.ADTPtr[APNumber].EventText, "Event Message", 50); + + LC_OperData.ADTPtr[APNumber].MaxPassiveEvents = 5; + LC_OperData.ARTPtr[APNumber].PassiveAPCount = LC_OperData.ADTPtr[APNumber].MaxPassiveEvents - 1; + + LC_AppData.PassiveRTSExecCount = 0; + + /* Execute the function being tested */ + LC_SampleSingleAP(APNumber); + + /* Verify results */ + UtAssert_True (LC_OperData.ARTPtr[APNumber].PassiveAPCount == 5, "LC_OperData.ARTPtr[APNumber].PassiveAPCount == 5"); + UtAssert_True (LC_AppData.PassiveRTSExecCount == 1, "LC_OperData.ARTPtr[APNumber].PassiveAPCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1, "LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1"); + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_AP_PASSIVE_FAIL_INF_EID, CFE_EVS_INFORMATION, "AP failed while passive: AP = 0, FailCount = 6, RTS = 0"), + "AP failed while passive: AP = 0, FailCount = 6, RTS = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SampleSingleAP_Test_APFailWhilePassive */ + +void LC_SampleSingleAP_Test_StateChangeFailToPass(void) +{ + uint16 APNumber = 0; + + LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_ACTIVE; + LC_OperData.ARTPtr[APNumber].ActionResult = LC_ACTION_FAIL; + LC_OperData.ADTPtr[APNumber].MaxFailPassEvents = 1; + LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_FALSE; + + /* Execute the function being tested */ + LC_SampleSingleAP(APNumber); + + /* Verify results */ + UtAssert_True (LC_AppData.APSampleCount == 1, "LC_AppData.APSampleCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_PASS, "LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_PASS"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].FailToPassCount == 1, "LC_OperData.ARTPtr[APNumber].FailToPassCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1, "LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_AP_FAILTOPASS_INF_EID, CFE_EVS_INFORMATION, "AP state change from FAIL to PASS: AP = 0"), + "AP state change from FAIL to PASS: AP = 0"); + + UtAssert_True (LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 0, "LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SampleSingleAP_Test_StateChangeFailToPass */ + +void LC_SampleSingleAP_Test_ActionStale(void) +{ + uint16 APNumber = 0; + + LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_ACTIVE; + LC_OperData.ARTPtr[APNumber].ActionResult = LC_ACTION_FAIL; + LC_OperData.ADTPtr[APNumber].MaxFailPassEvents = 1; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_STALE; + + /* Execute the function being tested */ + LC_SampleSingleAP(APNumber); + + /* Verify results */ + UtAssert_True (LC_AppData.APSampleCount == 1, "LC_AppData.APSampleCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_STALE, "LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_STALE"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 0, "LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SampleSingleAP_Test_ActionStale */ + +void LC_SampleSingleAP_Test_ActionError(void) +{ + uint16 APNumber = 0; + + LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_ACTIVE; + LC_OperData.ARTPtr[APNumber].ActionResult = LC_ACTION_FAIL; + LC_OperData.ADTPtr[APNumber].MaxFailPassEvents = 1; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_ERROR; + + /* Execute the function being tested */ + LC_SampleSingleAP(APNumber); + + /* Verify results */ + UtAssert_True (LC_AppData.APSampleCount == 1, "LC_AppData.APSampleCount == 1"); + UtAssert_True (LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_ERROR, "LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_ERROR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ACTION_ERROR_ERR_EID, CFE_EVS_ERROR, "AP evaluated to error: AP = 0, Result = 2"), + "AP evaluated to error: AP = 0, Result = 2"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SampleSingleAP_Test_ActionError */ + +void LC_EvaluateRPN_Test_AndWatchFalseOp1(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_AND; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 0; + LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_FALSE; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_PASS, "Result == LC_ACTION_PASS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_AndWatchFalseOp1 */ + +void LC_EvaluateRPN_Test_AndWatchFalseOp2(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_AND; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_FALSE; + LC_OperData.WRTPtr[1].WatchResult = 0; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_PASS, "Result == LC_ACTION_PASS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_AndWatchFalseOp2 */ + +void LC_EvaluateRPN_Test_OrWatchTrueOp1(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_OR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 0; + LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_TRUE; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_FAIL, "Result == LC_ACTION_FAIL"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_OrWatchTrueOp1 */ + +void LC_EvaluateRPN_Test_OrWatchTrueOp2(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_OR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; + LC_OperData.WRTPtr[1].WatchResult = 0; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_FAIL, "Result == LC_ACTION_FAIL"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_OrWatchTrueOp2 */ + +void LC_EvaluateRPN_Test_AndWatchErrorOp1(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_AND; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_ERROR; + LC_OperData.WRTPtr[1].WatchResult = 99; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_AndWatchErrorOp1 */ + +void LC_EvaluateRPN_Test_AndWatchErrorOp2(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_AND; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 99; + LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_ERROR; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_AndWatchErrorOp2 */ + +void LC_EvaluateRPN_Test_OrWatchErrorOp1(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_OR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_ERROR; + LC_OperData.WRTPtr[1].WatchResult = 99; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_OrWatchErrorOp1 */ + +void LC_EvaluateRPN_Test_OrWatchErrorOp2(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_OR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 99; + LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_ERROR; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_OrWatchErrorOp2 */ + +void LC_EvaluateRPN_Test_XorWatchErrorOp1(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_XOR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_ERROR; + LC_OperData.WRTPtr[1].WatchResult = 99; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_XorWatchErrorOp1 */ + +void LC_EvaluateRPN_Test_XorWatchErrorOp2(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_XOR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 99; + LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_ERROR; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_XorWatchErrorOp2 */ + +void LC_EvaluateRPN_Test_NotWatchError(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_NOT; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_ERROR; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_NotWatchError */ + +void LC_EvaluateRPN_Test_AndStaleOp1(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_AND; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_STALE; + LC_OperData.WRTPtr[1].WatchResult = 99; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_STALE, "Result == LC_ACTION_STALE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_AndStaleOp1 */ + +void LC_EvaluateRPN_Test_AndStaleOp2(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_AND; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 99; + LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_STALE; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_STALE, "Result == LC_ACTION_STALE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_AndStaleOp2 */ + +void LC_EvaluateRPN_Test_OrStaleOp1(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_OR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_STALE; + LC_OperData.WRTPtr[1].WatchResult = 99; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_STALE, "Result == LC_ACTION_STALE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_OrStaleOp1 */ + +void LC_EvaluateRPN_Test_OrStaleOp2(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_OR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 99; + LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_STALE; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_STALE, "Result == LC_ACTION_STALE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_OrStaleOp2 */ + +void LC_EvaluateRPN_Test_XorStaleOp1(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_XOR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_STALE; + LC_OperData.WRTPtr[1].WatchResult = 99; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_STALE, "Result == LC_ACTION_STALE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_XorStaleOp1 */ + +void LC_EvaluateRPN_Test_XorStaleOp2(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_XOR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 99; + LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_STALE; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_STALE, "Result == LC_ACTION_STALE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_XorStaleOp2 */ + +void LC_EvaluateRPN_Test_NotStale(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_NOT; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_STALE; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_STALE, "Result == LC_ACTION_STALE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_NotStale */ + +void LC_EvaluateRPN_Test_AndNominal(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_AND; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 77; + LC_OperData.WRTPtr[1].WatchResult = 99; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_FAIL, "Result == LC_ACTION_FAIL"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_AndNominal */ + +void LC_EvaluateRPN_Test_OrNominal(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_OR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 77; + LC_OperData.WRTPtr[1].WatchResult = 99; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_PASS, "Result == LC_ACTION_PASS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_OrNominal */ + +void LC_EvaluateRPN_Test_XorNominal(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_XOR; + LC_OperData.ADTPtr[APNumber].RPNEquation[3] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 77; + LC_OperData.WRTPtr[1].WatchResult = 99; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_XorNominal */ + +void LC_EvaluateRPN_Test_NotNominal(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_NOT; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 77; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == FALSE, "Result == FALSE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_NotNominal */ + +void LC_EvaluateRPN_Test_EqualIllegalRPN(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = 1; + LC_OperData.ADTPtr[APNumber].RPNEquation[2] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 77; + LC_OperData.WRTPtr[1].WatchResult = 77; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_INVALID_RPN_ERR_EID, CFE_EVS_ERROR, "AP has illegal RPN expression: AP = 0, LastOperand = 2, StackPtr = 1"), + "AP has illegal RPN expression: AP = 0, LastOperand = 2, StackPtr = 1"); + + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_EvaluateRPN_Test_EqualIllegalRPN */ + +void LC_EvaluateRPN_Test_WatchpointNumberNominal(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = 0; + LC_OperData.ADTPtr[APNumber].RPNEquation[1] = LC_RPN_EQUAL; + + LC_OperData.WRTPtr[0].WatchResult = 77; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == 77, "Result == 77"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvaluateRPN_Test_WatchpointNumberNominal */ + +void LC_EvaluateRPN_Test_DefaultIllegalRPN(void) +{ + uint8 Result; + uint16 APNumber = 0; + + LC_OperData.ADTPtr[APNumber].RPNEquation[0] = LC_MAX_WATCHPOINTS; + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_INVALID_RPN_ERR_EID, CFE_EVS_ERROR, "AP has illegal RPN expression: AP = 0, LastOperand = 0, StackPtr = 0"), + "AP has illegal RPN expression: AP = 0, LastOperand = 0, StackPtr = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_EvaluateRPN_Test_DefaultIllegalRPN */ + +void LC_EvaluateRPN_Test_EndOfBufferWhenNotDone(void) +{ + uint8 Result; + uint16 APNumber = 0; + uint32 i; + + for (i = 0; i <= LC_MAX_RPN_EQU_SIZE; i++) + { + LC_OperData.ADTPtr[APNumber].RPNEquation[i] = 0; + LC_OperData.WRTPtr[i].WatchResult = 77; + } + + /* Execute the function being tested */ + Result = LC_EvaluateRPN(APNumber); + + /* Verify results */ + UtAssert_True (Result == LC_ACTION_ERROR, "Result == LC_ACTION_ERROR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_INVALID_RPN_ERR_EID, CFE_EVS_ERROR, "AP has illegal RPN expression: AP = 0, LastOperand = 19, StackPtr = 20"), + "AP has illegal RPN expression: AP = 0, LastOperand = 19, StackPtr = 20"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_EvaluateRPN_Test_EndOfBufferWhenNotDone */ + +void LC_ValidateADT_Test_ActionNotUsed(void) +{ + uint8 Result; + uint32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) + { + LC_OperData.ADTPtr[TableIndex].DefaultState = LC_ACTION_NOT_USED; + } + + /* Execute the function being tested */ + Result = LC_ValidateADT(LC_OperData.ADTPtr); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, "ADT verify results: good = 0, bad = 0, unused = 176"), + "ADT verify results: good = 0, bad = 0, unused = 176"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ValidateADT_Test_ActionNotUsed */ + +void LC_ValidateADT_Test_InvalidDefaultState(void) +{ + uint8 Result; + uint32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) + { + LC_OperData.ADTPtr[TableIndex].DefaultState = 99; + LC_OperData.ADTPtr[TableIndex].RTSId = 88; + LC_OperData.ADTPtr[TableIndex].MaxFailsBeforeRTS = 77; + LC_OperData.ADTPtr[TableIndex].EventType = 66; + } + + /* Execute the function being tested */ + Result = LC_ValidateADT(LC_OperData.ADTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_ERR_DEFSTATE, "Result == LC_ADTVAL_ERR_DEFSTATE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_ERR_EID, CFE_EVS_ERROR, "ADT verify err: AP = 0, Err = 1, State = 99, RTS = 88, FailCnt = 77, EvtType = 66"), + "ADT verify err: AP = 0, Err = 1, State = 99, RTS = 88, FailCnt = 77, EvtType = 66"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, "ADT verify results: good = 0, bad = 176, unused = 0"), + "ADT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateADT_Test_InvalidDefaultState */ + +void LC_ValidateADT_Test_BadRtsID(void) +{ + uint8 Result; + uint32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) + { + LC_OperData.ADTPtr[TableIndex].DefaultState = LC_APSTATE_ACTIVE; + LC_OperData.ADTPtr[TableIndex].RTSId = LC_MAX_VALID_ADT_RTSID + 1; + LC_OperData.ADTPtr[TableIndex].MaxFailsBeforeRTS = 77; + LC_OperData.ADTPtr[TableIndex].EventType = 66; + } + + /* Execute the function being tested */ + Result = LC_ValidateADT(LC_OperData.ADTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_ERR_RTSID, "Result == LC_ADTVAL_ERR_RTSID"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_ERR_EID, CFE_EVS_ERROR, "ADT verify err: AP = 0, Err = 2, State = 1, RTS = 65521, FailCnt = 77, EvtType = 66"), + "ADT verify err: AP = 0, Err = 2, State = 1, RTS = 65521, FailCnt = 77, EvtType = 66"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, "ADT verify results: good = 0, bad = 176, unused = 0"), + "ADT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateADT_Test_BadRtsID */ + +void LC_ValidateADT_Test_BadFailCount(void) +{ + uint8 Result; + uint32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) + { + LC_OperData.ADTPtr[TableIndex].DefaultState = LC_APSTATE_ACTIVE; + LC_OperData.ADTPtr[TableIndex].RTSId = 1; + LC_OperData.ADTPtr[TableIndex].MaxFailsBeforeRTS = 0; + LC_OperData.ADTPtr[TableIndex].EventType = 66; + } + + /* Execute the function being tested */ + Result = LC_ValidateADT(LC_OperData.ADTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_ERR_FAILCNT, "Result == LC_ADTVAL_ERR_FAILCNT"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_ERR_EID, CFE_EVS_ERROR, "ADT verify err: AP = 0, Err = 3, State = 1, RTS = 1, FailCnt = 0, EvtType = 66"), + "ADT verify err: AP = 0, Err = 3, State = 1, RTS = 1, FailCnt = 0, EvtType = 66"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, "ADT verify results: good = 0, bad = 176, unused = 0"), + "ADT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateADT_Test_BadFailCount */ + +void LC_ValidateADT_Test_InvalidEventType(void) +{ + uint8 Result; + uint32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) + { + LC_OperData.ADTPtr[TableIndex].DefaultState = LC_APSTATE_ACTIVE; + LC_OperData.ADTPtr[TableIndex].RTSId = 1; + LC_OperData.ADTPtr[TableIndex].MaxFailsBeforeRTS = 88; + LC_OperData.ADTPtr[TableIndex].EventType = 99; + } + + /* Execute the function being tested */ + Result = LC_ValidateADT(LC_OperData.ADTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_ERR_EVTTYPE, "Result == LC_ADTVAL_ERR_EVTTYPE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_ERR_EID, CFE_EVS_ERROR, "ADT verify err: AP = 0, Err = 4, State = 1, RTS = 1, FailCnt = 88, EvtType = 99"), + "ADT verify err: AP = 0, Err = 4, State = 1, RTS = 1, FailCnt = 88, EvtType = 99"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, "ADT verify results: good = 0, bad = 176, unused = 0"), + "ADT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateADT_Test_InvalidEventType */ + +void LC_ValidateADT_Test_ValidateRpnAdtValError(void) +{ + uint8 Result; + uint32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) + { + LC_OperData.ADTPtr[TableIndex].DefaultState = LC_APSTATE_ACTIVE; + LC_OperData.ADTPtr[TableIndex].RTSId = 1; + LC_OperData.ADTPtr[TableIndex].MaxFailsBeforeRTS = 88; + LC_OperData.ADTPtr[TableIndex].EventType = CFE_EVS_DEBUG; + LC_OperData.ADTPtr[TableIndex].RPNEquation[0] = 999; + } + + /* Execute the function being tested */ + Result = LC_ValidateADT(LC_OperData.ADTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_ERR_RPN, "Result == LC_ADTVAL_ERR_RPN"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_RPNERR_EID, CFE_EVS_ERROR, "ADT verify RPN err: AP = 0, Index = 0, StackDepth = 0"), + "ADT verify RPN err: AP = 0, Index = 0, StackDepth = 0"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, "ADT verify results: good = 0, bad = 176, unused = 0"), + "ADT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateADT_Test_ValidateRpnAdtValError */ + +void LC_ValidateADT_Test_ValidateRpnAdtValNoError(void) +{ + uint8 Result; + uint32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) + { + LC_OperData.ADTPtr[TableIndex].DefaultState = LC_APSTATE_ACTIVE; + LC_OperData.ADTPtr[TableIndex].RTSId = 1; + LC_OperData.ADTPtr[TableIndex].MaxFailsBeforeRTS = 88; + LC_OperData.ADTPtr[TableIndex].EventType = CFE_EVS_DEBUG; + + LC_OperData.ADTPtr[TableIndex].RPNEquation[0] = LC_MAX_WATCHPOINTS - 1; + LC_OperData.ADTPtr[TableIndex].RPNEquation[1] = LC_RPN_NOT; + LC_OperData.ADTPtr[TableIndex].RPNEquation[2] = LC_RPN_EQUAL; + } + + /* Execute the function being tested */ + Result = LC_ValidateADT(LC_OperData.ADTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_NO_ERR, "Result == LC_ADTVAL_NO_ERR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, "ADT verify results: good = 176, bad = 0, unused = 0"), + "ADT verify results: good = 176, bad = 0, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ValidateADT_Test_ValidateRpnAdtValNoError */ + +void LC_ValidateRPN_Test_RpnAnd(void) +{ + uint8 Result; + + int32 IndexValue, StackDepthValue; + + LC_OperData.ADTPtr[0].RPNEquation[0] = LC_MAX_WATCHPOINTS - 1; + LC_OperData.ADTPtr[0].RPNEquation[1] = LC_MAX_WATCHPOINTS - 2; + LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_AND; + LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; + + /* Execute the function being tested */ + Result = LC_ValidateRPN(LC_OperData.ADTPtr[0].RPNEquation, &IndexValue, &StackDepthValue); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_NO_ERR, "Result == LC_ADTVAL_NO_ERR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ValidateRPN_Test_RpnAnd */ + +void LC_ValidateRPN_Test_RpnOr(void) +{ + uint8 Result; + + int32 IndexValue, StackDepthValue; + + LC_OperData.ADTPtr[0].RPNEquation[0] = LC_MAX_WATCHPOINTS - 1; + LC_OperData.ADTPtr[0].RPNEquation[1] = LC_MAX_WATCHPOINTS - 2; + LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_OR; + LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; + + /* Execute the function being tested */ + Result = LC_ValidateRPN(LC_OperData.ADTPtr[0].RPNEquation, &IndexValue, &StackDepthValue); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_NO_ERR, "Result == LC_ADTVAL_NO_ERR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ValidateRPN_Test_RpnOr */ + +void LC_ValidateRPN_Test_RpnXor(void) +{ + uint8 Result; + + int32 IndexValue, StackDepthValue; + + LC_OperData.ADTPtr[0].RPNEquation[0] = LC_MAX_WATCHPOINTS - 1; + LC_OperData.ADTPtr[0].RPNEquation[1] = LC_MAX_WATCHPOINTS - 2; + LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_XOR; + LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; + + /* Execute the function being tested */ + Result = LC_ValidateRPN(LC_OperData.ADTPtr[0].RPNEquation, &IndexValue, &StackDepthValue); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_NO_ERR, "Result == LC_ADTVAL_NO_ERR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ValidateRPN_Test_RpnXor */ + +void LC_ValidateRPN_Test_RpnNot(void) +{ + uint8 Result; + + int32 IndexValue, StackDepthValue; + + LC_OperData.ADTPtr[0].RPNEquation[0] = LC_MAX_WATCHPOINTS - 1; + LC_OperData.ADTPtr[0].RPNEquation[1] = LC_RPN_NOT; + LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_EQUAL; + + /* Execute the function being tested */ + Result = LC_ValidateRPN(LC_OperData.ADTPtr[0].RPNEquation, &IndexValue, &StackDepthValue); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_NO_ERR, "Result == LC_ADTVAL_NO_ERR"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ValidateRPN_Test_RpnNot */ + +void LC_ValidateRPN_Test_StackDepthZero(void) +{ + uint8 Result; + + int32 IndexValue, StackDepthValue; + + LC_OperData.ADTPtr[0].RPNEquation[0] = LC_RPN_NOT; + + /* Execute the function being tested */ + Result = LC_ValidateRPN(LC_OperData.ADTPtr[0].RPNEquation, &IndexValue, &StackDepthValue); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_ERR_RPN, "Result == LC_ADTVAL_ERR_RPN"); + UtAssert_True (IndexValue == 0, "IndexValue == 0"); + UtAssert_True (StackDepthValue == 0, "StackDepthValue == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ValidateRPN_Test_StackDepthZero */ + +void LC_ValidateRPN_Test_InvalidBufferItem(void) +{ + uint8 Result; + + int32 IndexValue, StackDepthValue; + + LC_OperData.ADTPtr[0].RPNEquation[0] = LC_MAX_WATCHPOINTS; + + /* Execute the function being tested */ + Result = LC_ValidateRPN(LC_OperData.ADTPtr[0].RPNEquation, &IndexValue, &StackDepthValue); + + /* Verify results */ + UtAssert_True (Result == LC_ADTVAL_ERR_RPN, "Result == LC_ADTVAL_ERR_RPN"); + UtAssert_True (IndexValue == 0, "IndexValue == 0"); + UtAssert_True (StackDepthValue == 0, "StackDepthValue == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ValidateRPN_Test_InvalidBufferItem */ + +void LC_Action_Test_AddTestCases(void) +{ + UtTest_Add(LC_SampleAPs_Test_SingleActionPointNominal, LC_Test_Setup, LC_Test_TearDown, "LC_SampleAPs_Test_SingleActionPointNominal"); + UtTest_Add(LC_SampleAPs_Test_SingleActionPointError, LC_Test_Setup, LC_Test_TearDown, "LC_SampleAPs_Test_SingleActionPointError"); + UtTest_Add(LC_SampleAPs_Test_MultiActionPointNominal, LC_Test_Setup, LC_Test_TearDown, "LC_SampleAPs_Test_MultiActionPointNominal"); + + UtTest_Add(LC_SampleSingleAP_Test_StateChangePassToFail, LC_Test_Setup, LC_Test_TearDown, "LC_SampleSingleAP_Test_StateChangePassToFail"); + UtTest_Add(LC_SampleSingleAP_Test_ActiveRequestRTS, LC_Test_Setup, LC_Test_TearDown, "LC_SampleSingleAP_Test_ActiveRequestRTS"); + UtTest_Add(LC_SampleSingleAP_Test_APFailWhileLCStatePassive, LC_Test_Setup, LC_Test_TearDown, "LC_SampleSingleAP_Test_APFailWhileLCStatePassive"); + UtTest_Add(LC_SampleSingleAP_Test_APFailWhilePassive, LC_Test_Setup, LC_Test_TearDown, "LC_SampleSingleAP_Test_APFailWhilePassive"); + UtTest_Add(LC_SampleSingleAP_Test_StateChangeFailToPass, LC_Test_Setup, LC_Test_TearDown, "LC_SampleSingleAP_Test_StateChangeFailToPass"); + UtTest_Add(LC_SampleSingleAP_Test_ActionStale, LC_Test_Setup, LC_Test_TearDown, "LC_SampleSingleAP_Test_ActionStale"); + UtTest_Add(LC_SampleSingleAP_Test_ActionError, LC_Test_Setup, LC_Test_TearDown, "LC_SampleSingleAP_Test_ActionError"); + + UtTest_Add(LC_EvaluateRPN_Test_AndWatchFalseOp1, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_AndWatchFalseOp1"); + UtTest_Add(LC_EvaluateRPN_Test_AndWatchFalseOp2, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_AndWatchFalseOp2"); + UtTest_Add(LC_EvaluateRPN_Test_OrWatchTrueOp1, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_OrWatchTrueOp1"); + UtTest_Add(LC_EvaluateRPN_Test_OrWatchTrueOp2, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_OrWatchTrueOp2"); + UtTest_Add(LC_EvaluateRPN_Test_AndWatchErrorOp1, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_AndWatchErrorOp1"); + UtTest_Add(LC_EvaluateRPN_Test_AndWatchErrorOp2, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_AndWatchErrorOp2"); + UtTest_Add(LC_EvaluateRPN_Test_OrWatchErrorOp1, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_OrWatchErrorOp1"); + UtTest_Add(LC_EvaluateRPN_Test_OrWatchErrorOp2, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_OrWatchErrorOp2"); + UtTest_Add(LC_EvaluateRPN_Test_XorWatchErrorOp1, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_XorWatchErrorOp1"); + UtTest_Add(LC_EvaluateRPN_Test_XorWatchErrorOp2, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_XorWatchErrorOp2"); + UtTest_Add(LC_EvaluateRPN_Test_NotWatchError, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_NotWatchError"); + UtTest_Add(LC_EvaluateRPN_Test_AndStaleOp1, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_AndStaleOp1"); + UtTest_Add(LC_EvaluateRPN_Test_AndStaleOp2, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_AndStaleOp2"); + UtTest_Add(LC_EvaluateRPN_Test_OrStaleOp1, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_OrStaleOp1"); + UtTest_Add(LC_EvaluateRPN_Test_OrStaleOp2, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_OrStaleOp2"); + UtTest_Add(LC_EvaluateRPN_Test_XorStaleOp1, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_XorStaleOp1"); + UtTest_Add(LC_EvaluateRPN_Test_XorStaleOp2, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_XorStaleOp2"); + UtTest_Add(LC_EvaluateRPN_Test_NotStale, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_NotStale"); + UtTest_Add(LC_EvaluateRPN_Test_AndNominal, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_AndNominal"); + UtTest_Add(LC_EvaluateRPN_Test_OrNominal, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_OrNominal"); + UtTest_Add(LC_EvaluateRPN_Test_XorNominal, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_XorNominal"); + UtTest_Add(LC_EvaluateRPN_Test_NotNominal, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_NotNominal"); + UtTest_Add(LC_EvaluateRPN_Test_EqualIllegalRPN, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_EqualIllegalRPN"); + UtTest_Add(LC_EvaluateRPN_Test_WatchpointNumberNominal, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_WatchpointNumberNominal"); + UtTest_Add(LC_EvaluateRPN_Test_DefaultIllegalRPN, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_DefaultIllegalRPN"); + UtTest_Add(LC_EvaluateRPN_Test_EndOfBufferWhenNotDone, LC_Test_Setup, LC_Test_TearDown, "LC_EvaluateRPN_Test_EndOfBufferWhenNotDone"); + + UtTest_Add(LC_ValidateADT_Test_ActionNotUsed, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateADT_Test_ActionNotUsed"); + UtTest_Add(LC_ValidateADT_Test_InvalidDefaultState, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateADT_Test_InvalidDefaultState"); + UtTest_Add(LC_ValidateADT_Test_BadRtsID, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateADT_Test_BadRtsID"); + UtTest_Add(LC_ValidateADT_Test_BadFailCount, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateADT_Test_BadFailCount"); + UtTest_Add(LC_ValidateADT_Test_InvalidEventType, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateADT_Test_InvalidEventType"); + UtTest_Add(LC_ValidateADT_Test_ValidateRpnAdtValError, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateADT_Test_ValidateRpnAdtValError"); + UtTest_Add(LC_ValidateADT_Test_ValidateRpnAdtValNoError, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateADT_Test_ValidateRpnAdtValNoError"); + + UtTest_Add(LC_ValidateRPN_Test_RpnAnd, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateRPN_Test_RpnAnd"); + UtTest_Add(LC_ValidateRPN_Test_RpnOr, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateRPN_Test_RpnOr"); + UtTest_Add(LC_ValidateRPN_Test_RpnXor, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateRPN_Test_RpnXor"); + UtTest_Add(LC_ValidateRPN_Test_RpnNot, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateRPN_Test_RpnNot"); + UtTest_Add(LC_ValidateRPN_Test_StackDepthZero, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateRPN_Test_StackDepthZero"); + UtTest_Add(LC_ValidateRPN_Test_InvalidBufferItem, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateRPN_Test_InvalidBufferItem"); + +} /* end LC_Action_Test_AddTestCases */ + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_action_test.h b/fsw/unit_test/lc_action_test.h new file mode 100644 index 0000000..4f98f29 --- /dev/null +++ b/fsw/unit_test/lc_action_test.h @@ -0,0 +1,41 @@ + /************************************************************************* + ** File: + ** $Id: lc_action_test.h 1.2 2017/01/22 17:24:36EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains the function prototypes for the unit test cases for lc_action.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "utassert.h" +#include "uttest.h" + +/* + * Function Prototypes + */ + +void LC_Action_Test_AddTestCases(void); + + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_app.c.gcov b/fsw/unit_test/lc_app.c.gcov new file mode 100644 index 0000000..f15572b --- /dev/null +++ b/fsw/unit_test/lc_app.c.gcov @@ -0,0 +1,1030 @@ + -: 0:Source:../src/lc_app.c + -: 0:Programs:5 + -: 1:/************************************************************************ + -: 2:** File: + -: 3:** $Id: lc_app.c.gcov 1.4 2017/01/12 12:47:11EST czogby Exp $ + -: 4:** + -: 5:** Copyright � 2007-2014 United States Government as represented by the + -: 6:** Administrator of the National Aeronautics and Space Administration. + -: 7:** All Other Rights Reserved. + -: 8:** + -: 9:** This software was created at NASA's Goddard Space Flight Center. + -: 10:** This software is governed by the NASA Open Source Agreement and may be + -: 11:** used, distributed and modified only pursuant to the terms of that + -: 12:** agreement. + -: 13:** + -: 14:** Purpose: + -: 15:** The CFS Limit Checker (LC) is a table driven application + -: 16:** that provides telemetry monitoring and autonomous response + -: 17:** capabilities to Core Flight Executive (cFE) based systems. + -: 18:** + -: 19:** $Log: lc_app.c.gcov $ + -: 19:** Revision 1.4 2017/01/12 12:47:11EST czogby + -: 19:** Move function prototypes from .c to .h, and fix comments + -: 20:** Revision 1.5 2016/11/21 13:17:58EST mdeschu + -: 21:** Cleaned up CFE_EVS_SendEvent format warnings by using C-Style casts + -: 22:** Revision 1.4 2016/11/21 12:51:00EST mdeschu + -: 23:** Determined unused variables are not necessary as there are others that are used to determine + -: 24:** the validity of the run-time state. + -: 25:** + -: 26:** In LC_CreateTaskCDS replaced run-time conditional with a compile-time conditional + -: 27:** Revision 1.3 2016/11/18 13:40:34EST mdeschu + -: 28:** In lc_app.c, in the function LC_TableInit, moved final else-case that generates the event message "LC use of Critical Data Store disabled" + -: 29:** so that it's the else-case of "if ((LC_OperData.TableResults & LC_CDS_ENABLED) == LC_CDS_ENABLED)". + -: 30:** Revision 1.2 2015/11/16 14:26:17EST wmoleski + -: 31:** Most of the files were missing the Copyright comments. + -: 32:** Revision 1.3 2015/03/04 16:11:32EST sstrege + -: 33:** Added copyright information + -: 34:** Revision 1.2 2012/10/01 16:23:59EDT lwalling + -: 35:** Added local variable to avoid comparing 2 macros in function LC_CreateTaskCDS() + -: 36:** Revision 1.1 2012/07/31 13:53:36PDT nschweis + -: 37:** Initial revision + -: 38:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj + -: 39:** Revision 1.16 2011/10/04 17:00:30EDT lwalling + -: 40:** Must load AP def table before init AP results table + -: 41:** Revision 1.15 2011/06/08 16:07:40EDT lwalling + -: 42:** Change call from LC_SubscribeWP() to LC_CreateHashTable() + -: 43:** Revision 1.14 2011/03/10 14:11:10EST lwalling + -: 44:** Cleanup use of debug events during task startup + -: 45:** Revision 1.13 2011/03/02 10:53:23EST lwalling + -: 46:** Explicitly state return value when known to be CFE_SUCCESS + -: 47:** Revision 1.12 2011/03/01 15:38:50EST lwalling + -: 48:** Cleanup local function prototypes, move LC_SubscribeWP() and LC_UpdateTaskCDS() to lc_cmds.c + -: 49:** Revision 1.11 2011/03/01 09:35:30EST lwalling + -: 50:** Modified startup logic re use of CDS and critical tables + -: 51:** Revision 1.10 2011/02/14 16:57:13EST lwalling + -: 52:** Created LC_StartedNoCDS() to clear results tables after CDS load error + -: 53:** Revision 1.9 2011/01/19 11:32:06EST jmdagost + -: 54:** Moved mission revision number from lc_version.h to lc_platform_cfg.h. + -: 55:** Revision 1.8 2010/03/08 10:37:09EST lwalling + -: 56:** Move saved, not saved state definitions to common header file + -: 57:** Revision 1.7 2009/06/12 14:17:23EDT rmcgraw + -: 58:** DCR82191:1 Changed OS_Mem function calls to CFE_PSP_Mem + -: 59:** Revision 1.6 2009/02/23 11:15:10EST dahardis + -: 60:** Added code to update the application data in the CDS on + -: 61:** application startup after the "saved on exit" flag is reset + -: 62:** (see DCR 7084) + -: 63:** Revision 1.5 2009/01/15 15:36:11EST dahardis + -: 64:** Unit test fixes + -: 65:** Revision 1.4 2008/12/10 15:34:07EST dahardis + -: 66:** Altered CDS restoration processing according to + -: 67:** DCR 4680 + -: 68:** Revision 1.3 2008/12/10 09:38:33EST dahardis + -: 69:** Fixed calls to CFE_TBL_GetAddress (DCR #4699) + -: 70:** Revision 1.2 2008/12/03 13:59:44EST dahardis + -: 71:** Corrections from peer code review + -: 72:** Revision 1.1 2008/10/29 14:18:51EDT dahardison + -: 73:** Initial revision + -: 74:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj + -: 75:** + -: 76:*************************************************************************/ + -: 77: + -: 78:/************************************************************************ + -: 79:** Includes + -: 80:*************************************************************************/ + -: 81:#include "lc_app.h" + -: 82:#include "lc_events.h" + -: 83:#include "lc_msgids.h" + -: 84:#include "lc_perfids.h" + -: 85:#include "lc_version.h" + -: 86:#include "lc_cmds.h" + -: 87:#include "lc_action.h" + -: 88:#include "lc_watch.h" + -: 89:#include "lc_platform_cfg.h" + -: 90:#include "lc_mission_cfg.h" /* Leave these two last to make sure all */ + -: 91:#include "lc_verify.h" /* LC configuration parameters are checked */ + -: 92: + -: 93:/************************************************************************ + -: 94:** LC Global Data + -: 95:*************************************************************************/ + -: 96:LC_OperData_t LC_OperData; + -: 97:LC_AppData_t LC_AppData; + -: 98: + -: 99:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 100:/* */ + -: 101:/* LC application entry point and main process loop */ + -: 102:/* */ + -: 103:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 104: + 4: 105:void LC_AppMain(void) + -: 106:{ + 4: 107: int32 Status = CFE_SUCCESS; + 4: 108: uint32 RunStatus = CFE_ES_APP_RUN; + -: 109: + -: 110: /* + -: 111: ** Performance Log, Start + -: 112: */ + 4: 113: CFE_ES_PerfLogEntry(LC_APPMAIN_PERF_ID); + -: 114: + -: 115: /* + -: 116: ** Register this application with Executive Services + -: 117: */ + 4: 118: Status = CFE_ES_RegisterApp(); + -: 119: + -: 120: /* + -: 121: ** Perform application specific initialization + -: 122: */ + 4: 123: if (Status == CFE_SUCCESS) + -: 124: { + 3: 125: Status = LC_AppInit(); + -: 126: } + -: 127: + -: 128: /* + -: 129: ** Check for start-up error... + -: 130: */ + 4: 131: if (Status != CFE_SUCCESS) + -: 132: { + -: 133: /* + -: 134: ** Set run status to terminate main loop + -: 135: */ + 2: 136: RunStatus = CFE_ES_APP_ERROR; + -: 137: } + -: 138: + -: 139: /* + -: 140: ** Application main loop + -: 141: */ + 10: 142: while(CFE_ES_RunLoop(&RunStatus) == TRUE) + -: 143: { + -: 144: /* + -: 145: ** Performance Log, Stop + -: 146: */ + 2: 147: CFE_ES_PerfLogExit(LC_APPMAIN_PERF_ID); + -: 148: + -: 149: /* + -: 150: ** Pend on the arrival of the next Software Bus message + -: 151: */ + 2: 152: Status = CFE_SB_RcvMsg(&LC_OperData.MsgPtr, LC_OperData.CmdPipe, CFE_SB_PEND_FOREVER); + -: 153: + -: 154: /* + -: 155: ** Performance Log, Start + -: 156: */ + 2: 157: CFE_ES_PerfLogEntry(LC_APPMAIN_PERF_ID); + -: 158: + -: 159: /* + -: 160: ** Process the software bus message + -: 161: */ + 2: 162: if (Status == CFE_SUCCESS) + -: 163: { + 1: 164: Status = LC_AppPipe(LC_OperData.MsgPtr); + -: 165: } + -: 166: + -: 167: /* + -: 168: ** Note: If there were some reason to exit the task + -: 169: ** normally (without error) then we would set + -: 170: ** RunStatus = CFE_ES_APP_EXIT + -: 171: */ + 2: 172: if (Status != CFE_SUCCESS) + -: 173: { + -: 174: /* + -: 175: ** Set request to terminate main loop + -: 176: */ + 1: 177: RunStatus = CFE_ES_APP_ERROR; + -: 178: } + -: 179: + -: 180: } /* end CFS_ES_RunLoop while */ + -: 181: + -: 182: /* + -: 183: ** Check for "fatal" process error... + -: 184: */ + 4: 185: if (Status != CFE_SUCCESS) + -: 186: { + -: 187: /* + -: 188: ** Send an event describing the reason for the termination + -: 189: */ + 3: 190: CFE_EVS_SendEvent(LC_TASK_EXIT_EID, CFE_EVS_CRITICAL, + -: 191: "Task terminating, err = 0x%08X", (unsigned int)Status); + -: 192: + -: 193: /* + -: 194: ** In case cFE Event Services is not working + -: 195: */ + 3: 196: CFE_ES_WriteToSysLog("LC task terminating, err = 0x%08X\n", (unsigned int)Status); + -: 197: } + -: 198: + -: 199: /* + -: 200: ** Performance Log, Stop + -: 201: */ + 4: 202: CFE_ES_PerfLogExit(LC_APPMAIN_PERF_ID); + -: 203: + -: 204: /* + -: 205: ** Do not update CDS if inactive or startup was incomplete + -: 206: */ + 5: 207: if ((LC_OperData.HaveActiveCDS) && + 1: 208: (LC_AppData.CDSSavedOnExit == LC_CDS_SAVED)) + -: 209: { + 1: 210: LC_UpdateTaskCDS(); + -: 211: } + -: 212: + -: 213: /* + -: 214: ** Exit the application + -: 215: */ + 4: 216: CFE_ES_ExitApp(RunStatus); + -: 217: + 4: 218:} /* end LC_AppMain */ + -: 219: + -: 220: + -: 221:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 222:/* */ + -: 223:/* LC initialization */ + -: 224:/* */ + -: 225:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 226: + 7: 227:int32 LC_AppInit(void) + -: 228:{ + 7: 229: int32 Status = CFE_SUCCESS; + -: 230: + -: 231: /* + -: 232: ** Zero out the global data structures... + -: 233: */ + 7: 234: CFE_PSP_MemSet(&LC_OperData, 0, sizeof(LC_OperData_t)); + 7: 235: CFE_PSP_MemSet(&LC_AppData, 0, sizeof(LC_AppData_t)); + -: 236: + -: 237: /* + -: 238: ** Initialize event services + -: 239: */ + 7: 240: Status = LC_EvsInit(); + 7: 241: if (Status != CFE_SUCCESS) + -: 242: { + 1: 243: return(Status); + -: 244: } + -: 245: + -: 246: /* + -: 247: ** Initialize software bus + -: 248: */ + 6: 249: Status = LC_SbInit(); + 6: 250: if (Status != CFE_SUCCESS) + -: 251: { + 2: 252: return(Status); + -: 253: } + -: 254: + -: 255: /* + -: 256: ** Initialize table services + -: 257: */ + 4: 258: Status = LC_TableInit(); + 4: 259: if (Status != CFE_SUCCESS) + -: 260: { + 1: 261: return(Status); + -: 262: } + -: 263: + -: 264: /* + -: 265: ** If we get here, all is good + -: 266: ** Issue the application startup event message + -: 267: */ + 3: 268: CFE_EVS_SendEvent(LC_INIT_INF_EID, CFE_EVS_INFORMATION, + -: 269: "LC Initialized. Version %d.%d.%d.%d", + -: 270: LC_MAJOR_VERSION, + -: 271: LC_MINOR_VERSION, + -: 272: LC_REVISION, + -: 273: LC_MISSION_REV); + -: 274: + 3: 275: return(CFE_SUCCESS); + -: 276: + -: 277:} /* end LC_AppInit */ + -: 278: + -: 279: + -: 280:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 281:/* */ + -: 282:/* Initialize event services interface */ + -: 283:/* */ + -: 284:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 285: + 9: 286:int32 LC_EvsInit(void) + -: 287:{ + 9: 288: int32 Status = CFE_SUCCESS; + -: 289: + -: 290: /* + -: 291: ** If an application event filter table is added + -: 292: ** in the future, initialize it here + -: 293: */ + -: 294: + -: 295: /* + -: 296: ** Register for event services + -: 297: */ + 9: 298: Status = CFE_EVS_Register(NULL, 0, CFE_EVS_BINARY_FILTER); + -: 299: + 9: 300: if (Status != CFE_SUCCESS) + -: 301: { + 2: 302: CFE_ES_WriteToSysLog("LC App: Error Registering For Event Services, RC = 0x%08X\n", (unsigned int)Status); + 2: 303: return (Status); + -: 304: } + -: 305: + 7: 306: return(CFE_SUCCESS); + -: 307: + -: 308:} /* end LC_EvsInit */ + -: 309: + -: 310: + -: 311:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 312:/* */ + -: 313:/* Initialize the software bus interface */ + -: 314:/* */ + -: 315:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 316: + 11: 317:int32 LC_SbInit(void) + -: 318:{ + 11: 319: int32 Status = CFE_SUCCESS; + -: 320: + -: 321: /* + -: 322: ** Initialize SB variables + -: 323: */ + 11: 324: LC_OperData.MsgPtr = (CFE_SB_MsgPtr_t) NULL; + 11: 325: LC_OperData.CmdPipe = 0; + -: 326: + -: 327: /* + -: 328: ** Initialize housekeeping packet... + -: 329: */ + 11: 330: CFE_SB_InitMsg(&LC_OperData.HkPacket, LC_HK_TLM_MID, + -: 331: sizeof(LC_HkPacket_t), FALSE); + -: 332: + -: 333: /* + -: 334: ** Create Software Bus message pipe... + -: 335: */ + 11: 336: Status = CFE_SB_CreatePipe(&LC_OperData.CmdPipe, LC_PIPE_DEPTH, LC_PIPE_NAME); + 11: 337: if (Status != CFE_SUCCESS) + -: 338: { + 3: 339: CFE_EVS_SendEvent(LC_CR_PIPE_ERR_EID, CFE_EVS_ERROR, + -: 340: "Error Creating LC Pipe, RC=0x%08X", (unsigned int)Status); + 3: 341: return(Status); + -: 342: } + -: 343: + -: 344: /* + -: 345: ** Subscribe to Housekeeping request messages... + -: 346: */ + 8: 347: Status = CFE_SB_Subscribe(LC_SEND_HK_MID, LC_OperData.CmdPipe); + 8: 348: if (Status != CFE_SUCCESS) + -: 349: { + 1: 350: CFE_EVS_SendEvent(LC_SUB_HK_REQ_ERR_EID, CFE_EVS_ERROR, + -: 351: "Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X", + -: 352: LC_SEND_HK_MID, (unsigned int)Status); + 1: 353: return(Status); + -: 354: } + -: 355: + -: 356: /* + -: 357: ** Subscribe to LC ground command messages... + -: 358: */ + 7: 359: Status = CFE_SB_Subscribe(LC_CMD_MID, LC_OperData.CmdPipe); + 7: 360: if (Status != CFE_SUCCESS) + -: 361: { + 1: 362: CFE_EVS_SendEvent(LC_SUB_GND_CMD_ERR_EID, CFE_EVS_ERROR, + -: 363: "Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X", + -: 364: LC_CMD_MID, (unsigned int)Status); + 1: 365: return(Status); + -: 366: } + -: 367: + -: 368: /* + -: 369: ** Subscribe to LC internal actionpoint sample messages... + -: 370: */ + 6: 371: Status = CFE_SB_Subscribe(LC_SAMPLE_AP_MID, LC_OperData.CmdPipe); + 6: 372: if (Status != CFE_SUCCESS) + -: 373: { + 1: 374: CFE_EVS_SendEvent(LC_SUB_SAMPLE_CMD_ERR_EID, CFE_EVS_ERROR, + -: 375: "Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X", + -: 376: LC_SAMPLE_AP_MID, (unsigned int)Status); + 1: 377: return(Status); + -: 378: } + -: 379: + 5: 380: return(CFE_SUCCESS); + -: 381: + -: 382:} /* end LC_SbInit */ + -: 383: + -: 384: + -: 385:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 386:/* */ + -: 387:/* Table initialization - includes Critical Data Store (CDS) */ + -: 388:/* */ + -: 389:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 390: + 9: 391:int32 LC_TableInit(void) + -: 392:{ + -: 393: int32 Result; + -: 394: + -: 395: /* + -: 396: ** LC task use of Critical Data Store (CDS) + -: 397: ** + -: 398: ** Global application data (LC_AppData) + -: 399: ** Watchpint results dump only table data + -: 400: ** Actionpoint results dump only table data + -: 401: ** + -: 402: ** cFE Table Services use of CDS for LC task + -: 403: ** + -: 404: ** Watchpint definition loadable table data + -: 405: ** Actionpoint definition loadable table data + -: 406: ** + -: 407: ** LC table initialization logic re CDS + -: 408: ** + -: 409: ** If LC cannot create all the CDS storage at startup, then LC + -: 410: ** will disable LC use of CDS and continue. + -: 411: ** + -: 412: ** If LC cannot register definition tables as critical, then LC + -: 413: ** will disable LC use of CDS and re-register tables as non-critical. + -: 414: ** + -: 415: ** If LC cannot register definition and results tables at startup, + -: 416: ** then LC will terminate - table use is a required function. + -: 417: ** + -: 418: ** If LC can create all the CDS storage and register definition + -: 419: ** tables as critical, then LC will write to CDS regardless of + -: 420: ** whether LC was able to read from CDS at startup. + -: 421: ** + -: 422: ** If LC cannot restore everything from CDS at startup, then LC + -: 423: ** will initialize everything - load default definition tables, + -: 424: ** init results table contents, init global application data. + -: 425: */ + -: 426: + -: 427: /* lc_platform_cfg.h */ + -: 428: #ifdef LC_SAVE_TO_CDS + -: 429: LC_OperData.HaveActiveCDS = TRUE; + -: 430: #endif + -: 431: + -: 432: /* + -: 433: ** Maintain a detailed record of table initialization results + -: 434: */ + 9: 435: if (LC_OperData.HaveActiveCDS) + -: 436: { + #####: 437: LC_OperData.TableResults |= LC_CDS_ENABLED; + -: 438: } + -: 439: + -: 440: /* + -: 441: ** Create watchpoint and actionpoint result tables + -: 442: */ + 9: 443: if ((Result = LC_CreateResultTables()) != CFE_SUCCESS) + -: 444: { + 1: 445: return(Result); + -: 446: } + -: 447: + -: 448: /* + -: 449: ** If CDS is enabled - create the 3 CDS areas managed by the LC task + -: 450: ** (continue with init, but disable CDS if unable to create all 3) + -: 451: */ + 8: 452: if (LC_OperData.HaveActiveCDS) + -: 453: { + #####: 454: if (LC_CreateTaskCDS() != CFE_SUCCESS) + -: 455: { + #####: 456: LC_OperData.HaveActiveCDS = FALSE; + -: 457: } + -: 458: } + -: 459: + -: 460: /* + -: 461: ** Create wp/ap definition tables - critical if CDS enabled + -: 462: */ + 8: 463: if ((Result = LC_CreateDefinitionTables()) != CFE_SUCCESS) + -: 464: { + 1: 465: return(Result); + -: 466: } + -: 467: + -: 468: /* + -: 469: ** CDS still active only if we created 3 CDS areas and 2 critical tables + -: 470: */ + 7: 471: if (LC_OperData.HaveActiveCDS) + -: 472: { + #####: 473: LC_OperData.TableResults |= LC_CDS_CREATED; + -: 474: } + -: 475: + -: 476: /* + -: 477: ** If any CDS area or critical table is not restored - initialize everything. + -: 478: ** (might be due to reset type, CDS disabled or corrupt, table restore error) + -: 479: */ + 15: 480: if (((LC_OperData.TableResults & LC_WRT_CDS_RESTORED) == LC_WRT_CDS_RESTORED) && + 2: 481: ((LC_OperData.TableResults & LC_ART_CDS_RESTORED) == LC_ART_CDS_RESTORED) && + 2: 482: ((LC_OperData.TableResults & LC_APP_CDS_RESTORED) == LC_APP_CDS_RESTORED) && + 2: 483: ((LC_OperData.TableResults & LC_WDT_TBL_RESTORED) == LC_WDT_TBL_RESTORED) && + 2: 484: ((LC_OperData.TableResults & LC_ADT_TBL_RESTORED) == LC_ADT_TBL_RESTORED)) + -: 485: { + 2: 486: LC_OperData.TableResults |= LC_CDS_RESTORED; + -: 487: + -: 488: /* + -: 489: ** Get a pointer to the watchpoint definition table data... + -: 490: */ + 2: 491: Result = CFE_TBL_GetAddress((void *)&LC_OperData.WDTPtr, LC_OperData.WDTHandle); + -: 492: + 2: 493: if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) + -: 494: { + 1: 495: CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, + -: 496: "Error getting WDT address, RC=0x%08X", (unsigned int)Result); + 1: 497: return(Result); + -: 498: } + -: 499: + -: 500: /* + -: 501: ** Get a pointer to the actionpoint definition table data + -: 502: */ + 1: 503: Result = CFE_TBL_GetAddress((void *)&LC_OperData.ADTPtr, LC_OperData.ADTHandle); + -: 504: + 1: 505: if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) + -: 506: { + 1: 507: CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, + -: 508: "Error getting ADT address, RC=0x%08X", (unsigned int)Result); + 1: 509: return(Result); + -: 510: } + -: 511: } + -: 512: else + -: 513: { + 5: 514: if ((Result = LC_LoadDefaultTables()) != CFE_SUCCESS) + -: 515: { + 2: 516: return(Result); + -: 517: } + -: 518: } + -: 519: + -: 520: /* + -: 521: ** Create watchpoint hash tables -- also subscribes to watchpoint packets + -: 522: */ + 3: 523: LC_CreateHashTable(); + -: 524: + -: 525: /* + -: 526: ** Display results of CDS initialization (if enabled at startup) + -: 527: */ + 3: 528: if ((LC_OperData.TableResults & LC_CDS_ENABLED) == LC_CDS_ENABLED) + -: 529: { + #####: 530: if ((LC_OperData.TableResults & LC_CDS_RESTORED) == LC_CDS_RESTORED) + -: 531: { + #####: 532: CFE_EVS_SendEvent(LC_CDS_RESTORED_INF_EID, CFE_EVS_INFORMATION, + -: 533: "Previous state restored from Critical Data Store"); + -: 534: } + #####: 535: else if ((LC_OperData.TableResults & LC_CDS_UPDATED) == LC_CDS_UPDATED) + -: 536: { + #####: 537: CFE_EVS_SendEvent(LC_CDS_UPDATED_INF_EID, CFE_EVS_INFORMATION, + -: 538: "Default state loaded and written to CDS, activity mask = 0x%08X", + -: 539: (unsigned int)LC_OperData.TableResults); + -: 540: } + -: 541: + -: 542: } + -: 543: else + -: 544: { + 3: 545: CFE_EVS_SendEvent(LC_CDS_DISABLED_INF_EID, CFE_EVS_INFORMATION, + -: 546: "LC use of Critical Data Store disabled, activity mask = 0x%08X", + -: 547: (unsigned int)LC_OperData.TableResults); + -: 548: } + -: 549: + 3: 550: return(CFE_SUCCESS); + -: 551: + -: 552:} /* LC_TableInit() */ + -: 553: + -: 554: + -: 555:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 556:/* */ + -: 557:/* Startup initialization - create WP and AP results tables */ + -: 558:/* */ + -: 559:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 560: + 14: 561:int32 LC_CreateResultTables(void) + -: 562:{ + -: 563: int32 Result; + -: 564: uint32 DataSize; + -: 565: uint32 OptionFlags; + -: 566: + -: 567: /* + -: 568: ** Set "dump only" table option flags + -: 569: */ + 14: 570: OptionFlags = CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_DUMP_ONLY; + -: 571: + -: 572: /* + -: 573: ** Register the Watchpoint Results Table (WRT) - "dump only" tables + -: 574: ** cannot be critical with CDS use managed by CFE Table Services. + -: 575: */ + 14: 576: DataSize = LC_MAX_WATCHPOINTS * sizeof(LC_WRTEntry_t); + 14: 577: Result = CFE_TBL_Register(&LC_OperData.WRTHandle, LC_WRT_TABLENAME, + -: 578: DataSize, OptionFlags, NULL); + 14: 579: if (Result != CFE_SUCCESS) + -: 580: { + 2: 581: CFE_EVS_SendEvent(LC_WRT_REGISTER_ERR_EID, CFE_EVS_ERROR, + -: 582: "Error registering WRT, RC=0x%08X", (unsigned int)Result); + 2: 583: return(Result); + -: 584: } + -: 585: + 12: 586: Result = CFE_TBL_GetAddress((void *)&LC_OperData.WRTPtr, LC_OperData.WRTHandle); + -: 587: + 12: 588: if (Result != CFE_SUCCESS) + -: 589: { + 1: 590: CFE_EVS_SendEvent(LC_WRT_GETADDR_ERR_EID, CFE_EVS_ERROR, + -: 591: "Error getting WRT address, RC=0x%08X", (unsigned int)Result); + 1: 592: return(Result); + -: 593: } + -: 594: + 11: 595: LC_OperData.TableResults |= LC_WRT_TBL_CREATED; + -: 596: + -: 597: /* + -: 598: ** Register the Actionpoint Results Table (ART) - "dump only" tables + -: 599: ** cannot be critical with CDS use managed by CFE Table Services. + -: 600: */ + 11: 601: DataSize = LC_MAX_ACTIONPOINTS * sizeof (LC_ARTEntry_t); + 11: 602: Result = CFE_TBL_Register(&LC_OperData.ARTHandle, LC_ART_TABLENAME, + -: 603: DataSize, OptionFlags, NULL); + 11: 604: if (Result != CFE_SUCCESS) + -: 605: { + 1: 606: CFE_EVS_SendEvent(LC_ART_REGISTER_ERR_EID, CFE_EVS_ERROR, + -: 607: "Error registering ART, RC=0x%08X", (unsigned int)Result); + 1: 608: return(Result); + -: 609: } + -: 610: + 10: 611: Result = CFE_TBL_GetAddress((void *)&LC_OperData.ARTPtr, LC_OperData.ARTHandle); + -: 612: + 10: 613: if (Result != CFE_SUCCESS) + -: 614: { + 1: 615: CFE_EVS_SendEvent(LC_ART_GETADDR_ERR_EID, CFE_EVS_ERROR, + -: 616: "Error getting ART address, RC=0x%08X", (unsigned int)Result); + 1: 617: return(Result); + -: 618: } + -: 619: + 9: 620: LC_OperData.TableResults |= LC_ART_TBL_CREATED; + -: 621: + 9: 622: return(CFE_SUCCESS); + -: 623: + -: 624:} /* LC_CreateResultTables() */ + -: 625: + -: 626: + -: 627:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 628:/* */ + -: 629:/* Startup initialization - create WP and AP definition tables */ + -: 630:/* */ + -: 631:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 632: + 16: 633:int32 LC_CreateDefinitionTables(void) + -: 634:{ + -: 635: int32 Result; + -: 636: uint32 DataSize; + -: 637: uint32 OptionFlags; + -: 638: + -: 639: /* + -: 640: ** If CDS is still enabled, try to register the 2 definition tables as critical + -: 641: ** (if error, continue with init - but disable CDS and re-register as non-critical) + -: 642: */ + 16: 643: if (LC_OperData.HaveActiveCDS) + -: 644: { + 3: 645: OptionFlags = CFE_TBL_OPT_DEFAULT | CFE_TBL_OPT_CRITICAL; + -: 646: } + -: 647: else + -: 648: { + 13: 649: OptionFlags = CFE_TBL_OPT_DEFAULT; + -: 650: } + -: 651: + -: 652: /* + -: 653: ** Register the Watchpoint Definition Table (WDT) + -: 654: */ + 16: 655: DataSize = LC_MAX_WATCHPOINTS * sizeof (LC_WDTEntry_t); + 16: 656: Result = CFE_TBL_Register(&LC_OperData.WDTHandle, LC_WDT_TABLENAME, + -: 657: DataSize, OptionFlags, LC_ValidateWDT); + -: 658: + 16: 659: if ((LC_OperData.HaveActiveCDS) && + -: 660: ((Result != CFE_TBL_INFO_RECOVERED_TBL) && (Result != CFE_SUCCESS))) + -: 661: { + 1: 662: LC_OperData.HaveActiveCDS = FALSE; + 1: 663: OptionFlags = CFE_TBL_OPT_DEFAULT; + -: 664: + -: 665: /* + -: 666: ** Re-register the Watchpoint Definition Table (WDT) non-critical + -: 667: */ + 1: 668: Result = CFE_TBL_Register(&LC_OperData.WDTHandle, LC_WDT_TABLENAME, + -: 669: DataSize, OptionFlags, LC_ValidateWDT); + -: 670: } + -: 671: + 16: 672: if (Result == CFE_TBL_INFO_RECOVERED_TBL) + -: 673: { + 4: 674: LC_OperData.TableResults |= LC_WDT_CRITICAL_TBL; + 4: 675: LC_OperData.TableResults |= LC_WDT_TBL_RESTORED; + -: 676: } + 12: 677: else if (Result == CFE_SUCCESS) + -: 678: { + 10: 679: if (LC_OperData.HaveActiveCDS) + -: 680: { + 1: 681: LC_OperData.TableResults |= LC_WDT_CRITICAL_TBL; + -: 682: } + -: 683: else + -: 684: { + 9: 685: LC_OperData.TableResults |= LC_WDT_NOT_CRITICAL; + -: 686: } + -: 687: } + -: 688: else + -: 689: { + -: 690: /* + -: 691: ** Task initialization fails without this table + -: 692: */ + 2: 693: CFE_EVS_SendEvent(LC_WDT_REGISTER_ERR_EID, CFE_EVS_ERROR, + -: 694: "Error registering WDT, RC=0x%08X", (unsigned int)Result); + 2: 695: return(Result); + -: 696: } + -: 697: + -: 698: /* + -: 699: ** Register the Actionpoint Definition Table (ADT) + -: 700: */ + 14: 701: DataSize = LC_MAX_ACTIONPOINTS * sizeof (LC_ADTEntry_t); + 14: 702: Result = CFE_TBL_Register(&LC_OperData.ADTHandle, LC_ADT_TABLENAME, + -: 703: DataSize, OptionFlags, LC_ValidateADT); + -: 704: + 14: 705: if ((LC_OperData.HaveActiveCDS) && + -: 706: ((Result != CFE_TBL_INFO_RECOVERED_TBL) && (Result != CFE_SUCCESS))) + -: 707: { + 1: 708: LC_OperData.HaveActiveCDS = FALSE; + 1: 709: OptionFlags = CFE_TBL_OPT_DEFAULT; + -: 710: + -: 711: /* + -: 712: ** Re-register the Actionpoint Definition Table (ADT) non-critical + -: 713: */ + 1: 714: Result = CFE_TBL_Register(&LC_OperData.ADTHandle, LC_ADT_TABLENAME, + -: 715: DataSize, OptionFlags, LC_ValidateADT); + -: 716: } + -: 717: + 14: 718: if (Result == CFE_TBL_INFO_RECOVERED_TBL) + -: 719: { + 2: 720: LC_OperData.TableResults |= LC_ADT_CRITICAL_TBL; + 2: 721: LC_OperData.TableResults |= LC_ADT_TBL_RESTORED; + -: 722: } + 12: 723: else if (Result == CFE_SUCCESS) + -: 724: { + 11: 725: if (LC_OperData.HaveActiveCDS) + -: 726: { + 1: 727: LC_OperData.TableResults |= LC_ADT_CRITICAL_TBL; + -: 728: } + -: 729: else + -: 730: { + 10: 731: LC_OperData.TableResults |= LC_ADT_NOT_CRITICAL; + -: 732: } + -: 733: } + -: 734: else + -: 735: { + -: 736: /* + -: 737: ** Task initialization fails without this table + -: 738: */ + 1: 739: CFE_EVS_SendEvent(LC_ADT_REGISTER_ERR_EID, CFE_EVS_ERROR, + -: 740: "Error registering ADT, RC=0x%08X", (unsigned int)Result); + 1: 741: return(Result); + -: 742: } + -: 743: + -: 744: /* + -: 745: ** In case we created a critical WDT and then created a non-critical ADT + -: 746: */ + 18: 747: if (((LC_OperData.TableResults & LC_WDT_CRITICAL_TBL) == LC_WDT_CRITICAL_TBL) && + 5: 748: ((LC_OperData.TableResults & LC_ADT_NOT_CRITICAL) == LC_ADT_NOT_CRITICAL)) + -: 749: { + -: 750: /* + -: 751: ** Un-register the critical watchpoint Definition Table (WDT) + -: 752: */ + 2: 753: CFE_TBL_Unregister(LC_OperData.WDTHandle); + -: 754: + -: 755: /* + -: 756: ** Re-register the Watchpoint Definition Table (WDT) non-critical + -: 757: */ + 2: 758: DataSize = LC_MAX_WATCHPOINTS * sizeof (LC_WDTEntry_t); + 2: 759: OptionFlags = CFE_TBL_OPT_DEFAULT; + 2: 760: Result = CFE_TBL_Register(&LC_OperData.WDTHandle, LC_WDT_TABLENAME, + -: 761: DataSize, OptionFlags, LC_ValidateWDT); + 2: 762: if (Result == CFE_SUCCESS) + -: 763: { + 1: 764: LC_OperData.TableResults |= LC_WDT_NOT_CRITICAL; + -: 765: } + -: 766: else + -: 767: { + -: 768: /* + -: 769: ** Task initialization fails without this table + -: 770: */ + 1: 771: CFE_EVS_SendEvent(LC_WDT_REREGISTER_ERR_EID, CFE_EVS_ERROR, + -: 772: "Error re-registering WDT, RC=0x%08X", (unsigned int)Result); + 1: 773: return(Result); + -: 774: } + -: 775: } + -: 776: + 12: 777: return(CFE_SUCCESS); + -: 778: + -: 779:} /* LC_CreateDefinitionTables() */ + -: 780: + -: 781: + -: 782:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 783:/* */ + -: 784:/* Startup initialization - create Critical Data Store (CDS) */ + -: 785:/* */ + -: 786:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 787: + 5: 788:int32 LC_CreateTaskCDS(void) + -: 789:{ + -: 790: int32 Result; + -: 791: uint32 DataSize; + -: 792: + -: 793: /* + -: 794: ** Create CDS and try to restore Watchpoint Results Table (WRT) data + -: 795: */ + 5: 796: DataSize = LC_MAX_WATCHPOINTS * sizeof(LC_WRTEntry_t); + 5: 797: Result = CFE_ES_RegisterCDS(&LC_OperData.WRTDataCDSHandle, DataSize, LC_WRT_CDSNAME); + -: 798: + 5: 799: if (Result == CFE_SUCCESS) + -: 800: { + -: 801: /* + -: 802: ** Normal result after a power on reset (cold boot) - continue with next CDS area + -: 803: */ + 3: 804: LC_OperData.TableResults |= LC_WRT_CDS_CREATED; + -: 805: } + 2: 806: else if (Result == CFE_ES_CDS_ALREADY_EXISTS) + -: 807: { + -: 808: /* + -: 809: ** Normal result after a processor reset (warm boot) - try to restore previous data + -: 810: */ + 1: 811: LC_OperData.TableResults |= LC_WRT_CDS_CREATED; + -: 812: + 1: 813: Result = CFE_ES_RestoreFromCDS(LC_OperData.WRTPtr, LC_OperData.WRTDataCDSHandle); + -: 814: + 1: 815: if (Result == CFE_SUCCESS) + -: 816: { + 1: 817: LC_OperData.TableResults |= LC_WRT_CDS_RESTORED; + -: 818: } + -: 819: } + -: 820: else + -: 821: { + 1: 822: CFE_EVS_SendEvent(LC_WRT_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, + -: 823: "Error registering WRT CDS Area, RC=0x%08X", (unsigned int)Result); + 1: 824: return(Result); + -: 825: } + -: 826: + -: 827: /* + -: 828: ** Create CDS and try to restore Actionpoint Results Table (ART) data + -: 829: */ + 4: 830: DataSize = LC_MAX_ACTIONPOINTS * sizeof(LC_ARTEntry_t); + 4: 831: Result = CFE_ES_RegisterCDS(&LC_OperData.ARTDataCDSHandle, DataSize, LC_ART_CDSNAME); + -: 832: + 4: 833: if (Result == CFE_SUCCESS) + -: 834: { + -: 835: /* + -: 836: ** Normal result after a power on reset (cold boot) - continue with next CDS area + -: 837: */ + 2: 838: LC_OperData.TableResults |= LC_ART_CDS_CREATED; + -: 839: } + 2: 840: else if (Result == CFE_ES_CDS_ALREADY_EXISTS) + -: 841: { + -: 842: /* + -: 843: ** Normal result after a processor reset (warm boot) - try to restore previous data + -: 844: */ + 1: 845: LC_OperData.TableResults |= LC_ART_CDS_CREATED; + -: 846: + 1: 847: Result = CFE_ES_RestoreFromCDS(LC_OperData.ARTPtr, LC_OperData.ARTDataCDSHandle); + -: 848: + 1: 849: if (Result == CFE_SUCCESS) + -: 850: { + 1: 851: LC_OperData.TableResults |= LC_ART_CDS_RESTORED; + -: 852: } + -: 853: } + -: 854: else + -: 855: { + 1: 856: CFE_EVS_SendEvent(LC_ART_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, + -: 857: "Error registering ART CDS Area, RC=0x%08X", (unsigned int)Result); + 1: 858: return(Result); + -: 859: } + -: 860: + -: 861: /* + -: 862: ** Create CDS and try to restore Application (APP) data + -: 863: */ + 3: 864: DataSize = sizeof(LC_AppData_t); + 3: 865: Result = CFE_ES_RegisterCDS(&LC_OperData.AppDataCDSHandle, DataSize, LC_APPDATA_CDSNAME); + -: 866: + 3: 867: if (Result == CFE_SUCCESS) + -: 868: { + -: 869: /* + -: 870: ** Normal result after a power on reset (cold boot) - continue with next CDS area + -: 871: */ + 1: 872: LC_OperData.TableResults |= LC_APP_CDS_CREATED; + -: 873: } + 2: 874: else if (Result == CFE_ES_CDS_ALREADY_EXISTS) + -: 875: { + -: 876: /* + -: 877: ** Normal result after a processor reset (warm boot) - try to restore previous data + -: 878: */ + 1: 879: LC_OperData.TableResults |= LC_APP_CDS_CREATED; + -: 880: + 1: 881: Result = CFE_ES_RestoreFromCDS(&LC_AppData, LC_OperData.AppDataCDSHandle); + -: 882: + 1: 883: if ((Result == CFE_SUCCESS) && (LC_AppData.CDSSavedOnExit == LC_CDS_SAVED)) + -: 884: { + -: 885: /* + -: 886: ** Success - only if previous session saved CDS data at least once + -: 887: */ + 1: 888: LC_OperData.TableResults |= LC_APP_CDS_RESTORED; + -: 889: + -: 890: /* + -: 891: ** May need to override the restored application state + -: 892: */ + -: 893: + -: 894:#if LC_STATE_WHEN_CDS_RESTORED != LC_STATE_FROM_CDS + -: 895: LC_AppData.CurrentLCState = LC_STATE_WHEN_CDS_RESTORED; + -: 896:#endif + -: 897: } + -: 898: } + -: 899: else + -: 900: { + 1: 901: CFE_EVS_SendEvent(LC_APP_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, + -: 902: "Error registering application data CDS Area, RC=0x%08X", (unsigned int)Result); + 1: 903: return(Result); + -: 904: } + -: 905: + 2: 906: return(CFE_SUCCESS); + -: 907: + -: 908:} /* LC_CreateTaskCDS() */ + -: 909: + -: 910: + -: 911:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 912:/* */ + -: 913:/* Startup initialization - load default WP/AP definition tables */ + -: 914:/* */ + -: 915:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 916: + 12: 917:int32 LC_LoadDefaultTables(void) + -: 918:{ + -: 919: int32 Result; + -: 920: + -: 921: /* + -: 922: ** Load default watchpoint definition table (WDT) + -: 923: */ + 12: 924: Result = CFE_TBL_Load(LC_OperData.WDTHandle, CFE_TBL_SRC_FILE, LC_WDT_FILENAME); + -: 925: + 12: 926: if (Result == CFE_SUCCESS) + -: 927: { + 9: 928: LC_OperData.TableResults |= LC_WDT_DEFAULT_TBL; + -: 929: } + -: 930: else + -: 931: { + -: 932: /* + -: 933: ** Task initialization fails without this table + -: 934: */ + 3: 935: CFE_EVS_SendEvent(LC_WDT_LOAD_ERR_EID, CFE_EVS_ERROR, + -: 936: "Error (RC=0x%08X) Loading WDT with '%s'", (unsigned int)Result, LC_WDT_FILENAME); + 3: 937: return(Result); + -: 938: } + -: 939: + -: 940: /* + -: 941: ** Get a pointer to the watchpoint definition table data... + -: 942: */ + 9: 943: Result = CFE_TBL_GetAddress((void *)&LC_OperData.WDTPtr, LC_OperData.WDTHandle); + -: 944: + 10: 945: if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) + -: 946: { + 1: 947: CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, + -: 948: "Error getting WDT address, RC=0x%08X", (unsigned int)Result); + 1: 949: return(Result); + -: 950: } + -: 951: + -: 952: /* + -: 953: ** Load default actionpoint definition table (ADT) + -: 954: */ + 8: 955: Result = CFE_TBL_Load(LC_OperData.ADTHandle, CFE_TBL_SRC_FILE, LC_ADT_FILENAME); + -: 956: + 8: 957: if (Result == CFE_SUCCESS) + -: 958: { + 7: 959: LC_OperData.TableResults |= LC_ADT_DEFAULT_TBL; + -: 960: } + -: 961: else + -: 962: { + -: 963: /* + -: 964: ** Task initialization fails without this table + -: 965: */ + 1: 966: CFE_EVS_SendEvent(LC_ADT_LOAD_ERR_EID, CFE_EVS_ERROR, + -: 967: "Error (RC=0x%08X) Loading ADT with '%s'", (unsigned int)Result, LC_ADT_FILENAME); + 1: 968: return(Result); + -: 969: } + -: 970: + -: 971: /* + -: 972: ** Get a pointer to the actionpoint definition table data + -: 973: */ + 7: 974: Result = CFE_TBL_GetAddress((void *)&LC_OperData.ADTPtr, LC_OperData.ADTHandle); + -: 975: + 8: 976: if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) + -: 977: { + 1: 978: CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, + -: 979: "Error getting ADT address, RC=0x%08X", (unsigned int)Result); + 1: 980: return(Result); + -: 981: } + -: 982: + -: 983: /* + -: 984: ** Initialize the watchpoint and actionpoint result table data + -: 985: */ + 6: 986: LC_ResetResultsWP(0, LC_MAX_WATCHPOINTS - 1, FALSE); + 6: 987: LC_OperData.TableResults |= LC_WRT_DEFAULT_DATA; + -: 988: + 6: 989: LC_ResetResultsAP(0, LC_MAX_ACTIONPOINTS - 1, FALSE); + 6: 990: LC_OperData.TableResults |= LC_ART_DEFAULT_DATA; + -: 991: + -: 992: /* + -: 993: ** Reset application data counters reported in housekeeping + -: 994: */ + 6: 995: LC_ResetCounters(); + -: 996: + -: 997: /* + -: 998: ** Set LC operational state to configured startup value + -: 999: */ + 6: 1000: LC_AppData.CurrentLCState = LC_STATE_POWER_ON_RESET; + 6: 1001: LC_OperData.TableResults |= LC_APP_DEFAULT_DATA; + -: 1002: + -: 1003: /* + -: 1004: ** If CDS is enabled - try to update the 3 CDS areas managed by the LC task + -: 1005: ** (continue, but disable CDS if unable to update all 3) + -: 1006: */ + 6: 1007: if (LC_OperData.HaveActiveCDS) + -: 1008: { + 2: 1009: if (LC_UpdateTaskCDS() == CFE_SUCCESS) + -: 1010: { + 1: 1011: LC_OperData.TableResults |= LC_CDS_UPDATED; + -: 1012: } + -: 1013: else + -: 1014: { + 1: 1015: LC_OperData.HaveActiveCDS = FALSE; + -: 1016: } + -: 1017: } + -: 1018: + 6: 1019: return(CFE_SUCCESS); + -: 1020: + -: 1021:} /* LC_LoadDefaultTables() */ + -: 1022: + -: 1023: + -: 1024:/************************/ + -: 1025:/* End of File Comment */ + -: 1026:/************************/ diff --git a/fsw/unit_test/lc_app_test.c b/fsw/unit_test/lc_app_test.c new file mode 100644 index 0000000..bd98dec --- /dev/null +++ b/fsw/unit_test/lc_app_test.c @@ -0,0 +1,1396 @@ + /************************************************************************* + ** File: + ** $Id: lc_app_test.c 1.5 2017/01/22 17:24:33EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains unit test cases for the functions contained in the file lc_app.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "lc_app_test.h" +#include "lc_app.h" +#include "lc_msg.h" +#include "lc_msgdefs.h" +#include "lc_msgids.h" +#include "lc_events.h" +#include "lc_version.h" +#include "lc_test_utils.h" +#include "ut_osapi_stubs.h" +#include "ut_cfe_sb_stubs.h" +#include "ut_cfe_es_stubs.h" +#include "ut_cfe_es_hooks.h" +#include "ut_cfe_evs_stubs.h" +#include "ut_cfe_evs_hooks.h" +#include "ut_cfe_time_stubs.h" +#include "ut_cfe_psp_memutils_stubs.h" +#include "ut_cfe_psp_watchdog_stubs.h" +#include "ut_cfe_psp_timer_stubs.h" +#include "ut_cfe_tbl_stubs.h" +#include "ut_cfe_fs_stubs.h" +#include "ut_cfe_time_stubs.h" +#include +#include +#include + +/* + * Function Definitions + */ + +uint16 LC_APP_TEST_CFE_TBL_RegisterHookCount; +int32 LC_APP_TEST_CFE_TBL_RegisterHook1(CFE_TBL_Handle_t *TblHandlePtr, const char *Name, uint32 Size, uint16 TblOptionFlags, CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr) +{ + LC_APP_TEST_CFE_TBL_RegisterHookCount++; + + if (LC_APP_TEST_CFE_TBL_RegisterHookCount == 1) + return 99; + else + return CFE_TBL_INFO_RECOVERED_TBL; +} + +int32 LC_APP_TEST_CFE_TBL_RegisterHook2(CFE_TBL_Handle_t *TblHandlePtr, const char *Name, uint32 Size, uint16 TblOptionFlags, CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr) +{ + LC_APP_TEST_CFE_TBL_RegisterHookCount++; + + if (LC_APP_TEST_CFE_TBL_RegisterHookCount == 2) + return 99; + else + return CFE_TBL_INFO_RECOVERED_TBL; +} + +int32 LC_APP_TEST_CFE_TBL_RegisterHook3(CFE_TBL_Handle_t *TblHandlePtr, const char *Name, uint32 Size, uint16 TblOptionFlags, CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr) +{ + LC_APP_TEST_CFE_TBL_RegisterHookCount++; + + if (LC_APP_TEST_CFE_TBL_RegisterHookCount == 1) + return CFE_TBL_INFO_RECOVERED_TBL; + else + return CFE_SUCCESS; +} + +int32 LC_APP_TEST_CFE_TBL_RegisterHook4(CFE_TBL_Handle_t *TblHandlePtr, const char *Name, uint32 Size, uint16 TblOptionFlags, CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr) +{ + LC_APP_TEST_CFE_TBL_RegisterHookCount++; + + if (LC_APP_TEST_CFE_TBL_RegisterHookCount == 1) + return CFE_TBL_INFO_RECOVERED_TBL; + if (LC_APP_TEST_CFE_TBL_RegisterHookCount == 2) + return CFE_SUCCESS; + else + return -1; +} + +void LC_AppMain_Test_Nominal(void) +{ + LC_OperData.HaveActiveCDS = TRUE; + LC_AppData.CDSSavedOnExit = LC_CDS_SAVED; + + /* Set to prevent segmentation fault in HK_AppInit */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_GETMSGID_INDEX, 99, 1); + + /* Set to make HK_AppInit return CFE_SUCCESS */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to exit loop after first run */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_RUNLOOP_INDEX, FALSE, 2); + + /* Set to prevent call to CFE_SB_RcvMsg from returning an error */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_RCVMSG_INDEX, CFE_SUCCESS, 1); + + /* Execute the function being tested */ + LC_AppMain(); + + /* Verify results */ + +#ifndef LC_SAVE_TO_CDS /* When this is not defined EVENT ID=23 is always issued (LC use of Critical Data Store disabled) */ + /* Generates 2 event messages we don't care about in this test */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); +#else /* Alt confg unit tests */ + /* Generates 1 event message we don't care about in this test */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); +#endif + +} /* end LC_AppMain_Test_Nominal */ + +void LC_AppMain_Test_RegisterAppError(void) +{ + LC_OperData.HaveActiveCDS = TRUE; + LC_AppData.CDSSavedOnExit = LC_CDS_SAVED; + + /* Set to satisfy condition "Status != CFE_SUCCESS" immediately following call to CFE_ES_RegisterApp */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_REGISTERAPP_INDEX, -1, 1); + + /* Set to prevent segmentation fault in HK_AppInit */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_GETMSGID_INDEX, 99, 1); + + /* Set to make HK_AppInit return CFE_SUCCESS */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to exit loop after first run */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_RUNLOOP_INDEX, FALSE, 2); + + /* Set to prevent call to CFE_SB_RcvMsg from returning an error */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_RCVMSG_INDEX, CFE_SUCCESS, 1); + + /* Execute the function being tested */ + LC_AppMain(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_TASK_EXIT_EID, CFE_EVS_CRITICAL, "Task terminating, err = 0xFFFFFFFF"), + "Task terminating, err = 0xFFFFFFFF"); + + UtAssert_True + (Ut_CFE_ES_SysLogWritten("LC task terminating, err = 0xFFFFFFFF\n"), + "LC task terminating, err = 0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_AppMain_Test_RegisterAppError */ + +void LC_AppMain_Test_AppInitError(void) +{ + LC_OperData.HaveActiveCDS = TRUE; + LC_AppData.CDSSavedOnExit = LC_CDS_SAVED; + + /* Set to prevent segmentation fault in HK_AppInit */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_GETMSGID_INDEX, 99, 1); + + /* Set to make HK_AppInit return CFE_SUCCESS */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to exit loop after first run */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_RUNLOOP_INDEX, FALSE, 2); + + /* Set to prevent call to CFE_SB_RcvMsg from returning an error */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_RCVMSG_INDEX, CFE_SUCCESS, 1); + + /* Set to make subfunction LC_AppInit return -1, in order to fail subsequent condition "Status != CFE_SUCCESS" */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_CREATEPIPE_INDEX, -1, 1); + + /* Execute the function being tested */ + LC_AppMain(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_TASK_EXIT_EID, CFE_EVS_CRITICAL, "Task terminating, err = 0xFFFFFFFF"), + "Task terminating, err = 0xFFFFFFFF"); + + UtAssert_True + (Ut_CFE_ES_SysLogWritten("LC task terminating, err = 0xFFFFFFFF\n"), + "LC task terminating, err = 0xFFFFFFFF"); + + /* Generates 2 event message we don't care about in this test */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_AppMain_Test_AppInitError */ + +void LC_AppMain_Test_RcvMsgError(void) +{ + LC_OperData.HaveActiveCDS = TRUE; + LC_AppData.CDSSavedOnExit = LC_CDS_SAVED; + + /* Set to prevent segmentation fault in HK_AppInit */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_GETMSGID_INDEX, 99, 1); + + /* Set to make HK_AppInit return CFE_SUCCESS */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to exit loop after first run */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_RUNLOOP_INDEX, FALSE, 2); + + /* Set to fail condition "Status != CFE_SUCCESS" immediately following call to CFE_SB_RcvMsg */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_RCVMSG_INDEX, -1, 1); + + /* Execute the function being tested */ + LC_AppMain(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_TASK_EXIT_EID, CFE_EVS_CRITICAL, "Task terminating, err = 0xFFFFFFFF"), + "Task terminating, err = 0xFFFFFFFF"); + + UtAssert_True + (Ut_CFE_ES_SysLogWritten("LC task terminating, err = 0xFFFFFFFF\n"), + "LC task terminating, err = 0xFFFFFFFF"); + + /* Generates 3 event message we don't care about in this test */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 3, "Ut_CFE_EVS_GetEventQueueDepth() == 3"); + +} /* end LC_AppMain_Test_RcvMsgError */ + +void LC_AppInit_Test_Nominal(void) +{ + int32 Result; + char Message[125]; + + CFE_PSP_MemSet(&LC_OperData, 1, sizeof(LC_OperData_t)); + CFE_PSP_MemSet(&LC_AppData, 1, sizeof(LC_AppData_t)); + + /* Set to prevent errors when initializing tables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Execute the function being tested */ + Result = LC_AppInit(); + + /* Verify results */ + sprintf(Message, "LC Initialized. Version %d.%d.%d.%d", LC_MAJOR_VERSION, LC_MINOR_VERSION, LC_REVISION, LC_MISSION_REV); + UtAssert_True (Ut_CFE_EVS_EventSent(LC_INIT_INF_EID, CFE_EVS_INFORMATION, Message), Message); + + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True(LC_OperData.MsgPtr == 0, "LC_OperData.MsgPtr == 0"); + UtAssert_True(LC_OperData.CmdPipe == 0, "LC_OperData.CmdPipe == 0"); +/* Note: not testing LC_OperData.WDTPtr == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.ADTPtr == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.WRTPtr == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.ARTPtr == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.WDTHandle == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.ADTHandle == 0, because it is modified by a subfunction */ + UtAssert_True(LC_OperData.WRTHandle == 0, "LC_OperData.WRTHandle == 0"); +/* Note: not testing LC_OperData.ARTHandle == 0, because it is modified by a subfunction */ + UtAssert_True(LC_OperData.WRTDataCDSHandle == 0, "LC_OperData.WRTDataCDSHandle == 0"); + UtAssert_True(LC_OperData.ARTDataCDSHandle == 0, "LC_OperData.ARTDataCDSHandle == 0"); + UtAssert_True(LC_OperData.AppDataCDSHandle == 0, "LC_OperData.AppDataCDSHandle == 0"); +/* Note: not testing LC_OperData.WatchpointCount == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.MessageIDsCount == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.HkPacket == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.TableResults == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.HashTable == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.MessageLinks == 0, because it is modified by a subfunction */ +/* Note: not testing LC_OperData.WatchPtLinks == 0, because it is modified by a subfunction */ + UtAssert_True(LC_OperData.HaveActiveCDS == 0, "LC_OperData.HaveActiveCDS == 0"); + + UtAssert_True(LC_AppData.CmdCount == 0, "LC_AppData.CmdCount == 0"); + UtAssert_True(LC_AppData.CmdErrCount == 0, "LC_AppData.CmdErrCount == 0"); + UtAssert_True(LC_AppData.APSampleCount == 0, "LC_AppData.APSampleCount == 0"); + UtAssert_True(LC_AppData.MonitoredMsgCount == 0, "LC_AppData.MonitoredMsgCount == 0"); + UtAssert_True(LC_AppData.RTSExecCount == 0, "LC_AppData.RTSExecCount == 0"); + UtAssert_True(LC_AppData.PassiveRTSExecCount == 0, "LC_AppData.PassiveRTSExecCount == 0"); + UtAssert_True(LC_AppData.CDSSavedOnExit == 0, "LC_AppData.CDSSavedOnExit == 0"); +/* Note: not testing LC_AppData.CurrentLCState == 0, because it is modified by a subfunction */ + +#ifndef LC_SAVE_TO_CDS /* When this is not defined EVENT ID=23 is always issued (LC use of Critical Data Store disabled) */ + /* Generates 3 event message we don't care about in this test */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); +#else /* Alt confg unit tests */ + /* Generates 2 event message we don't care about in this test */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); +#endif + +} /* end LC_AppInit_Test_Nominal */ + +void LC_AppInit_Test_EVSInitError(void) +{ + int32 Result; + + /* Set to prevent errors when initializing tables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to cause LC_EvsInit to return -1, in order to satisfy subsequent condition "Status != CFE_SUCCESS" */ + Ut_CFE_EVS_SetReturnCode(UT_CFE_EVS_REGISTER_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_AppInit(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_AppInit_Test_EVSInitError */ + +void LC_AppInit_Test_SBInitError(void) +{ + int32 Result; + + /* Set to prevent errors when initializing tables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to cause LC_SbInit to return -1, in order to satisfy subsequent condition "Status != CFE_SUCCESS" */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_CREATEPIPE_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_AppInit(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + + /* Generates one event message we don't care about in this test */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_AppInit_Test_SBInitError */ + +void LC_AppInit_Test_TableInitError(void) +{ + int32 Result; + + /* Set to cause LC_TableInit to return -1, in order to satisfy subsequent condition "Status != CFE_SUCCESS" */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, -1, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Execute the function being tested */ + Result = LC_AppInit(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + + /* Generates one event message we don't care about in this test */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_AppInit_Test_TableInitError */ + +void LC_EvsInit_Test_Nominal(void) +{ + int32 Result; + + /* Execute the function being tested */ + Result = LC_EvsInit(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvsInit_Test_Nominal */ + +void LC_EvsInit_Test_EVSRegisterError(void) +{ + int32 Result; + + /* Set to generate system log message "LC App: Error Registering For Event Services" */ + Ut_CFE_EVS_SetReturnCode(UT_CFE_EVS_REGISTER_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_EvsInit(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True + (Ut_CFE_ES_SysLogWritten("LC App: Error Registering For Event Services, RC = 0xFFFFFFFF\n"), + "LC App: Error Registering For Event Services, RC = 0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_EvsInit_Test_EVSRegisterError */ + +void LC_SbInit_Test_Nominal(void) +{ + int32 Result; + + /* Execute the function being tested */ + Result = LC_SbInit(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SbInit_Test_Nominal */ + +void LC_SbInit_Test_CreatePipeError(void) +{ + int32 Result; + + /* Set to generate error message LC_CR_PIPE_ERR_EID */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_CREATEPIPE_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_SbInit(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_CR_PIPE_ERR_EID, CFE_EVS_ERROR, "Error Creating LC Pipe, RC=0xFFFFFFFF"), + "Error Creating LC Pipe, RC=0xFFFFFFFF"); + + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SbInit_Test_CreatePipeError */ + +void LC_SbInit_Test_SubscribeHKReqError(void) +{ + int32 Result; + + /* Set to generate error message LC_SUB_HK_REQ_ERR_EID */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_SUBSCRIBE_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_SbInit(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_SUB_HK_REQ_ERR_EID, CFE_EVS_ERROR, "Error Subscribing to HK Request, MID=0x18A5, RC=0xFFFFFFFF"), + "Error Subscribing to HK Request, MID=0x18A5, RC=0xFFFFFFFF"); + + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SbInit_Test_SubscribeHKReqError */ + +void LC_SbInit_Test_SubscribeGndCmdError(void) +{ + int32 Result; + + /* Set to generate error message LC_SUB_GND_CMD_ERR_EID */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_SUBSCRIBE_INDEX, -1, 2); + + /* Execute the function being tested */ + Result = LC_SbInit(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_SUB_GND_CMD_ERR_EID, CFE_EVS_ERROR, "Error Subscribing to GND CMD, MID=0x18A4, RC=0xFFFFFFFF"), + "Error Subscribing to GND CMD, MID=0x18A4, RC=0xFFFFFFFF"); + + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SbInit_Test_SubscribeGndCmdError */ + +void LC_SbInit_Test_SubscribeSampleCmdError(void) +{ + int32 Result; + + /* Set to generate error message LC_SUB_SAMPLE_CMD_ERR_EID */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_SUBSCRIBE_INDEX, -1, 3); + + /* Execute the function being tested */ + Result = LC_SbInit(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_SUB_SAMPLE_CMD_ERR_EID, CFE_EVS_ERROR, "Error Subscribing to Sample CMD, MID=0x18A6, RC=0xFFFFFFFF"), + "Error Subscribing to Sample CMD, MID=0x18A6, RC=0xFFFFFFFF"); + + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SbInit_Test_SubscribeSampleCmdError */ + +void LC_CreateResultTables_Test_Nominal(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Execute the function being tested */ + Result = LC_CreateResultTables(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + UtAssert_True(LC_OperData.TableResults == (LC_WRT_TBL_CREATED | LC_ART_TBL_CREATED), "LC_OperData.TableResults == (LC_WRT_TBL_CREATED | LC_ART_TBL_CREATED)"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_CreateResultTables_Test_Nominal */ + +void LC_CreateResultTables_Test_WRTRegisterError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Set to generate error message LC_WRT_REGISTER_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_REGISTER_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_CreateResultTables(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WRT_REGISTER_ERR_EID, CFE_EVS_ERROR, "Error registering WRT, RC=0xFFFFFFFF"), + "Error registering WRT, RC=0xFFFFFFFF"); + + UtAssert_True(LC_OperData.TableResults == 0, "LC_OperData.TableResults == 0"); + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateResultTables_Test_WRTRegisterError */ + +void LC_CreateResultTables_Test_WRTGetAddressError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Set to generate error message LC_WRT_GETADDR_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_CreateResultTables(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WRT_GETADDR_ERR_EID, CFE_EVS_ERROR, "Error getting WRT address, RC=0xFFFFFFFF"), + "Error getting WRT address, RC=0xFFFFFFFF"); + + UtAssert_True(LC_OperData.TableResults == 0, "LC_OperData.TableResults == 0"); + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateResultTables_Test_WRTGetAddressError */ + +void LC_CreateResultTables_Test_ARTRegisterError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Set to generate error message LC_ART_REGISTER_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_REGISTER_INDEX, -1, 2); + + /* Execute the function being tested */ + Result = LC_CreateResultTables(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ART_REGISTER_ERR_EID, CFE_EVS_ERROR, "Error registering ART, RC=0xFFFFFFFF"), + "Error registering ART, RC=0xFFFFFFFF"); + + UtAssert_True(LC_OperData.TableResults == LC_WRT_TBL_CREATED, "LC_OperData.TableResults == LC_WRT_TBL_CREATED"); + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateResultTables_Test_ARTRegisterError */ + +void LC_CreateResultTables_Test_ARTGetAddressError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Set to generate error message LC_ART_GETADDR_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, -1, 2); + + /* Execute the function being tested */ + Result = LC_CreateResultTables(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ART_GETADDR_ERR_EID, CFE_EVS_ERROR, "Error getting ART address, RC=0xFFFFFFFF"), + "Error getting ART address, RC=0xFFFFFFFF"); + + UtAssert_True(LC_OperData.TableResults == LC_WRT_TBL_CREATED, "LC_OperData.TableResults == LC_WRT_TBL_CREATED"); + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateResultTables_Test_ARTGetAddressError */ + +void LC_CreateDefinitionTables_Test_NominalCDSActive(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + LC_OperData.HaveActiveCDS = TRUE; + + /* Set to reach all nominal code branches */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_REGISTER_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_REGISTER_INDEX); + + /* Execute the function being tested */ + Result = LC_CreateDefinitionTables(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + UtAssert_True(LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_ADT_CRITICAL_TBL), "LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_ADT_CRITICAL_TBL)"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_CreateDefinitionTables_Test_NominalCDSActive */ + +void LC_CreateDefinitionTables_Test_NominalCDSInactive(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + LC_OperData.HaveActiveCDS = FALSE; + + /* Set to reach all nominal code branches */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_REGISTER_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_REGISTER_INDEX); + + /* Execute the function being tested */ + Result = LC_CreateDefinitionTables(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + UtAssert_True(LC_OperData.TableResults == (LC_WDT_NOT_CRITICAL | LC_ADT_NOT_CRITICAL), "LC_OperData.TableResults == (LC_WDT_NOT_CRITICAL | LC_ADT_NOT_CRITICAL)"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_CreateDefinitionTables_Test_NominalCDSInactive */ + +void LC_CreateDefinitionTables_Test_WDTReRegisterThenInfoRecovered(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + LC_OperData.HaveActiveCDS = TRUE; + + /* Satisfies condition "(LC_OperData.HaveActiveCDS) && ((Result != CFE_TBL_INFO_RECOVERED_TBL) && (Result != CFE_SUCCESS))" + and then satisfies condition "Result == CFE_TBL_INFO_RECOVERED_TBL" */ + LC_APP_TEST_CFE_TBL_RegisterHookCount = 0; + Ut_CFE_TBL_SetFunctionHook(UT_CFE_TBL_REGISTER_INDEX, &LC_APP_TEST_CFE_TBL_RegisterHook1); + + /* Execute the function being tested */ + Result = LC_CreateDefinitionTables(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + UtAssert_True(LC_OperData.HaveActiveCDS == FALSE, "LC_OperData.HaveActiveCDS == FALSE"); + UtAssert_True(LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_CRITICAL_TBL | LC_ADT_TBL_RESTORED), + "LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_CRITICAL_TBL | LC_ADT_TBL_RESTORED)"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_CreateDefinitionTables_Test_WDTReRegisterThenInfoRecovered */ + +void LC_CreateDefinitionTables_Test_ADTReRegisterThenInfoRecovered(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + LC_OperData.HaveActiveCDS = TRUE; + + /* Satisfies condition "(LC_OperData.HaveActiveCDS) && ((Result != CFE_TBL_INFO_RECOVERED_TBL) && (Result != CFE_SUCCESS))" + and then satisfies condition "Result == CFE_TBL_INFO_RECOVERED_TBL" */ + LC_APP_TEST_CFE_TBL_RegisterHookCount = 0; + Ut_CFE_TBL_SetFunctionHook(UT_CFE_TBL_REGISTER_INDEX, &LC_APP_TEST_CFE_TBL_RegisterHook2); + + /* Execute the function being tested */ + Result = LC_CreateDefinitionTables(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + UtAssert_True(LC_OperData.HaveActiveCDS == FALSE, "LC_OperData.HaveActiveCDS == FALSE"); + UtAssert_True(LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_CRITICAL_TBL | LC_ADT_TBL_RESTORED), + "LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_CRITICAL_TBL | LC_ADT_TBL_RESTORED)"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_CreateDefinitionTables_Test_ADTReRegisterThenInfoRecovered */ + +void LC_CreateDefinitionTables_Test_WDTCriticalADTNoncritical(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + LC_OperData.HaveActiveCDS = FALSE; + + /* Satisfies condition "((LC_OperData.TableResults & LC_WDT_CRITICAL_TBL) == LC_WDT_CRITICAL_TBL) && + ((LC_OperData.TableResults & LC_ADT_NOT_CRITICAL) == LC_ADT_NOT_CRITICAL)" */ + LC_APP_TEST_CFE_TBL_RegisterHookCount = 0; + Ut_CFE_TBL_SetFunctionHook(UT_CFE_TBL_REGISTER_INDEX, &LC_APP_TEST_CFE_TBL_RegisterHook3); + + /* Execute the function being tested */ + Result = LC_CreateDefinitionTables(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + UtAssert_True(LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_NOT_CRITICAL | LC_WDT_NOT_CRITICAL), + "LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_NOT_CRITICAL | LC_WDT_NOT_CRITICAL)"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_CreateDefinitionTables_Test_WDTCriticalADTNoncritical */ + +void LC_CreateDefinitionTables_Test_WDTReRegisterError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + LC_OperData.HaveActiveCDS = FALSE; + + /* Satisfies condition "((LC_OperData.TableResults & LC_WDT_CRITICAL_TBL) == LC_WDT_CRITICAL_TBL) && + ((LC_OperData.TableResults & LC_ADT_NOT_CRITICAL) == LC_ADT_NOT_CRITICAL)" + and then FAILS condition "Result == CFE_SUCCESS", in order to generate error message LC_WDT_REREGISTER_ERR_EID */ + LC_APP_TEST_CFE_TBL_RegisterHookCount = 0; + Ut_CFE_TBL_SetFunctionHook(UT_CFE_TBL_REGISTER_INDEX, &LC_APP_TEST_CFE_TBL_RegisterHook4); + + /* Execute the function being tested */ + Result = LC_CreateDefinitionTables(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + UtAssert_True(LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_NOT_CRITICAL), + "LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_NOT_CRITICAL)"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDT_REREGISTER_ERR_EID, CFE_EVS_ERROR, "Error re-registering WDT, RC=0xFFFFFFFF"), + "Error re-registering WDT, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateDefinitionTables_Test_WDTReRegisterError */ + +void LC_CreateDefinitionTables_Test_WDTRegisterError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + LC_OperData.HaveActiveCDS = FALSE; + + /* Set to generate error message LC_WDT_REGISTER_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_REGISTER_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_CreateDefinitionTables(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDT_REGISTER_ERR_EID, CFE_EVS_ERROR, "Error registering WDT, RC=0xFFFFFFFF"), + "Error registering WDT, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateDefinitionTables_Test_WDTRegisterError */ + +void LC_CreateDefinitionTables_Test_ADTRegisterError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + LC_OperData.HaveActiveCDS = FALSE; + + /* Set to generate error message LC_ADT_REGISTER_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_REGISTER_INDEX, -1, 2); + + /* Execute the function being tested */ + Result = LC_CreateDefinitionTables(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADT_REGISTER_ERR_EID, CFE_EVS_ERROR, "Error registering ADT, RC=0xFFFFFFFF"), + "Error registering ADT, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateDefinitionTables_Test_ADTRegisterError */ + +void LC_CreateTaskCDS_Test_NominalPowerOnReset(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Execute the function being tested */ + Result = LC_CreateTaskCDS(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + UtAssert_True(LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED | LC_APP_CDS_CREATED), "LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED | LC_APP_CDS_CREATED)"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_CreateTaskCDS_Test_NominalPowerOnReset */ + +void LC_CreateTaskCDS_Test_NominalProcessorReset(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + LC_AppData.CDSSavedOnExit = LC_CDS_SAVED; + + /* Set to satisfy all instances of condition "Result == CFE_ES_CDS_ALREADY_EXISTS" */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_REGISTERCDS_INDEX, CFE_ES_CDS_ALREADY_EXISTS, 1); + Ut_CFE_ES_ContinueReturnCodeAfterCountZero(UT_CFE_ES_REGISTERCDS_INDEX); + + /* Execute the function being tested */ + Result = LC_CreateTaskCDS(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True(LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED | LC_APP_CDS_CREATED | LC_WRT_CDS_RESTORED | LC_ART_CDS_RESTORED | LC_APP_CDS_RESTORED), + "LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED | LC_APP_CDS_CREATED | LC_WRT_CDS_RESTORED | LC_ART_CDS_RESTORED | LC_APP_CDS_RESTORED)"); + +// FIXME: This depends on a preprocessor constant value having a different value than default. The comparison is not done with a #if - should it? +// UtAssert_True(LC_AppData.CurrentLCState == LC_STATE_WHEN_CDS_RESTORED, "LC_AppData.CurrentLCState == LC_STATE_WHEN_CDS_RESTORED"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_CreateTaskCDS_Test_NominalProcessorReset */ + +void LC_CreateTaskCDS_Test_WRTRegisterCDSError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Set to generate error message LC_WRT_CDS_REGISTER_ERR_EID */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_REGISTERCDS_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_CreateTaskCDS(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + UtAssert_True(LC_OperData.TableResults == 0, "LC_OperData.TableResults == 0"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WRT_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, "Error registering WRT CDS Area, RC=0xFFFFFFFF"), + "Error registering WRT CDS Area, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateTaskCDS_Test_WRTRegisterCDSError */ + +void LC_CreateTaskCDS_Test_ARTRegisterCDSError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Set to generate error message LC_ART_CDS_REGISTER_ERR_EID */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_REGISTERCDS_INDEX, -1, 2); + + /* Execute the function being tested */ + Result = LC_CreateTaskCDS(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + UtAssert_True(LC_OperData.TableResults == LC_WRT_CDS_CREATED, "LC_OperData.TableResults == LC_WRT_CDS_CREATED"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ART_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, "Error registering ART CDS Area, RC=0xFFFFFFFF"), + "Error registering ART CDS Area, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateTaskCDS_Test_ARTRegisterCDSError */ + +void LC_CreateTaskCDS_Test_AppDataRegisterCDSError(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Set to generate error message LC_APP_CDS_REGISTER_ERR_EID */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_REGISTERCDS_INDEX, -1, 3); + + /* Execute the function being tested */ + Result = LC_CreateTaskCDS(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + UtAssert_True(LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED), "LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED)"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APP_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, "Error registering application data CDS Area, RC=0xFFFFFFFF"), + "Error registering application data CDS Area, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateTaskCDS_Test_AppDataRegisterCDSError */ + +void LC_LoadDefaultTables_Test_NominalActiveCDS(void) +{ + int32 Result; + + LC_OperData.HaveActiveCDS = TRUE; + + /* Set to satisfy all instances of condition "Result == CFE_SUCCESS" after calls to CFE_TBL_Load */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to satisfy all instances of condition "Result == CFE_SUCCESS" after calls to CFE_TBL_GetAddress */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_LoadDefaultTables(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True(LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA | LC_CDS_UPDATED), + "LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA | LC_CDS_UPDATED)"); + + UtAssert_True(LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET, "LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_LoadDefaultTables_Test_NominalActiveCDS */ + +void LC_LoadDefaultTables_Test_ActiveCDSNotSuccess(void) +{ + int32 Result; + + LC_OperData.HaveActiveCDS = TRUE; + + /* Set to satisfy all instances of condition "Result == CFE_SUCCESS" after calls to CFE_TBL_Load */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to satisfy all instances of condition "Result == CFE_SUCCESS" after calls to CFE_TBL_GetAddress */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Set to make subfunction LC_UpdateTaskCDS return -1, in order to satisfy condition "LC_UpdateTaskCDS() == CFE_SUCCESS" */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_COPYTOCDS_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_LoadDefaultTables(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True(LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA), + "LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA"); + + UtAssert_True(LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET, "LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET"); + + UtAssert_True(LC_OperData.HaveActiveCDS == FALSE, "LC_OperData.HaveActiveCDS == FALSE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates one event message we don't care about in this test */ + +} /* end LC_LoadDefaultTables_Test_ActiveCDSNotSuccess */ + +void LC_LoadDefaultTables_Test_NominalInactiveCDS(void) +{ + int32 Result; + LC_OperData.HaveActiveCDS = FALSE; + + /* Set to satisfy all instances of condition "Result == CFE_SUCCESS" after calls to CFE_TBL_Load */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to satisfy all instances of condition "Result == CFE_SUCCESS" after calls to CFE_TBL_GetAddress */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_LoadDefaultTables(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True(LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA), + "LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA)"); + + UtAssert_True(LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET, "LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_LoadDefaultTables_Test_NominalInactiveCDS */ + +void LC_LoadDefaultTables_Test_LoadWDTError(void) +{ + int32 Result; + + LC_OperData.HaveActiveCDS = FALSE; + + /* Set to generate error message LC_WDT_LOAD_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_LoadDefaultTables(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDT_LOAD_ERR_EID, CFE_EVS_ERROR, "Error (RC=0xFFFFFFFF) Loading WDT with '" LC_WDT_FILENAME "'"), + "Error (RC=0xFFFFFFFF) Loading WDT with '" LC_WDT_FILENAME "'"); + + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_LoadDefaultTables_Test_LoadWDTError */ + +void LC_LoadDefaultTables_Test_GetWDTAddressError(void) +{ + int32 Result; + + LC_OperData.HaveActiveCDS = FALSE; + + /* Set to satisfy all instances of condition "Result == CFE_SUCCESS" after calls to CFE_TBL_Load */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to generate error message LC_WDT_GETADDR_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_LoadDefaultTables(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, "Error getting WDT address, RC=0xFFFFFFFF"), + "Error getting WDT address, RC=0xFFFFFFFF"); + + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_LoadDefaultTables_Test_GetWDTAddressError */ + +void LC_LoadDefaultTables_Test_LoadADTError(void) +{ + int32 Result; + + LC_OperData.HaveActiveCDS = FALSE; + + /* Set to satisfy condition "Result == CFE_SUCCESS" after first call to CFE_TBL_Load */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + + /* Set to satisfy all instances of condition "Result == CFE_SUCCESS" after calls to CFE_TBL_GetAddress */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_LoadDefaultTables(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADT_LOAD_ERR_EID, CFE_EVS_ERROR, "Error (RC=0xCC000013) Loading ADT with '" LC_ADT_FILENAME "'"), + "Error (RC=0xCC000013) Loading ADT with '" LC_ADT_FILENAME "'"); + + UtAssert_True(Result == 0xCC000013, "Result == 0xCC000013"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_LoadDefaultTables_Test_LoadADTError */ + +void LC_LoadDefaultTables_Test_GetADTAddressError(void) +{ + int32 Result; + + LC_OperData.HaveActiveCDS = FALSE; + + /* Set to satisfy all instances of condition "Result == CFE_SUCCESS" after calls to CFE_TBL_Load */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to satisfy condition "Result == CFE_SUCCESS" after first call to CFE_TBL_GetAddress */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + + /* Execute the function being tested */ + Result = LC_LoadDefaultTables(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, "Error getting ADT address, RC=0xCC000001"), + "Error getting ADT address, RC=0xCC000001"); + + UtAssert_True(Result == 0xCC000001, "Result == 0xCC000001"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_LoadDefaultTables_Test_GetADTAddressError */ + +void LC_TableInit_Test_CreateResultTablesError(void) +{ + int32 Result; + + /* Set to make subfunction LC_CreateResultTables return -1, in order to satisfy condition "Result = LC_CreateResultTables()) != CFE_SUCCESS" */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_REGISTER_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_TableInit(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates one event message we don't care about in this test */ + +} /* end LC_TableInit_Test_CreateResultTablesError */ + +void LC_TableInit_Test_CreateDefinitionTablesError(void) +{ + int32 Result; + + /* Set to make subfunction LC_CreateDefinitionTables return -1, in order to satisfy condition "Result = LC_CreateDefinitionTables()) != CFE_SUCCESS" */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_REGISTER_INDEX, -1, 3); + + /* Execute the function being tested */ + Result = LC_TableInit(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates one event message we don't care about in this test */ + +} /* end LC_TableInit_Test_CreateDefinitionTablesError */ + +void LC_TableInit_Test_LoadDefaultTables(void) +{ + int32 Result; + + /* Set to make subfunction LC_LoadDefaultTables return -1, in order to satisfy condition "Result = LC_LoadDefaultTables()) != CFE_SUCCESS" */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_TableInit(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates one event message we don't care about in this test */ + +} /* end LC_TableInit_Test_LoadDefaultTables */ + +void LC_TableInit_Test_GetWDTAddressError(void) +{ + int32 Result; + + LC_OperData.TableResults = LC_WRT_CDS_RESTORED | LC_ART_CDS_RESTORED | LC_APP_CDS_RESTORED | LC_WDT_TBL_RESTORED | LC_ADT_TBL_RESTORED; + + /* Set to generate error message LC_WDT_GETADDR_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, -1, 3); + + /* Execute the function being tested */ + Result = LC_TableInit(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, "Error getting WDT address, RC=0xFFFFFFFF"), + "Error getting WDT address, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_TableInit_Test_GetWDTAddressError */ + +void LC_TableInit_Test_GetADTAddressError(void) +{ + int32 Result; + + LC_OperData.TableResults = LC_WRT_CDS_RESTORED | LC_ART_CDS_RESTORED | LC_APP_CDS_RESTORED | LC_WDT_TBL_RESTORED | LC_ADT_TBL_RESTORED; + + /* Set to generate error message LC_ADT_GETADDR_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, -1, 4); + + /* Execute the function being tested */ + Result = LC_TableInit(); + + /* Verify results */ + UtAssert_True(Result == -1, "Result == -1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, "Error getting ADT address, RC=0xFFFFFFFF"), + "Error getting ADT address, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_TableInit_Test_GetADTAddressError */ + +void LC_TableInit_Test_CreateTaskCDSError(void) +{ + int32 Result; + + /* Set to make subfunction LC_CreateTaskCDS return -1, in order to satisfy condition "LC_CreateTaskCDS" */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_REGISTERCDS_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_TableInit(); + + /* Verify results */ + UtAssert_True(LC_OperData.HaveActiveCDS == FALSE, "LC_OperData.HaveActiveCDS == FALSE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + /* Generates two event messages we don't care about in this test */ + +} /* end LC_TableInit_Test_CreateTaskCDSError */ + +void LC_TableInit_Test_CDSRestored(void) +{ + int32 Result; + + LC_OperData.TableResults = LC_CDS_RESTORED; + + /* Set to prevent unintended error in LC_LoadDefaultTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Execute the function being tested */ + Result = LC_TableInit(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_CDS_RESTORED_INF_EID, CFE_EVS_INFORMATION, "Previous state restored from Critical Data Store"), + "Previous state restored from Critical Data Store"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_TableInit_Test_CDSRestored */ + +void LC_TableInit_Test_CDSUpdated(void) +{ + int32 Result; + + LC_OperData.TableResults = LC_CDS_UPDATED; + + /* Set to prevent unintended error in LC_LoadDefaultTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to generate event message LC_CDS_UPDATED_INF_EID */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_REGISTERCDS_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_TableInit(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_CDS_UPDATED_INF_EID, CFE_EVS_INFORMATION, "Default state loaded and written to CDS, activity mask = 0x00991999"), + "Default state loaded and written to CDS, activity mask = 0x00991999"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + /* Generates one event message we don't care about in this test */ + +} /* end LC_TableInit_Test_CDSUpdated */ + +void LC_TableInit_Test_NeitherRestoredNorUpdated(void) +{ + int32 Result; + + LC_OperData.TableResults = 0; + + /* Set to prevent unintended error in LC_LoadDefaultTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_LOAD_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_LOAD_INDEX); + + /* Set to generate event message LC_CDS_DISABLED_INF_EID */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_REGISTERCDS_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_TableInit(); + + /* Verify results */ + UtAssert_True(Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_CDS_DISABLED_INF_EID, CFE_EVS_INFORMATION, "LC use of Critical Data Store disabled, activity mask = 0x00991991"), + "LC use of Critical Data Store disabled, activity mask = 0x00991991"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + /* Generates one event message we don't care about in this test */ + +} /* end LC_TableInit_Test_NeitherRestoredNorUpdated */ + +void LC_App_Test_AddTestCases(void) +{ +#ifndef LC_SAVE_TO_CDS /* default config unit test */ + UtTest_Add(LC_AppMain_Test_Nominal, LC_Test_Setup, LC_Test_TearDown, "LC_AppMain_Test_Nominal"); +#endif + + UtTest_Add(LC_AppMain_Test_RegisterAppError, LC_Test_Setup, LC_Test_TearDown, "LC_AppMain_Test_RegisterAppError"); + +#ifndef LC_SAVE_TO_CDS /* default config unit test */ + UtTest_Add(LC_AppMain_Test_AppInitError, LC_Test_Setup, LC_Test_TearDown, "LC_AppMain_Test_AppInitError"); + UtTest_Add(LC_AppMain_Test_RcvMsgError, LC_Test_Setup, LC_Test_TearDown, "LC_AppMain_Test_RcvMsgError"); +#endif + +#ifndef LC_SAVE_TO_CDS /* default config unit test */ + UtTest_Add(LC_AppInit_Test_Nominal, LC_Test_Setup, LC_Test_TearDown, "LC_AppInit_Test_Nominal"); +#endif + + UtTest_Add(LC_AppInit_Test_EVSInitError, LC_Test_Setup, LC_Test_TearDown, "LC_AppInit_Test_EVSInitError"); + UtTest_Add(LC_AppInit_Test_SBInitError, LC_Test_Setup, LC_Test_TearDown, "LC_AppInit_Test_SBInitError"); + UtTest_Add(LC_AppInit_Test_TableInitError, LC_Test_Setup, LC_Test_TearDown, "LC_AppInit_Test_TableInitError"); + + UtTest_Add(LC_EvsInit_Test_Nominal, LC_Test_Setup, LC_Test_TearDown, "LC_EvsInit_Test_Nominal"); + UtTest_Add(LC_EvsInit_Test_EVSRegisterError, LC_Test_Setup, LC_Test_TearDown, "LC_EvsInit_Test_EVSRegisterError"); + + UtTest_Add(LC_SbInit_Test_Nominal, LC_Test_Setup, LC_Test_TearDown, "LC_SbInit_Test_Nominal"); + UtTest_Add(LC_SbInit_Test_CreatePipeError, LC_Test_Setup, LC_Test_TearDown, "LC_SbInit_Test_CreatePipeError"); + UtTest_Add(LC_SbInit_Test_SubscribeHKReqError, LC_Test_Setup, LC_Test_TearDown, "LC_SbInit_Test_SubscribeHKReqError"); + UtTest_Add(LC_SbInit_Test_SubscribeGndCmdError, LC_Test_Setup, LC_Test_TearDown, "LC_SbInit_Test_SubscribeGndCmdError"); + UtTest_Add(LC_SbInit_Test_SubscribeSampleCmdError, LC_Test_Setup, LC_Test_TearDown, "LC_SbInit_Test_SubscribeSampleCmdError"); + +#ifdef LC_SAVE_TO_CDS /* Alt confg unit tests */ + UtTest_Add(LC_TableInit_Test_CreateTaskCDSError, LC_Test_Setup, LC_Test_TearDown, "LC_TableInit_Test_CreateTaskCDSError"); + UtTest_Add(LC_TableInit_Test_CDSRestored, LC_Test_Setup, LC_Test_TearDown, "LC_TableInit_Test_CDSRestored"); + UtTest_Add(LC_TableInit_Test_CDSUpdated, LC_Test_Setup, LC_Test_TearDown, "LC_TableInit_Test_CDSUpdated"); +#endif + + UtTest_Add(LC_TableInit_Test_CreateResultTablesError, LC_Test_Setup, LC_Test_TearDown, "LC_TableInit_Test_CreateResultTablesError"); + +#ifndef LC_SAVE_TO_CDS /* default config unit test */ + UtTest_Add(LC_TableInit_Test_CreateDefinitionTablesError, LC_Test_Setup, LC_Test_TearDown, "LC_TableInit_Test_CreateDefinitionTablesError"); +#endif + + UtTest_Add(LC_TableInit_Test_LoadDefaultTables, LC_Test_Setup, LC_Test_TearDown, "LC_TableInit_Test_LoadDefaultTables"); + UtTest_Add(LC_TableInit_Test_GetWDTAddressError, LC_Test_Setup, LC_Test_TearDown, "LC_TableInit_Test_GetWDTAddressError"); + UtTest_Add(LC_TableInit_Test_GetADTAddressError, LC_Test_Setup, LC_Test_TearDown, "LC_TableInit_Test_GetADTAddressError"); + + UtTest_Add(LC_CreateResultTables_Test_Nominal, LC_Test_Setup, LC_Test_TearDown, "LC_CreateResultTables_Test_Nominal"); + UtTest_Add(LC_CreateResultTables_Test_WRTRegisterError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateResultTables_Test_WRTRegisterError"); + UtTest_Add(LC_CreateResultTables_Test_WRTGetAddressError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateResultTables_Test_WRTGetAddressError"); + UtTest_Add(LC_CreateResultTables_Test_ARTRegisterError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateResultTables_Test_ARTRegisterError"); + UtTest_Add(LC_CreateResultTables_Test_ARTGetAddressError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateResultTables_Test_ARTGetAddressError"); + + UtTest_Add(LC_CreateDefinitionTables_Test_NominalCDSActive, LC_Test_Setup, LC_Test_TearDown, "LC_CreateDefinitionTables_Test_NominalCDSActive"); + UtTest_Add(LC_CreateDefinitionTables_Test_NominalCDSInactive, LC_Test_Setup, LC_Test_TearDown, "LC_CreateDefinitionTables_Test_NominalCDSInactive"); + UtTest_Add(LC_CreateDefinitionTables_Test_WDTReRegisterThenInfoRecovered, LC_Test_Setup, LC_Test_TearDown, "LC_CreateDefinitionTables_Test_WDTReRegisterThenInfoRecovered"); + UtTest_Add(LC_CreateDefinitionTables_Test_ADTReRegisterThenInfoRecovered, LC_Test_Setup, LC_Test_TearDown, "LC_CreateDefinitionTables_Test_ADTReRegisterThenInfoRecovered"); + UtTest_Add(LC_CreateDefinitionTables_Test_WDTReRegisterError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateDefinitionTables_Test_WDTReRegisterError"); + UtTest_Add(LC_CreateDefinitionTables_Test_WDTCriticalADTNoncritical, LC_Test_Setup, LC_Test_TearDown, "LC_CreateDefinitionTables_Test_WDTCriticalADTNoncritical"); + UtTest_Add(LC_CreateDefinitionTables_Test_WDTRegisterError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateDefinitionTables_Test_WDTRegisterError"); + UtTest_Add(LC_CreateDefinitionTables_Test_ADTRegisterError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateDefinitionTables_Test_ADTRegisterError"); + + UtTest_Add(LC_CreateTaskCDS_Test_NominalPowerOnReset, LC_Test_Setup, LC_Test_TearDown, "LC_CreateTaskCDS_Test_NominalPowerOnReset"); + UtTest_Add(LC_CreateTaskCDS_Test_NominalProcessorReset, LC_Test_Setup, LC_Test_TearDown, "LC_CreateTaskCDS_Test_NominalProcessorReset"); // FIXME: need #if statement around this? Depends on a DCR. Currently skips a line. + UtTest_Add(LC_CreateTaskCDS_Test_WRTRegisterCDSError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateTaskCDS_Test_WRTRegisterCDSError"); + UtTest_Add(LC_CreateTaskCDS_Test_ARTRegisterCDSError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateTaskCDS_Test_ARTRegisterCDSError"); + UtTest_Add(LC_CreateTaskCDS_Test_AppDataRegisterCDSError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateTaskCDS_Test_AppDataRegisterCDSError"); + + UtTest_Add(LC_LoadDefaultTables_Test_NominalActiveCDS, LC_Test_Setup, LC_Test_TearDown, "LC_LoadDefaultTables_Test_NominalActiveCDS"); + UtTest_Add(LC_LoadDefaultTables_Test_ActiveCDSNotSuccess, LC_Test_Setup, LC_Test_TearDown, "LC_LoadDefaultTables_Test_ActiveCDSNotSuccess"); + UtTest_Add(LC_LoadDefaultTables_Test_NominalInactiveCDS, LC_Test_Setup, LC_Test_TearDown, "LC_LoadDefaultTables_Test_NominalInactiveCDS"); + UtTest_Add(LC_LoadDefaultTables_Test_LoadWDTError, LC_Test_Setup, LC_Test_TearDown, "LC_LoadDefaultTables_Test_LoadWDTError"); + UtTest_Add(LC_LoadDefaultTables_Test_GetWDTAddressError, LC_Test_Setup, LC_Test_TearDown, "LC_LoadDefaultTables_Test_GetWDTAddressError"); + UtTest_Add(LC_LoadDefaultTables_Test_LoadADTError, LC_Test_Setup, LC_Test_TearDown, "LC_LoadDefaultTables_Test_LoadADTError"); + UtTest_Add(LC_LoadDefaultTables_Test_GetADTAddressError, LC_Test_Setup, LC_Test_TearDown, "LC_LoadDefaultTables_Test_GetADTAddressError"); + +} /* end LC_App_Test_AddTestCases */ + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_app_test.h b/fsw/unit_test/lc_app_test.h new file mode 100644 index 0000000..0fef083 --- /dev/null +++ b/fsw/unit_test/lc_app_test.h @@ -0,0 +1,41 @@ + /************************************************************************* + ** File: + ** $Id: lc_app_test.h 1.3 2017/01/22 17:24:30EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains the function prototypes for the unit test cases for lc_app.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "utassert.h" +#include "uttest.h" + +/* + * Function Prototypes + */ + +void LC_App_Test_AddTestCases(void); + + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_cmds.c.gcov b/fsw/unit_test/lc_cmds.c.gcov new file mode 100644 index 0000000..bb23d1c --- /dev/null +++ b/fsw/unit_test/lc_cmds.c.gcov @@ -0,0 +1,1243 @@ + -: 0:Source:../src/lc_cmds.c + -: 0:Programs:5 + -: 1:/************************************************************************ + -: 2:** File: + -: 3:** $Id: lc_cmds.c.gcov 1.4 2017/01/12 12:47:11EST czogby Exp $ + -: 4:** + -: 5:** Copyright � 2007-2014 United States Government as represented by the + -: 6:** Administrator of the National Aeronautics and Space Administration. + -: 7:** All Other Rights Reserved. + -: 8:** + -: 9:** This software was created at NASA's Goddard Space Flight Center. + -: 10:** This software is governed by the NASA Open Source Agreement and may be + -: 11:** used, distributed and modified only pursuant to the terms of that + -: 12:** agreement. + -: 13:** + -: 14:** Purpose: + -: 15:** CFS Limit Checker (LC) command handling routines + -: 16:** + -: 17:** $Log: lc_cmds.c.gcov $ + -: 17:** Revision 1.4 2017/01/12 12:47:11EST czogby + -: 17:** Move function prototypes from .c to .h, and fix comments + -: 18:** Revision 1.3 2016/11/21 13:17:59EST mdeschu + -: 19:** Cleaned up CFE_EVS_SendEvent format warnings by using C-Style casts + -: 20:** Revision 1.2 2015/11/16 14:26:21EST wmoleski + -: 21:** Most of the files were missing the Copyright comments. + -: 22:** Revision 1.6 2015/03/04 16:09:55EST sstrege + -: 23:** Added copyright information + -: 24:** Revision 1.5 2012/08/22 17:17:02EDT lwalling + -: 25:** Modified true to false transition monitor to also accept stale to false + -: 26:** Revision 1.4 2012/08/01 14:03:03PDT lwalling + -: 27:** Add age WP results option to AP sample command + -: 28:** Revision 1.3 2012/08/01 12:40:48PDT lwalling + -: 29:** Add STALE counters to watchpoint definition and result tables + -: 30:** Revision 1.2 2012/08/01 11:20:12PDT lwalling + -: 31:** Change NOT_MEASURED to STALE + -: 32:** Revision 1.1 2012/07/31 13:53:37PDT nschweis + -: 33:** Initial revision + -: 34:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj + -: 35:** Revision 1.15 2011/06/08 16:11:29EDT lwalling + -: 36:** Changed call from LC_SubscribeWP() to LC_CreateHashTable(), removed function LC_SubscribeWP() + -: 37:** Revision 1.14 2011/03/02 10:53:35EST lwalling + -: 38:** Explicitly state return value when known to be CFE_SUCCESS + -: 39:** Revision 1.13 2011/03/01 15:42:08EST lwalling + -: 40:** Fix typo in manage function, move LC_SubscribeWP() and LC_UpdateTaskCDS() to lc_cmds.c + -: 41:** Revision 1.12 2011/03/01 09:37:34EST lwalling + -: 42:** Modified table management logic and updates to CDS + -: 43:** Revision 1.11 2011/02/14 16:53:21EST lwalling + -: 44:** Created LC_ResetResultsAP() and LC_ResetResultsWP(), modified reset stats cmd handlers to call them + -: 45:** Revision 1.10 2011/02/07 17:58:12EST lwalling + -: 46:** Modify sample AP commands to target groups of AP's + -: 47:** Revision 1.9 2011/01/19 11:32:07EST jmdagost + -: 48:** Moved mission revision number from lc_version.h to lc_platform_cfg.h. + -: 49:** Revision 1.8 2010/03/01 11:12:10EST lwalling + -: 50:** Set data saved state flag whenever critical data is stored + -: 51:** Revision 1.7 2010/02/23 12:12:01EST lwalling + -: 52:** Add PassiveAPCount to list of AP results cleared by command + -: 53:** Revision 1.6 2010/01/04 14:10:03EST lwalling + -: 54:** Update CDS when report housekeeping + -: 55:** Revision 1.5 2009/01/15 15:36:14EST dahardis + -: 56:** Unit test fixes + -: 57:** Revision 1.4 2009/01/09 11:34:53EST dahardis + -: 58:** Fixed call to CFE_TBL_GetAddress for the Actionpoint Definition Table that was + -: 59:** passing in the wrong table handle, causing the Actionpoint Results Table to be + -: 60:** initialized incorrectly. + -: 61:** Revision 1.3 2008/12/10 09:38:36EST dahardis + -: 62:** Fixed calls to CFE_TBL_GetAddress (DCR #4699) + -: 63:** Revision 1.2 2008/12/03 13:59:34EST dahardis + -: 64:** Corrections from peer code review + -: 65:** Revision 1.1 2008/10/29 14:19:03EDT dahardison + -: 66:** Initial revision + -: 67:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj + -: 68:** + -: 69:*************************************************************************/ + -: 70: + -: 71:/************************************************************************ + -: 72:** Includes + -: 73:*************************************************************************/ + -: 74:#include "lc_app.h" + -: 75:#include "lc_cmds.h" + -: 76:#include "lc_msgids.h" + -: 77:#include "lc_events.h" + -: 78:#include "lc_version.h" + -: 79:#include "lc_action.h" + -: 80:#include "lc_watch.h" + -: 81:#include "lc_platform_cfg.h" + -: 82: + -: 83:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 84:/* */ + -: 85:/* Process a command pipe message */ + -: 86:/* */ + -: 87:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 12: 88:int32 LC_AppPipe(CFE_SB_MsgPtr_t MessagePtr) + -: 89:{ + 12: 90: int32 Status = CFE_SUCCESS; + 12: 91: CFE_SB_MsgId_t MessageID = 0; + 12: 92: uint16 CommandCode = 0; + -: 93: + 12: 94: MessageID = CFE_SB_GetMsgId(MessagePtr); + 12: 95: switch (MessageID) + -: 96: { + -: 97: /* + -: 98: ** Sample actionpoints request + -: 99: */ + -: 100: case LC_SAMPLE_AP_MID: + 1: 101: LC_SampleAPReq(MessagePtr); + 1: 102: break; + -: 103: + -: 104: /* + -: 105: ** Housekeeping telemetry request + -: 106: ** (only routine that can return a critical error indicator) + -: 107: */ + -: 108: case LC_SEND_HK_MID: + 1: 109: Status = LC_HousekeepingReq(MessagePtr); + 1: 110: break; + -: 111: + -: 112: /* + -: 113: ** LC application commands... + -: 114: */ + -: 115: case LC_CMD_MID: + -: 116: + 8: 117: CommandCode = CFE_SB_GetCmdCode(MessagePtr); + 8: 118: switch (CommandCode) + -: 119: { + -: 120: case LC_NOOP_CC: + 1: 121: LC_NoopCmd(MessagePtr); + 1: 122: break; + -: 123: + -: 124: case LC_RESET_CC: + 1: 125: LC_ResetCmd(MessagePtr); + 1: 126: break; + -: 127: + -: 128: case LC_SET_LC_STATE_CC: + 1: 129: LC_SetLCStateCmd(MessagePtr); + 1: 130: break; + -: 131: + -: 132: case LC_SET_AP_STATE_CC: + 1: 133: LC_SetAPStateCmd(MessagePtr); + 1: 134: break; + -: 135: + -: 136: case LC_SET_AP_PERMOFF_CC: + 1: 137: LC_SetAPPermOffCmd(MessagePtr); + 1: 138: break; + -: 139: + -: 140: case LC_RESET_AP_STATS_CC: + 1: 141: LC_ResetAPStatsCmd(MessagePtr); + 1: 142: break; + -: 143: + -: 144: case LC_RESET_WP_STATS_CC: + 1: 145: LC_ResetWPStatsCmd(MessagePtr); + 1: 146: break; + -: 147: + -: 148: default: + 1: 149: CFE_EVS_SendEvent(LC_CC_ERR_EID, CFE_EVS_ERROR, + -: 150: "Invalid command code: ID = 0x%04X, CC = %d", + -: 151: MessageID, CommandCode); + -: 152: + 1: 153: LC_AppData.CmdErrCount++; + -: 154: break; + -: 155: + -: 156: } /* end CommandCode switch */ + 8: 157: break; + -: 158: + -: 159: /* + -: 160: ** All other message ID's should be monitor + -: 161: ** packets + -: 162: */ + -: 163: default: + 2: 164: LC_CheckMsgForWPs(MessageID, MessagePtr); + -: 165: break; + -: 166: + -: 167: } /* end MessageID switch */ + -: 168: + 12: 169: return (Status); + -: 170: + -: 171:} /* End LC_AppPipe */ + -: 172: + -: 173:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 174:/* */ + -: 175:/* Sample Actionpoints Request */ + -: 176:/* */ + -: 177:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 4: 178:void LC_SampleAPReq(CFE_SB_MsgPtr_t MessagePtr) + -: 179:{ + 4: 180: LC_SampleAP_t *LC_SampleAP = (LC_SampleAP_t *) MessagePtr; + 4: 181: uint16 ExpectedLength = sizeof(LC_SampleAP_t); + -: 182: uint16 WatchIndex; + 4: 183: boolean ValidSampleCmd = FALSE; + -: 184: + -: 185: /* + -: 186: ** Verify message packet length + -: 187: */ + 4: 188: if (LC_VerifyMsgLength(MessagePtr, ExpectedLength)) + -: 189: { + -: 190: /* + -: 191: ** Ignore AP sample requests if disabled at the application level + -: 192: */ + 3: 193: if (LC_AppData.CurrentLCState != LC_STATE_DISABLED) + -: 194: { + -: 195: /* + -: 196: ** Range check the actionpoint array index arguments + -: 197: */ + 5: 198: if ((LC_SampleAP->StartIndex == LC_ALL_ACTIONPOINTS) && + 1: 199: (LC_SampleAP->EndIndex == LC_ALL_ACTIONPOINTS)) + -: 200: { + -: 201: /* + -: 202: ** Allow special "sample all" heritage values + -: 203: */ + 1: 204: LC_SampleAPs(0, LC_MAX_ACTIONPOINTS - 1); + 1: 205: ValidSampleCmd = TRUE; + -: 206: } + 4: 207: else if ((LC_SampleAP->StartIndex <= LC_SampleAP->EndIndex) && + 1: 208: (LC_SampleAP->EndIndex < LC_MAX_ACTIONPOINTS)) + -: 209: { + -: 210: /* + -: 211: ** Start is less or equal to end, and end is within the array + -: 212: */ + 1: 213: LC_SampleAPs(LC_SampleAP->StartIndex, LC_SampleAP->EndIndex); + 1: 214: ValidSampleCmd = TRUE; + -: 215: } + -: 216: else + -: 217: { + -: 218: /* + -: 219: ** At least one actionpoint array index is out of range + -: 220: */ + 2: 221: CFE_EVS_SendEvent(LC_APSAMPLE_APNUM_ERR_EID, CFE_EVS_ERROR, + -: 222: "Sample AP error: invalid AP number, start = %d, end = %d", + 2: 223: LC_SampleAP->StartIndex, LC_SampleAP->EndIndex); + -: 224: } + -: 225: + -: 226: /* + -: 227: ** Optionally update the age of watchpoint results + -: 228: */ + 3: 229: if ((LC_SampleAP->UpdateAge != 0) && (ValidSampleCmd)) + -: 230: { + 354: 231: for (WatchIndex = 0; WatchIndex < LC_MAX_WATCHPOINTS; WatchIndex++) + -: 232: { + 352: 233: if (LC_OperData.WRTPtr[WatchIndex].CountdownToStale != 0) + -: 234: { + 2: 235: LC_OperData.WRTPtr[WatchIndex].CountdownToStale--; + -: 236: + 2: 237: if (LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0) + -: 238: { + 2: 239: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + -: 240: } + -: 241: } + -: 242: } + -: 243: } + -: 244: } + -: 245: } + -: 246: + 4: 247: return; + -: 248: + -: 249:} /* end LC_SampleAPReq */ + -: 250: + -: 251:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 252:/* */ + -: 253:/* Housekeeping request */ + -: 254:/* */ + -: 255:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 14: 256:int32 LC_HousekeepingReq(CFE_SB_MsgPtr_t MessagePtr) + -: 257:{ + -: 258: int32 Result; + 14: 259: uint16 ExpectedLength = sizeof(LC_NoArgsCmd_t); + -: 260: uint16 TableIndex; + -: 261: uint16 HKIndex; + -: 262: uint8 ByteData; + -: 263: + -: 264: /* + -: 265: ** Verify message packet length + -: 266: */ + 14: 267: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) + -: 268: { + -: 269: /* + -: 270: ** Update HK variables + -: 271: */ + 13: 272: LC_OperData.HkPacket.CmdCount = LC_AppData.CmdCount; + 13: 273: LC_OperData.HkPacket.CmdErrCount = LC_AppData.CmdErrCount; + 13: 274: LC_OperData.HkPacket.APSampleCount = LC_AppData.APSampleCount; + 13: 275: LC_OperData.HkPacket.MonitoredMsgCount = LC_AppData.MonitoredMsgCount; + 13: 276: LC_OperData.HkPacket.RTSExecCount = LC_AppData.RTSExecCount; + 13: 277: LC_OperData.HkPacket.PassiveRTSExecCount = LC_AppData.PassiveRTSExecCount; + 13: 278: LC_OperData.HkPacket.CurrentLCState = LC_AppData.CurrentLCState; + 13: 279: LC_OperData.HkPacket.WPsInUse = LC_OperData.WatchpointCount; + -: 280: + -: 281: /* + -: 282: ** Clear out the active actionpoint count, it will get + -: 283: ** recomputed below + -: 284: */ + 13: 285: LC_OperData.HkPacket.ActiveAPs = 0; + -: 286: + -: 287: /* + -: 288: ** Update packed watch results + -: 289: ** (4 watch results in one 8-bit byte) + -: 290: */ + 585: 291: for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex += 4) + -: 292: { + 572: 293: HKIndex = TableIndex / 4; + -: 294: + -: 295: /* + -: 296: ** Pack in first result + -: 297: */ + 572: 298: switch (LC_OperData.WRTPtr[TableIndex + 3].WatchResult) + -: 299: { + -: 300: case LC_WATCH_STALE: + 44: 301: ByteData = LC_HKWR_STALE << 6; + 44: 302: break; + -: 303: + -: 304: case LC_WATCH_FALSE: + 396: 305: ByteData = LC_HKWR_FALSE << 6; + 396: 306: break; + -: 307: + -: 308: case LC_WATCH_TRUE: + 44: 309: ByteData = LC_HKWR_TRUE << 6; + 44: 310: break; + -: 311: + -: 312: /* + -: 313: ** We should never get an undefined watch result, + -: 314: ** but we'll set an error result if we do + -: 315: */ + -: 316: case LC_WATCH_ERROR: + -: 317: default: + 88: 318: ByteData = LC_HKWR_ERROR << 6; + -: 319: break; + -: 320: } + -: 321: + -: 322: /* + -: 323: ** Pack in second result + -: 324: */ + 572: 325: switch (LC_OperData.WRTPtr[TableIndex + 2].WatchResult) + -: 326: { + -: 327: case LC_WATCH_STALE: + 44: 328: ByteData = (ByteData | (LC_HKWR_STALE << 4)); + 44: 329: break; + -: 330: + -: 331: case LC_WATCH_FALSE: + 396: 332: ByteData = (ByteData | (LC_HKWR_FALSE << 4)); + 396: 333: break; + -: 334: + -: 335: case LC_WATCH_TRUE: + 44: 336: ByteData = (ByteData | (LC_HKWR_TRUE << 4)); + 44: 337: break; + -: 338: + -: 339: case LC_WATCH_ERROR: + -: 340: default: + 88: 341: ByteData = (ByteData | (LC_HKWR_ERROR << 4)); + -: 342: break; + -: 343: } + -: 344: + -: 345: /* + -: 346: ** Pack in third result + -: 347: */ + 572: 348: switch (LC_OperData.WRTPtr[TableIndex + 1].WatchResult) + -: 349: { + -: 350: case LC_WATCH_STALE: + 44: 351: ByteData = (ByteData | (LC_HKWR_STALE << 2)); + 44: 352: break; + -: 353: + -: 354: case LC_WATCH_FALSE: + 396: 355: ByteData = (ByteData | (LC_HKWR_FALSE << 2)); + 396: 356: break; + -: 357: + -: 358: case LC_WATCH_TRUE: + 44: 359: ByteData = (ByteData | (LC_HKWR_TRUE << 2)); + 44: 360: break; + -: 361: + -: 362: case LC_WATCH_ERROR: + -: 363: default: + 88: 364: ByteData = (ByteData | (LC_HKWR_ERROR << 2)); + -: 365: break; + -: 366: } + -: 367: + -: 368: /* + -: 369: ** Pack in fourth and last result + -: 370: */ + 572: 371: switch (LC_OperData.WRTPtr[TableIndex].WatchResult) + -: 372: { + -: 373: case LC_WATCH_STALE: + 44: 374: ByteData = (ByteData | LC_HKWR_STALE); + 44: 375: break; + -: 376: + -: 377: case LC_WATCH_FALSE: + 396: 378: ByteData = (ByteData | LC_HKWR_FALSE); + 396: 379: break; + -: 380: + -: 381: case LC_WATCH_TRUE: + 44: 382: ByteData = (ByteData | LC_HKWR_TRUE); + 44: 383: break; + -: 384: + -: 385: case LC_WATCH_ERROR: + -: 386: default: + 88: 387: ByteData = (ByteData | LC_HKWR_ERROR); + -: 388: break; + -: 389: } + -: 390: + -: 391: /* + -: 392: ** Update houskeeping watch results array + -: 393: */ + 572: 394: LC_OperData.HkPacket.WPResults[HKIndex] = ByteData; + -: 395: + -: 396: } /* end watch results for loop */ + -: 397: + -: 398: /* + -: 399: ** Update packed action results + -: 400: ** (2 action state/result pairs (4 bits each) in one 8-bit byte) + -: 401: */ + 1157: 402: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex += 2) + -: 403: { + 1144: 404: HKIndex = TableIndex / 2; + -: 405: + -: 406: /* + -: 407: ** Pack in first actionpoint, current state + -: 408: */ + 1144: 409: switch (LC_OperData.ARTPtr[TableIndex + 1].CurrentState) + -: 410: { + -: 411: case LC_ACTION_NOT_USED: + 88: 412: ByteData = LC_HKAR_STATE_NOT_USED << 6; + 88: 413: break; + -: 414: + -: 415: case LC_APSTATE_ACTIVE: + 88: 416: ByteData = LC_HKAR_STATE_ACTIVE << 6; + 88: 417: LC_OperData.HkPacket.ActiveAPs++; + 88: 418: break; + -: 419: + -: 420: case LC_APSTATE_PASSIVE: + 88: 421: ByteData = LC_HKAR_STATE_PASSIVE << 6; + 88: 422: break; + -: 423: + -: 424: case LC_APSTATE_DISABLED: + 88: 425: ByteData = LC_HKAR_STATE_DISABLED << 6; + 88: 426: break; + -: 427: + -: 428: /* + -: 429: ** Permanantly disabled actionpoints get reported + -: 430: ** as unused. We should never get an undefined + -: 431: ** action state, but we'll set to not used if we do. + -: 432: */ + -: 433: case LC_APSTATE_PERMOFF: + -: 434: default: + 792: 435: ByteData = LC_HKAR_STATE_NOT_USED << 6; + -: 436: break; + -: 437: } + -: 438: + -: 439: /* + -: 440: ** Pack in first actionpoint, action result + -: 441: */ + 1144: 442: switch (LC_OperData.ARTPtr[TableIndex + 1].ActionResult) + -: 443: { + -: 444: case LC_ACTION_STALE: + 88: 445: ByteData = (ByteData | (LC_HKAR_STALE << 4)); + 88: 446: break; + -: 447: + -: 448: case LC_ACTION_PASS: + 704: 449: ByteData = (ByteData | (LC_HKAR_PASS << 4)); + 704: 450: break; + -: 451: + -: 452: case LC_ACTION_FAIL: + 88: 453: ByteData = (ByteData | (LC_HKAR_FAIL << 4)); + 88: 454: break; + -: 455: + -: 456: /* + -: 457: ** We should never get an undefined action result, + -: 458: ** but we'll set an error result if we do + -: 459: */ + -: 460: case LC_ACTION_ERROR: + -: 461: default: + 264: 462: ByteData = (ByteData | (LC_HKAR_ERROR << 4)); + -: 463: break; + -: 464: } + -: 465: + -: 466: /* + -: 467: ** Pack in second actionpoint, current state + -: 468: */ + 1144: 469: switch (LC_OperData.ARTPtr[TableIndex].CurrentState) + -: 470: { + -: 471: case LC_ACTION_NOT_USED: + 88: 472: ByteData = (ByteData | (LC_HKAR_STATE_NOT_USED << 2)); + 88: 473: break; + -: 474: + -: 475: case LC_APSTATE_ACTIVE: + 88: 476: ByteData = (ByteData | (LC_HKAR_STATE_ACTIVE << 2)); + 88: 477: LC_OperData.HkPacket.ActiveAPs++; + 88: 478: break; + -: 479: + -: 480: case LC_APSTATE_PASSIVE: + 88: 481: ByteData = (ByteData | (LC_HKAR_STATE_PASSIVE << 2)); + 88: 482: break; + -: 483: + -: 484: case LC_APSTATE_DISABLED: + 88: 485: ByteData = (ByteData | (LC_HKAR_STATE_DISABLED << 2)); + 88: 486: break; + -: 487: + -: 488: case LC_APSTATE_PERMOFF: + -: 489: default: + 792: 490: ByteData = (ByteData | (LC_HKAR_STATE_NOT_USED << 2)); + -: 491: break; + -: 492: } + -: 493: + -: 494: /* + -: 495: ** Pack in second actionpoint, action result + -: 496: */ + 1144: 497: switch (LC_OperData.ARTPtr[TableIndex].ActionResult) + -: 498: { + -: 499: case LC_ACTION_STALE: + 88: 500: ByteData = (ByteData | LC_HKAR_STALE); + 88: 501: break; + -: 502: + -: 503: case LC_ACTION_PASS: + 704: 504: ByteData = (ByteData | LC_HKAR_PASS); + 704: 505: break; + -: 506: + -: 507: case LC_ACTION_FAIL: + 88: 508: ByteData = (ByteData | LC_HKAR_FAIL); + 88: 509: break; + -: 510: + -: 511: case LC_ACTION_ERROR: + -: 512: default: + 264: 513: ByteData = (ByteData | LC_HKAR_ERROR); + -: 514: break; + -: 515: } + -: 516: + -: 517: /* + -: 518: ** Update houskeeping action results array + -: 519: */ + 1144: 520: LC_OperData.HkPacket.APResults[HKIndex] = ByteData; + -: 521: + -: 522: } /* end action results for loop */ + -: 523: + -: 524: /* + -: 525: ** Timestamp and send housekeeping packet + -: 526: */ + 13: 527: CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &LC_OperData.HkPacket); + 13: 528: CFE_SB_SendMsg((CFE_SB_Msg_t *) &LC_OperData.HkPacket); + -: 529: + -: 530: } /* end LC_VerifyMsgLength if */ + -: 531: + -: 532: /* + -: 533: ** Manage tables - allow cFE to perform dump, update, etc. + -: 534: ** (an error here is fatal - LC must be able to access its tables) + -: 535: */ + 14: 536: if ((Result = LC_ManageTables()) != CFE_SUCCESS) + -: 537: { + 1: 538: return(Result); + -: 539: } + -: 540: + -: 541: /* + -: 542: ** A somewhat arbitrary decision was made to update the CDS only + -: 543: ** as often as we report housekeeping, thus we do it here. One + -: 544: ** alternative was to do the update every time the results tables + -: 545: ** were modified - but that would result in the update occurring + -: 546: ** several times per second. By doing the update now we cut down + -: 547: ** on the update frequency at the cost of the stored data being + -: 548: ** a couple of seconds old when a processor reset does occur. + -: 549: */ + 13: 550: if (LC_OperData.HaveActiveCDS) + -: 551: { + -: 552: /* + -: 553: ** If CDS is enabled - update the 3 CDS areas managed by LC + -: 554: ** (continue, but disable CDS if unable to update all 3) + -: 555: */ + 1: 556: if (LC_UpdateTaskCDS() != CFE_SUCCESS) + -: 557: { + 1: 558: LC_OperData.HaveActiveCDS = FALSE; + -: 559: } + -: 560: } + -: 561: + 13: 562: return(CFE_SUCCESS); + -: 563: + -: 564:} /* end LC_HousekeepingCmd */ + -: 565: + -: 566:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 567:/* */ + -: 568:/* Noop command */ + -: 569:/* */ + -: 570:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 1: 571:void LC_NoopCmd(CFE_SB_MsgPtr_t MessagePtr) + -: 572:{ + 1: 573: uint16 ExpectedLength = sizeof(LC_NoArgsCmd_t); + -: 574: + -: 575: /* + -: 576: ** Verify message packet length + -: 577: */ + 1: 578: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) + -: 579: { + 1: 580: LC_AppData.CmdCount++; + -: 581: + 1: 582: CFE_EVS_SendEvent(LC_NOOP_INF_EID, CFE_EVS_INFORMATION, + -: 583: "No-op command: Version %d.%d.%d.%d", + -: 584: LC_MAJOR_VERSION, + -: 585: LC_MINOR_VERSION, + -: 586: LC_REVISION, + -: 587: LC_MISSION_REV); + -: 588: } + -: 589: + 1: 590: return; + -: 591: + -: 592:} /* end LC_NoopCmd */ + -: 593: + -: 594:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 595:/* */ + -: 596:/* Reset counters command */ + -: 597:/* */ + -: 598:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 1: 599:void LC_ResetCmd(CFE_SB_MsgPtr_t MessagePtr) + -: 600:{ + 1: 601: uint16 ExpectedLength = sizeof(LC_NoArgsCmd_t); + -: 602: + -: 603: /* + -: 604: ** Verify message packet length + -: 605: */ + 1: 606: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) + -: 607: { + 1: 608: LC_ResetCounters(); + -: 609: + 1: 610: CFE_EVS_SendEvent(LC_RESET_DBG_EID, CFE_EVS_DEBUG, + -: 611: "Reset counters command"); + -: 612: } + -: 613: + 1: 614: return; + -: 615: + -: 616:} /* end LC_ResetCmd */ + -: 617: + -: 618:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 619:/* */ + -: 620:/* Reset housekeeping counters */ + -: 621:/* */ + -: 622:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 8: 623:void LC_ResetCounters(void) + -: 624:{ + 8: 625: LC_AppData.CmdCount = 0; + 8: 626: LC_AppData.CmdErrCount = 0; + -: 627: + 8: 628: LC_AppData.APSampleCount = 0; + 8: 629: LC_AppData.MonitoredMsgCount = 0; + 8: 630: LC_AppData.RTSExecCount = 0; + 8: 631: LC_AppData.PassiveRTSExecCount = 0; + -: 632: + 8: 633: return; + -: 634: + -: 635:} /* end LC_ResetCounters */ + -: 636: + -: 637:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 638:/* */ + -: 639:/* Set LC state command */ + -: 640:/* */ + -: 641:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 5: 642:void LC_SetLCStateCmd(CFE_SB_MsgPtr_t MessagePtr) + -: 643:{ + 5: 644: uint16 ExpectedLength = sizeof(LC_SetLCState_t); + -: 645: LC_SetLCState_t *CmdPtr; + -: 646: + -: 647: /* + -: 648: ** Verify message packet length + -: 649: */ + 5: 650: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) + -: 651: { + 5: 652: CmdPtr = ((LC_SetLCState_t *)MessagePtr); + -: 653: + 5: 654: switch (CmdPtr -> NewLCState) + -: 655: { + -: 656: case LC_STATE_ACTIVE: + -: 657: case LC_STATE_PASSIVE: + -: 658: case LC_STATE_DISABLED: + 3: 659: LC_AppData.CurrentLCState = CmdPtr -> NewLCState; + 3: 660: LC_AppData.CmdCount++; + -: 661: + 3: 662: CFE_EVS_SendEvent(LC_LCSTATE_INF_EID, CFE_EVS_INFORMATION, + -: 663: "Set LC state command: new state = %d", + 3: 664: CmdPtr -> NewLCState); + 3: 665: break; + -: 666: + -: 667: default: + 2: 668: CFE_EVS_SendEvent(LC_LCSTATE_ERR_EID, CFE_EVS_ERROR, + -: 669: "Set LC state error: invalid state = %d", + 2: 670: CmdPtr -> NewLCState); + -: 671: + 2: 672: LC_AppData.CmdErrCount++; + -: 673: break; + -: 674: } + -: 675: } + -: 676: + 5: 677: return; + -: 678: + -: 679:} /* end LC_SetLCStateCmd */ + -: 680: + -: 681:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 682:/* */ + -: 683:/* Set actionpoint state command */ + -: 684:/* */ + -: 685:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 14: 686:void LC_SetAPStateCmd(CFE_SB_MsgPtr_t MessagePtr) + -: 687:{ + 14: 688: uint16 ExpectedLength = sizeof(LC_SetAPState_t); + -: 689: LC_SetAPState_t *CmdPtr; + -: 690: uint32 TableIndex; + -: 691: uint8 CurrentAPState; + 14: 692: boolean ValidState = TRUE; + 14: 693: boolean CmdSuccess = FALSE; + -: 694: + -: 695: /* + -: 696: ** Verify message packet length + -: 697: */ + 14: 698: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) + -: 699: { + 14: 700: CmdPtr = ((LC_SetAPState_t *)MessagePtr); + -: 701: + -: 702: /* + -: 703: ** Do a sanity check on the new actionpoint state + -: 704: ** specified. + -: 705: */ + 14: 706: switch (CmdPtr -> NewAPState) + -: 707: { + -: 708: case LC_APSTATE_ACTIVE: + -: 709: case LC_APSTATE_PASSIVE: + -: 710: case LC_APSTATE_DISABLED: + 12: 711: break; + -: 712: + -: 713: default: + 2: 714: ValidState = FALSE; + 4: 715: CFE_EVS_SendEvent(LC_APSTATE_NEW_ERR_EID, CFE_EVS_ERROR, + -: 716: "Set AP state error: AP = %d, Invalid new state = %d", + 4: 717: CmdPtr -> APNumber, CmdPtr -> NewAPState); + -: 718: + 2: 719: LC_AppData.CmdErrCount++; + -: 720: break; + -: 721: } + -: 722: + -: 723: /* + -: 724: ** Do the rest based on the actionpoint ID we were given + -: 725: */ + 14: 726: if (ValidState == TRUE) + -: 727: { + 12: 728: if ((CmdPtr -> APNumber) == LC_ALL_ACTIONPOINTS) + -: 729: { + -: 730: /* + -: 731: ** Set all actionpoints to the new state except those that are not + -: 732: ** used or set permanently off + -: 733: */ + 531: 734: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + -: 735: { + 528: 736: CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState; + -: 737: + 528: 738: if ((CurrentAPState != LC_ACTION_NOT_USED) && + -: 739: (CurrentAPState != LC_APSTATE_PERMOFF)) + -: 740: { + 528: 741: LC_OperData.ARTPtr[TableIndex].CurrentState = CmdPtr -> NewAPState; + -: 742: } + -: 743: } + -: 744: + -: 745: /* + -: 746: ** Set flag that we succeeded + -: 747: */ + 3: 748: CmdSuccess = TRUE; + -: 749: } + -: 750: else + -: 751: { + 9: 752: if ((CmdPtr -> APNumber) < LC_MAX_ACTIONPOINTS) + -: 753: { + 6: 754: TableIndex = CmdPtr -> APNumber; + 6: 755: CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState; + -: 756: + 9: 757: if ((CurrentAPState != LC_ACTION_NOT_USED) && + -: 758: (CurrentAPState != LC_APSTATE_PERMOFF)) + -: 759: { + -: 760: /* + -: 761: ** Update state for single actionpoint specified + -: 762: */ + 3: 763: LC_OperData.ARTPtr[TableIndex].CurrentState = CmdPtr -> NewAPState; + -: 764: + 3: 765: CmdSuccess = TRUE; + -: 766: } + -: 767: else + -: 768: { + -: 769: /* + -: 770: ** Actionpoints that are not used or set permanently + -: 771: ** off can only be changed by a table load + -: 772: */ + 6: 773: CFE_EVS_SendEvent(LC_APSTATE_CURR_ERR_EID, CFE_EVS_ERROR, + -: 774: "Set AP state error: AP = %d, Invalid current AP state = %d", + 3: 775: CmdPtr -> APNumber, CurrentAPState); + -: 776: + 3: 777: LC_AppData.CmdErrCount++; + -: 778: } + -: 779: } + -: 780: else + -: 781: { + -: 782: /* + -: 783: ** Actionpoint number is out of range + -: 784: ** (it's zero based, since it's a table index) + -: 785: */ + 3: 786: CFE_EVS_SendEvent(LC_APSTATE_APNUM_ERR_EID, CFE_EVS_ERROR, + -: 787: "Set AP state error: Invalid AP number = %d", + 3: 788: CmdPtr -> APNumber); + -: 789: + 3: 790: LC_AppData.CmdErrCount++; + -: 791: } + -: 792: } + -: 793: + -: 794: /* + -: 795: ** Update the command counter and send out event if command + -: 796: ** executed + -: 797: */ + 12: 798: if (CmdSuccess == TRUE) + -: 799: { + 6: 800: LC_AppData.CmdCount++; + -: 801: + 12: 802: CFE_EVS_SendEvent(LC_APSTATE_INF_EID, CFE_EVS_INFORMATION, + -: 803: "Set AP state command: AP = %d, New state = %d", + 12: 804: CmdPtr -> APNumber, CmdPtr -> NewAPState); + -: 805: } + -: 806: + -: 807: } /* end ValidState if */ + -: 808: + -: 809: } /* end LC_VerifyMsgLength if */ + -: 810: + 14: 811: return; + -: 812: + -: 813:} /* end LC_SetAPStateCmd */ + -: 814: + -: 815:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 816:/* */ + -: 817:/* Set actionpoint permanently off command */ + -: 818:/* */ + -: 819:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 5: 820:void LC_SetAPPermOffCmd(CFE_SB_MsgPtr_t MessagePtr) + -: 821:{ + 5: 822: uint16 ExpectedLength = sizeof(LC_SetAPPermOff_t); + -: 823: LC_SetAPPermOff_t *CmdPtr; + -: 824: uint32 TableIndex; + -: 825: uint8 CurrentAPState; + -: 826: + -: 827: /* + -: 828: ** Verify message packet length + -: 829: */ + 5: 830: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) + -: 831: { + 5: 832: CmdPtr = ((LC_SetAPPermOff_t *)MessagePtr); + -: 833: + 11: 834: if (((CmdPtr -> APNumber) == LC_ALL_ACTIONPOINTS) || + 4: 835: ((CmdPtr -> APNumber) >= LC_MAX_ACTIONPOINTS)) + -: 836: { + -: 837: /* + -: 838: ** Invalid actionpoint number + -: 839: ** (This command can't be invoked for all actionpoints) + -: 840: */ + 2: 841: CFE_EVS_SendEvent(LC_APOFF_APNUM_ERR_EID, CFE_EVS_ERROR, + -: 842: "Set AP perm off error: Invalid AP number = %d", + 2: 843: CmdPtr -> APNumber); + -: 844: + 2: 845: LC_AppData.CmdErrCount++; + -: 846: + -: 847: } + -: 848: else + -: 849: { + 3: 850: TableIndex = CmdPtr -> APNumber; + 3: 851: CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState; + -: 852: + 3: 853: if (CurrentAPState != LC_APSTATE_DISABLED) + -: 854: { + -: 855: /* + -: 856: ** Actionpoints can only be turned permanently off if + -: 857: ** they are currently disabled + -: 858: */ + 4: 859: CFE_EVS_SendEvent(LC_APOFF_CURR_ERR_EID, CFE_EVS_ERROR, + -: 860: "Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d", + 2: 861: CmdPtr -> APNumber, CurrentAPState); + -: 862: + 2: 863: LC_AppData.CmdErrCount++; + -: 864: } + -: 865: else + -: 866: { + -: 867: /* + -: 868: ** Update state for actionpoint specified + -: 869: */ + 1: 870: LC_OperData.ARTPtr[TableIndex].CurrentState = LC_APSTATE_PERMOFF; + -: 871: + 1: 872: LC_AppData.CmdCount++; + -: 873: + 1: 874: CFE_EVS_SendEvent(LC_APOFF_INF_EID, CFE_EVS_INFORMATION, + -: 875: "Set AP permanently off command: AP = %d", + 1: 876: CmdPtr -> APNumber); + -: 877: } + -: 878: + -: 879: } /* end CmdPtr -> APNumber else */ + -: 880: + -: 881: } /* end LC_VerifyMsgLength if */ + -: 882: + 5: 883: return; + -: 884: + -: 885:} /* end LC_SetAPPermOffCmd */ + -: 886: + -: 887:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 888:/* */ + -: 889:/* Reset actionpoint statistics command */ + -: 890:/* */ + -: 891:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 4: 892:void LC_ResetAPStatsCmd(CFE_SB_MsgPtr_t MessagePtr) + -: 893:{ + 4: 894: uint16 ExpectedLength = sizeof(LC_ResetAPStats_t); + 4: 895: LC_ResetAPStats_t *CmdPtr = (LC_ResetAPStats_t *) MessagePtr; + 4: 896: boolean CmdSuccess = FALSE; + -: 897: + -: 898: /* verify message packet length */ + 4: 899: if (LC_VerifyMsgLength(MessagePtr, ExpectedLength)) + -: 900: { + -: 901: /* arg may be one or all AP's */ + 4: 902: if (CmdPtr->APNumber == LC_ALL_ACTIONPOINTS) + -: 903: { + 1: 904: LC_ResetResultsAP(0, LC_MAX_ACTIONPOINTS - 1, TRUE); + 1: 905: CmdSuccess = TRUE; + -: 906: } + 3: 907: else if (CmdPtr->APNumber < LC_MAX_ACTIONPOINTS) + -: 908: { + 2: 909: LC_ResetResultsAP(CmdPtr->APNumber, CmdPtr->APNumber, TRUE); + 2: 910: CmdSuccess = TRUE; + -: 911: } + -: 912: else + -: 913: { + -: 914: /* arg is out of range (zero based table index) */ + 1: 915: LC_AppData.CmdErrCount++; + -: 916: + 1: 917: CFE_EVS_SendEvent(LC_APSTATS_APNUM_ERR_EID, CFE_EVS_ERROR, + 1: 918: "Reset AP stats error: invalid AP number = %d", CmdPtr->APNumber); + -: 919: } + -: 920: + 4: 921: if (CmdSuccess == TRUE) + -: 922: { + 3: 923: LC_AppData.CmdCount++; + -: 924: + 3: 925: CFE_EVS_SendEvent(LC_APSTATS_INF_EID, CFE_EVS_INFORMATION, + 3: 926: "Reset AP stats command: AP = %d", CmdPtr->APNumber); + -: 927: } + -: 928: } + -: 929: + 4: 930: return; + -: 931: + -: 932:} /* end LC_ResetAPStatsCmd */ + -: 933: + -: 934:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 935:/* */ + -: 936:/* Reset selected AP statistics (utility function) */ + -: 937:/* */ + -: 938:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 11: 939:void LC_ResetResultsAP(uint32 StartIndex, uint32 EndIndex, boolean ResetStatsCmd) + -: 940:{ + -: 941: uint32 TableIndex; + -: 942: + -: 943: /* reset selected entries in actionpoint results table */ + 1427: 944: for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++) + -: 945: { + 1416: 946: if (!ResetStatsCmd) + -: 947: { + -: 948: /* reset AP stats command does not modify AP state or most recent test result */ + 1238: 949: LC_OperData.ARTPtr[TableIndex].ActionResult = LC_ACTION_STALE; + 1238: 950: LC_OperData.ARTPtr[TableIndex].CurrentState = LC_OperData.ADTPtr[TableIndex].DefaultState; + -: 951: } + -: 952: + 1416: 953: LC_OperData.ARTPtr[TableIndex].PassiveAPCount = 0; + 1416: 954: LC_OperData.ARTPtr[TableIndex].FailToPassCount = 0; + 1416: 955: LC_OperData.ARTPtr[TableIndex].PassToFailCount = 0; + -: 956: + 1416: 957: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount = 0; + 1416: 958: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount = 0; + 1416: 959: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount = 0; + -: 960: } + -: 961: + 11: 962: return; + -: 963: + -: 964:} /* end LC_ResetResultsAP */ + -: 965: + -: 966:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 967:/* */ + -: 968:/* Reset watchpoint statistics command */ + -: 969:/* */ + -: 970:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 4: 971:void LC_ResetWPStatsCmd(CFE_SB_MsgPtr_t MessagePtr) + -: 972:{ + 4: 973: uint16 ExpectedLength = sizeof(LC_ResetWPStats_t); + 4: 974: LC_ResetWPStats_t *CmdPtr = (LC_ResetWPStats_t *) MessagePtr; + 4: 975: boolean CmdSuccess = FALSE; + -: 976: + -: 977: /* verify message packet length */ + 4: 978: if (LC_VerifyMsgLength(MessagePtr, ExpectedLength)) + -: 979: { + -: 980: /* arg may be one or all WP's */ + 4: 981: if (CmdPtr->WPNumber == LC_ALL_WATCHPOINTS) + -: 982: { + 1: 983: LC_ResetResultsWP(0, LC_MAX_WATCHPOINTS - 1, TRUE); + 1: 984: CmdSuccess = TRUE; + -: 985: } + 3: 986: else if (CmdPtr->WPNumber < LC_MAX_WATCHPOINTS) + -: 987: { + 2: 988: LC_ResetResultsWP(CmdPtr->WPNumber, CmdPtr->WPNumber, TRUE); + 2: 989: CmdSuccess = TRUE; + -: 990: } + -: 991: else + -: 992: { + -: 993: /* arg is out of range (zero based table index) */ + 1: 994: LC_AppData.CmdErrCount++; + -: 995: + 1: 996: CFE_EVS_SendEvent(LC_WPSTATS_WPNUM_ERR_EID, CFE_EVS_ERROR, + 1: 997: "Reset WP stats error: invalid WP number = %d", CmdPtr->WPNumber); + -: 998: } + -: 999: + 4: 1000: if (CmdSuccess == TRUE) + -: 1001: { + 3: 1002: LC_AppData.CmdCount++; + -: 1003: + 3: 1004: CFE_EVS_SendEvent(LC_WPSTATS_INF_EID, CFE_EVS_INFORMATION, + 3: 1005: "Reset WP stats command: WP = %d", CmdPtr->WPNumber); + -: 1006: } + -: 1007: } + -: 1008: + 4: 1009: return; + -: 1010: + -: 1011:} /* end LC_ResetWPStatsCmd */ + -: 1012: + -: 1013:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 1014:/* */ + -: 1015:/* Reset selected WP statistics (utility function) */ + -: 1016:/* */ + -: 1017:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 12: 1018:void LC_ResetResultsWP(uint32 StartIndex, uint32 EndIndex, boolean ResetStatsCmd) + -: 1019:{ + -: 1020: uint32 TableIndex; + -: 1021: + -: 1022: /* reset selected entries in watchoint results table */ + 1604: 1023: for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++) + -: 1024: { + 1592: 1025: if (!ResetStatsCmd) + -: 1026: { + -: 1027: /* reset WP stats command does not modify most recent test result */ + 1414: 1028: LC_OperData.WRTPtr[TableIndex].WatchResult = LC_WATCH_STALE; + 1414: 1029: LC_OperData.WRTPtr[TableIndex].CountdownToStale = 0; + -: 1030: } + -: 1031: + 1592: 1032: LC_OperData.WRTPtr[TableIndex].EvaluationCount = 0; + 1592: 1033: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount = 0; + 1592: 1034: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount = 0; + 1592: 1035: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount = 0; + -: 1036: + 1592: 1037: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value = 0; + 1592: 1038: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds = 0; + 1592: 1039: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds = 0; + -: 1040: + 1592: 1041: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value = 0; + 1592: 1042: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds = 0; + 1592: 1043: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds = 0; + -: 1044: } + -: 1045: + 12: 1046: return; + -: 1047: + -: 1048:} /* end LC_ResetResultsWP */ + -: 1049: + -: 1050:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 1051:/* */ + -: 1052:/* Verify message packet length */ + -: 1053:/* */ + -: 1054:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 56: 1055:boolean LC_VerifyMsgLength(CFE_SB_MsgPtr_t msg, + -: 1056: uint16 ExpectedLength) + -: 1057:{ + 56: 1058: boolean result = TRUE; + -: 1059: uint16 CommandCode; + -: 1060: uint16 ActualLength; + -: 1061: CFE_SB_MsgId_t MessageID; + -: 1062: + -: 1063: /* + -: 1064: ** Verify the message packet length... + -: 1065: */ + 56: 1066: ActualLength = CFE_SB_GetTotalMsgLength(msg); + 56: 1067: if (ExpectedLength != ActualLength) + -: 1068: { + 5: 1069: MessageID = CFE_SB_GetMsgId(msg); + 5: 1070: CommandCode = CFE_SB_GetCmdCode(msg); + -: 1071: + 5: 1072: if (MessageID == LC_SEND_HK_MID) + -: 1073: { + -: 1074: /* + -: 1075: ** For a bad HK request, just send the event. We only increment + -: 1076: ** the error counter for ground commands and not internal messages. + -: 1077: */ + 2: 1078: CFE_EVS_SendEvent(LC_HKREQ_LEN_ERR_EID, CFE_EVS_ERROR, + -: 1079: "Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d", + -: 1080: MessageID, CommandCode, ActualLength, ExpectedLength); + -: 1081: } + 3: 1082: else if (MessageID == LC_SAMPLE_AP_MID) + -: 1083: { + -: 1084: /* + -: 1085: ** Same thing as previous for a bad actionpoint sample request + -: 1086: */ + 2: 1087: CFE_EVS_SendEvent(LC_APSAMPLE_LEN_ERR_EID, CFE_EVS_ERROR, + -: 1088: "Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d", + -: 1089: MessageID, CommandCode, ActualLength, ExpectedLength); + -: 1090: } + -: 1091: else + -: 1092: { + -: 1093: /* + -: 1094: ** All other cases, increment error counter + -: 1095: */ + 1: 1096: CFE_EVS_SendEvent(LC_LEN_ERR_EID, CFE_EVS_ERROR, + -: 1097: "Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d", + -: 1098: MessageID, CommandCode, ActualLength, ExpectedLength); + 1: 1099: LC_AppData.CmdErrCount++; + -: 1100: } + -: 1101: + 5: 1102: result = FALSE; + -: 1103: } + -: 1104: + 56: 1105: return(result); + -: 1106: + -: 1107:} /* End of LC_VerifyMsgLength */ + -: 1108: + -: 1109: + -: 1110:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 1111:/* */ + -: 1112:/* Manage tables - chance to be dumped, reloaded, etc. */ + -: 1113:/* */ + -: 1114:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 1115: + 17: 1116:int32 LC_ManageTables(void) + -: 1117:{ + -: 1118: int32 Result; + -: 1119: + -: 1120: /* + -: 1121: ** It is not necessary to release dump only table pointers before + -: 1122: ** calling cFE Table Services to manage the table + -: 1123: */ + 17: 1124: CFE_TBL_Manage(LC_OperData.WRTHandle); + 17: 1125: CFE_TBL_Manage(LC_OperData.ARTHandle); + -: 1126: + -: 1127: /* + -: 1128: ** Must release loadable table pointers before allowing updates + -: 1129: */ + 17: 1130: CFE_TBL_ReleaseAddress(LC_OperData.WDTHandle); + 17: 1131: CFE_TBL_ReleaseAddress(LC_OperData.ADTHandle); + -: 1132: + 17: 1133: CFE_TBL_Manage(LC_OperData.WDTHandle); + 17: 1134: CFE_TBL_Manage(LC_OperData.ADTHandle); + -: 1135: + -: 1136: /* + -: 1137: ** Re-acquire the pointers and check for new table data + -: 1138: */ + 17: 1139: Result = CFE_TBL_GetAddress((void *)&LC_OperData.WDTPtr, LC_OperData.WDTHandle); + -: 1140: + 17: 1141: if (Result == CFE_TBL_INFO_UPDATED) + -: 1142: { + -: 1143: /* + -: 1144: ** Clear watchpoint results for previous table + -: 1145: */ + 2: 1146: LC_ResetResultsWP(0, LC_MAX_WATCHPOINTS - 1, FALSE); + -: 1147: + -: 1148: /* + -: 1149: ** Create watchpoint hash tables -- also subscribes to watchpoint packets + -: 1150: */ + 2: 1151: LC_CreateHashTable(); + -: 1152: } + 15: 1153: else if (Result != CFE_SUCCESS) + -: 1154: { + 2: 1155: CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, + -: 1156: "Error getting WDT address, RC=0x%08X", (unsigned int)Result); + 2: 1157: return(Result); + -: 1158: } + -: 1159: + 15: 1160: Result = CFE_TBL_GetAddress((void *)&LC_OperData.ADTPtr, LC_OperData.ADTHandle); + -: 1161: + 15: 1162: if (Result == CFE_TBL_INFO_UPDATED) + -: 1163: { + -: 1164: /* + -: 1165: ** Clear actionpoint results for previous table + -: 1166: */ + 1: 1167: LC_ResetResultsAP(0, LC_MAX_ACTIONPOINTS - 1, FALSE); + -: 1168: } + 14: 1169: else if (Result != CFE_SUCCESS) + -: 1170: { + 1: 1171: CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, + -: 1172: "Error getting ADT address, RC=0x%08X", (unsigned int)Result); + 1: 1173: return(Result); + -: 1174: } + -: 1175: + 14: 1176: return(CFE_SUCCESS); + -: 1177: + -: 1178:} /* LC_ManageTables() */ + -: 1179: + -: 1180: + -: 1181:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 1182:/* */ + -: 1183:/* Update Critical Data Store (CDS) */ + -: 1184:/* */ + -: 1185:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 1186: + 8: 1187:int32 LC_UpdateTaskCDS(void) + -: 1188:{ + -: 1189: int32 Result; + -: 1190: + -: 1191: /* + -: 1192: ** Copy the watchpoint results table (WRT) data to CDS + -: 1193: */ + 8: 1194: Result = CFE_ES_CopyToCDS(LC_OperData.WRTDataCDSHandle, LC_OperData.WRTPtr); + -: 1195: + 8: 1196: if (Result != CFE_SUCCESS) + -: 1197: { + 3: 1198: CFE_EVS_SendEvent(LC_WRT_NO_SAVE_ERR_EID, CFE_EVS_ERROR, + -: 1199: "Unable to update watchpoint results in CDS, RC=0x%08X", (unsigned int)Result); + 3: 1200: return(Result); + -: 1201: } + -: 1202: + -: 1203: /* + -: 1204: ** Copy the actionpoint results table (ART) data to CDS + -: 1205: */ + 5: 1206: Result = CFE_ES_CopyToCDS(LC_OperData.ARTDataCDSHandle, LC_OperData.ARTPtr); + -: 1207: + 5: 1208: if (Result != CFE_SUCCESS) + -: 1209: { + 1: 1210: CFE_EVS_SendEvent(LC_ART_NO_SAVE_ERR_EID, CFE_EVS_ERROR, + -: 1211: "Unable to update actionpoint results in CDS, RC=0x%08X", (unsigned int)Result); + 1: 1212: return(Result); + -: 1213: } + -: 1214: + -: 1215: /* + -: 1216: ** Set the "data has been saved" indicator + -: 1217: */ + 4: 1218: LC_AppData.CDSSavedOnExit = LC_CDS_SAVED; + -: 1219: + -: 1220: /* + -: 1221: ** Copy the global application data structure to CDS + -: 1222: */ + 4: 1223: Result = CFE_ES_CopyToCDS(LC_OperData.AppDataCDSHandle, &LC_AppData); + -: 1224: + 4: 1225: if (Result != CFE_SUCCESS) + -: 1226: { + 1: 1227: CFE_EVS_SendEvent(LC_APP_NO_SAVE_START_ERR_EID, CFE_EVS_ERROR, + -: 1228: "Unable to update application data in CDS, RC=0x%08X", (unsigned int)Result); + 1: 1229: return(Result); + -: 1230: } + -: 1231: + 3: 1232: return(CFE_SUCCESS); + -: 1233: + -: 1234:} /* LC_UpdateTaskCDS() */ + -: 1235: + -: 1236: + -: 1237:/************************/ + -: 1238:/* End of File Comment */ + -: 1239:/************************/ diff --git a/fsw/unit_test/lc_cmds_test.c b/fsw/unit_test/lc_cmds_test.c new file mode 100644 index 0000000..e975554 --- /dev/null +++ b/fsw/unit_test/lc_cmds_test.c @@ -0,0 +1,2130 @@ + /************************************************************************* + ** File: + ** $Id: lc_cmds_test.c 1.6 2017/05/07 23:59:04EDT mdeschu Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains unit test cases for the functions contained in the file lc_cmds.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "lc_cmds_test.h" +#include "lc_cmds.h" +#include "lc_app.h" +#include "lc_msg.h" +#include "lc_msgdefs.h" +#include "lc_msgids.h" +#include "lc_events.h" +#include "lc_version.h" +#include "lc_test_utils.h" +#include "ut_osapi_stubs.h" +#include "ut_cfe_sb_stubs.h" +#include "ut_cfe_es_stubs.h" +#include "ut_cfe_es_hooks.h" +#include "ut_cfe_evs_stubs.h" +#include "ut_cfe_evs_hooks.h" +#include "ut_cfe_time_stubs.h" +#include "ut_cfe_psp_memutils_stubs.h" +#include "ut_cfe_psp_watchdog_stubs.h" +#include "ut_cfe_psp_timer_stubs.h" +#include "ut_cfe_tbl_stubs.h" +#include "ut_cfe_fs_stubs.h" +#include "ut_cfe_time_stubs.h" +#include +#include +#include + +/* + * Function Definitions + */ + +uint16 LC_CMDS_TEST_CFE_TBL_GetAddressHookCount; +int32 LC_CMDS_TEST_CFE_TBL_GetAddressHook(void **TblPtr, CFE_TBL_Handle_t TblHandle) +{ + LC_CMDS_TEST_CFE_TBL_GetAddressHookCount++; + + if (LC_CMDS_TEST_CFE_TBL_GetAddressHookCount == 1) + return CFE_TBL_INFO_UPDATED; + else + return -1; +} + +void LC_AppPipe_Test_SampleAPRequest(void) +{ + int32 Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg (&CmdPacket, LC_SAMPLE_AP_MID, 1, TRUE); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_AppPipe_Test_SampleAPRequest */ + +void LC_AppPipe_Test_HousekeepingRequest(void) +{ + int32 Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg (&CmdPacket, LC_SEND_HK_MID, 1, TRUE); + + /* Set to prevent unintended error messages in subfunctions */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_AppPipe_Test_HousekeepingRequest */ + +void LC_AppPipe_Test_Noop(void) +{ + int32 Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_NoArgsCmd_t), TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_NOOP_CC); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + /* Note: this event message is generated in a subfunction, but is tested anyway to verify that the correct code path has been reached */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_NOOP_INF_EID, CFE_EVS_INFORMATION, "No-op command: Version 2.1.0.0"), + "No-op command: Version 2.1.0.0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_AppPipe_Test_Noop */ + +void LC_AppPipe_Test_Reset(void) +{ + int32 Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_NoArgsCmd_t), TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_RESET_CC); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + /* Note: this event message is generated in a subfunction, but is tested anyway to verify that the correct code path has been reached */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_RESET_DBG_EID, CFE_EVS_DEBUG, "Reset counters command"), + "Reset counters command"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_AppPipe_Test_Reset */ + +void LC_AppPipe_Test_SetLCState(void) +{ + int32 Result; + LC_SetLCState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SET_LC_STATE_CC); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_AppPipe_Test_SetLCState */ + +void LC_AppPipe_Test_SetAPState(void) +{ + int32 Result; + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SET_AP_STATE_CC); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_AppPipe_Test_SetAPState */ + +void LC_AppPipe_Test_SetAPPermoff(void) +{ + int32 Result; + LC_SetAPPermOff_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPPermOff_t), TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SET_AP_PERMOFF_CC); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_AppPipe_Test_SetAPPermoff */ + +void LC_AppPipe_Test_ResetAPStats(void) +{ + int32 Result; + LC_ResetAPStats_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_ResetAPStats_t), TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_RESET_AP_STATS_CC); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_AppPipe_Test_ResetAPStats */ + +void LC_AppPipe_Test_ResetWPStats(void) +{ + int32 Result; + LC_SetAPPermOff_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_ResetWPStats_t), TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_RESET_WP_STATS_CC); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_AppPipe_Test_ResetWPStats */ + +void LC_AppPipe_Test_InvalidCommandCode(void) +{ + int32 Result; + LC_SetAPPermOff_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, 1, TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), 99); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_CC_ERR_EID, CFE_EVS_ERROR, "Invalid command code: ID = 0x18A4, CC = 99"), + "Invalid command code: ID = 0x18A4, CC = 99"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_AppPipe_Test_InvalidCommandCode */ + +void LC_AppPipe_Test_MonitorPacket(void) +{ + int32 Result; + LC_SetAPPermOff_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 99, 1, TRUE); + + /* Execute the function being tested */ + Result = LC_AppPipe((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_AppPipe_Test_MonitorPacket */ + +void LC_SampleAPReq_Test_AllowSampleAllWatchStale(void) +{ + LC_SampleAP_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SAMPLE_AP_MID, sizeof(LC_SampleAP_t), TRUE); + + LC_AppData.CurrentLCState = 99; + CmdPacket.StartIndex = CmdPacket.EndIndex = LC_ALL_ACTIONPOINTS; + CmdPacket.UpdateAge = 1; + LC_OperData.WRTPtr[0].CountdownToStale = 1; + + /* Execute the function being tested */ + LC_SampleAPReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE, "LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SampleAPReq_Test_AllowSampleAllWatchStale */ + +void LC_SampleAPReq_Test_StartLessOrEqualToEndAndEndWithinArrayWatchStale(void) +{ + LC_SampleAP_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SAMPLE_AP_MID, sizeof(LC_SampleAP_t), TRUE); + + LC_AppData.CurrentLCState = 99; + CmdPacket.StartIndex = CmdPacket.EndIndex = LC_MAX_ACTIONPOINTS - 1; + CmdPacket.UpdateAge = 1; + LC_OperData.WRTPtr[0].CountdownToStale = 1; + + /* Execute the function being tested */ + LC_SampleAPReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE, "LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SampleAPReq_Test_StartLessOrEqualToEndAndEndWithinArrayWatchStale */ + +void LC_SampleAPReq_Test_ArrayIndexOutOfRange(void) +{ + LC_SampleAP_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SAMPLE_AP_MID, sizeof(LC_SampleAP_t), TRUE); + + LC_AppData.CurrentLCState = 99; + CmdPacket.StartIndex = 2; + CmdPacket.EndIndex = 1; + + /* Execute the function being tested */ + LC_SampleAPReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSAMPLE_APNUM_ERR_EID, CFE_EVS_ERROR, "Sample AP error: invalid AP number, start = 2, end = 1"), + "Sample AP error: invalid AP number, start = 2, end = 1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SampleAPReq_Test_ArrayIndexOutOfRange */ + +void LC_HousekeepingReq_Test_WatchStale(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++) + { + LC_OperData.WRTPtr[TableIndex].WatchResult = LC_WATCH_STALE; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKWR_STALE << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKWR_STALE << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKWR_STALE << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKWR_STALE); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_WATCHPOINTS/2) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_WATCHPOINTS - 1) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_WatchStale */ + +void LC_HousekeepingReq_Test_WatchFalse(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++) + { + LC_OperData.WRTPtr[TableIndex].WatchResult = LC_WATCH_FALSE; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKWR_FALSE << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKWR_FALSE << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKWR_FALSE << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKWR_FALSE); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_WATCHPOINTS/2) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_WATCHPOINTS - 1) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_WatchFalse */ + +void LC_HousekeepingReq_Test_WatchTrue(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++) + { + LC_OperData.WRTPtr[TableIndex].WatchResult = LC_WATCH_TRUE; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKWR_TRUE << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKWR_TRUE << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKWR_TRUE << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKWR_TRUE); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_WATCHPOINTS/2) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_WATCHPOINTS - 1) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_WatchTrue */ + +void LC_HousekeepingReq_Test_WatchError(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++) + { + LC_OperData.WRTPtr[TableIndex].WatchResult = LC_WATCH_ERROR; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKWR_ERROR << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKWR_ERROR << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKWR_ERROR << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKWR_ERROR); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_WATCHPOINTS/2) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_WATCHPOINTS - 1) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_WatchError */ + +void LC_HousekeepingReq_Test_DefaultWatchResult(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++) + { + LC_OperData.WRTPtr[TableIndex].WatchResult = 99; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKWR_ERROR << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKWR_ERROR << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKWR_ERROR << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKWR_ERROR); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_WATCHPOINTS/2) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_WATCHPOINTS - 1) / 4; + UtAssert_True (LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_DefaultWatchResult */ + +void LC_HousekeepingReq_Test_ActionNotUsedStale(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].CurrentState = LC_ACTION_NOT_USED; + LC_OperData.ARTPtr[TableIndex].ActionResult = LC_ACTION_STALE; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKAR_STATE_NOT_USED << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKAR_STALE << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKAR_STATE_NOT_USED << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKAR_STALE); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_ACTIONPOINTS/2) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_ACTIONPOINTS - 1) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_ActionNotUsedStale */ + +void LC_HousekeepingReq_Test_APStateActiveActionPass(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].CurrentState = LC_APSTATE_ACTIVE; + LC_OperData.ARTPtr[TableIndex].ActionResult = LC_ACTION_PASS; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKAR_STATE_ACTIVE << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKAR_PASS << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKAR_STATE_ACTIVE << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKAR_PASS); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_ACTIONPOINTS/2) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_ACTIONPOINTS - 1) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (LC_OperData.HkPacket.ActiveAPs = LC_MAX_ACTIONPOINTS, "LC_OperData.HkPacket.ActiveAPs = LC_MAX_ACTIONPOINTS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_APStateActiveActionPass */ + +void LC_HousekeepingReq_Test_APStatePassiveActionFail(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].CurrentState = LC_APSTATE_PASSIVE; + LC_OperData.ARTPtr[TableIndex].ActionResult = LC_ACTION_FAIL; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKAR_STATE_PASSIVE << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKAR_FAIL << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKAR_STATE_PASSIVE << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKAR_FAIL); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_ACTIONPOINTS/2) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_ACTIONPOINTS - 1) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_APStatePassiveActionFail */ + +void LC_HousekeepingReq_Test_APStateDisabledActionError(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].CurrentState = LC_APSTATE_DISABLED; + LC_OperData.ARTPtr[TableIndex].ActionResult = LC_ACTION_ERROR; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKAR_STATE_DISABLED << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKAR_ERROR << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKAR_STATE_DISABLED << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKAR_ERROR); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_ACTIONPOINTS/2) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_ACTIONPOINTS - 1) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_APStateDisabledActionError */ + +void LC_HousekeepingReq_Test_APStatePermOffActionError(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].CurrentState = LC_APSTATE_PERMOFF; + LC_OperData.ARTPtr[TableIndex].ActionResult = LC_ACTION_ERROR; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKAR_STATE_NOT_USED << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKAR_ERROR << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKAR_STATE_NOT_USED << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKAR_ERROR); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_ACTIONPOINTS/2) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_ACTIONPOINTS - 1) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_APStatePermOffActionError */ + +void LC_HousekeepingReq_Test_DefaultCurrentStateAndActionResult(void) +{ + int32 Result; + uint16 TableIndex; + uint16 HKIndex; + uint8 ExpectedByteData; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].CurrentState = 99; + LC_OperData.ARTPtr[TableIndex].ActionResult = 99; + } + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + ExpectedByteData = LC_HKAR_STATE_NOT_USED << 6; + ExpectedByteData = (ExpectedByteData | (LC_HKAR_ERROR << 4)); + ExpectedByteData = (ExpectedByteData | (LC_HKAR_STATE_NOT_USED << 2)); + ExpectedByteData = (ExpectedByteData | LC_HKAR_ERROR); + + /* Checks for first index: */ + HKIndex = 0; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for middle index: */ + HKIndex = (LC_MAX_ACTIONPOINTS/2) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + /* Checks for last index: */ + HKIndex = (LC_MAX_ACTIONPOINTS - 1) / 2; + UtAssert_True (LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData, "LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_HousekeepingReq_Test_DefaultCurrentStateAndActionResult */ + +void LC_HousekeepingReq_Test_ManageTablesError(void) +{ + int32 Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + /* Set to satisfy condition "(Result = LC_ManageTables()) != CFE_SUCCESS" */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, -1, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == -1, "Result == -1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_HousekeepingReq_Test_ManageTablesError */ + +void LC_HousekeepingReq_Test_UpdateTaskCDSNotSuccess(void) +{ + int32 Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.HaveActiveCDS = TRUE; + + /* Set to prevent an unintended error message in subfunction LC_ManageTables */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_SUCCESS, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Set to satisfy condition "LC_UpdateTaskCDS() != CFE_SUCCESS" */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_COPYTOCDS_INDEX, -1, 1); + Ut_CFE_ES_ContinueReturnCodeAfterCountZero(UT_CFE_ES_COPYTOCDS_INDEX); + + /* Execute the function being tested */ + Result = LC_HousekeepingReq((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + UtAssert_True (LC_OperData.HaveActiveCDS == FALSE, "LC_OperData.HaveActiveCDS == FALSE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_HousekeepingReq_Test_UpdateTaskCDSNotSuccess */ + +void LC_ResetCounters_Test(void) +{ + LC_AppData.CmdCount = 1; + LC_AppData.CmdErrCount = 2; + + LC_AppData.APSampleCount = 3; + LC_AppData.MonitoredMsgCount = 4; + LC_AppData.RTSExecCount = 5; + LC_AppData.PassiveRTSExecCount = 6; + + /* Execute the function being tested */ + LC_ResetCounters(); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdCount == 0, "LC_AppData.CmdCount == 0"); + UtAssert_True (LC_AppData.CmdErrCount == 0, "LC_AppData.CmdErrCount == 0"); + UtAssert_True (LC_AppData.APSampleCount == 0, "LC_AppData.APSampleCount == 0"); + UtAssert_True (LC_AppData.MonitoredMsgCount == 0, "LC_AppData.MonitoredMsgCount == 0"); + UtAssert_True (LC_AppData.RTSExecCount == 0, "LC_AppData.RTSExecCount == 0"); + UtAssert_True (LC_AppData.PassiveRTSExecCount == 0, "LC_AppData.PassiveRTSExecCount == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ResetCounters_Test */ + +void LC_SetLCStateCmd_Test_Active(void) +{ + LC_SetLCState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); + + CmdPacket.NewLCState = LC_STATE_ACTIVE; + + /* Execute the function being tested */ + LC_SetLCStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CurrentLCState == LC_STATE_ACTIVE, "LC_AppData.CurrentLCState == LC_STATE_ACTIVE"); + UtAssert_True (LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_LCSTATE_INF_EID, CFE_EVS_INFORMATION, "Set LC state command: new state = 1"), + "Set LC state command: new state = 1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetLCStateCmd_Test_Active */ + +void LC_SetLCStateCmd_Test_Passive(void) +{ + LC_SetLCState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); + + CmdPacket.NewLCState = LC_STATE_PASSIVE; + + /* Execute the function being tested */ + LC_SetLCStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CurrentLCState == LC_STATE_PASSIVE, "LC_AppData.CurrentLCState == LC_STATE_PASSIVE"); + UtAssert_True (LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_LCSTATE_INF_EID, CFE_EVS_INFORMATION, "Set LC state command: new state = 2"), + "Set LC state command: new state = 2"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetLCStateCmd_Test_Passive */ + +void LC_SetLCStateCmd_Test_Disabled(void) +{ + LC_SetLCState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); + + CmdPacket.NewLCState = LC_STATE_DISABLED; + + /* Execute the function being tested */ + LC_SetLCStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CurrentLCState == LC_STATE_DISABLED, "LC_AppData.CurrentLCState == LC_STATE_DISABLED"); + UtAssert_True (LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_LCSTATE_INF_EID, CFE_EVS_INFORMATION, "Set LC state command: new state = 3"), + "Set LC state command: new state = 3"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetLCStateCmd_Test_Disabled */ + +void LC_SetLCStateCmd_Test_Default(void) +{ + LC_SetLCState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); + + CmdPacket.NewLCState = 99; + + /* Execute the function being tested */ + LC_SetLCStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_LCSTATE_ERR_EID, CFE_EVS_ERROR, "Set LC state error: invalid state = 99"), + "Set LC state error: invalid state = 99"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetLCStateCmd_Test_Default */ + +void LC_SetAPStateCmd_Test_Default(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); + + CmdPacket.APNumber = 1; + CmdPacket.NewAPState = 99; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_NEW_ERR_EID, CFE_EVS_ERROR, "Set AP state error: AP = 1, Invalid new state = 99"), + "Set AP state error: AP = 1, Invalid new state = 99"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_Default */ + +void LC_SetAPStateCmd_Test_SetAllActionPointsActive(void) +{ + LC_SetAPState_t CmdPacket; + uint16 TableIndex; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_ACTIVE; + CmdPacket.APNumber = LC_ALL_ACTIONPOINTS; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].CurrentState = 99; + } + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + + /* Checks for first index: */ + TableIndex = 0; + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE, "LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE"); + + /* Checks for middle index: */ + TableIndex = LC_MAX_ACTIONPOINTS/2; + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE, "LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE"); + + /* Checks for last index: */ + TableIndex = LC_MAX_ACTIONPOINTS - 1; + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE, "LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_INF_EID, CFE_EVS_INFORMATION, "Set AP state command: AP = 65535, New state = 1"), + "Set AP state command: AP = 65535, New state = 1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_SetAllActionPointsActive */ + +void LC_SetAPStateCmd_Test_SetAllActionPointsPassive(void) +{ + LC_SetAPState_t CmdPacket; + uint16 TableIndex; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_PASSIVE; + CmdPacket.APNumber = LC_ALL_ACTIONPOINTS; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].CurrentState = 99; + } + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + + /* Checks for first index: */ + TableIndex = 0; + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE, "LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE"); + + /* Checks for middle index: */ + TableIndex = LC_MAX_ACTIONPOINTS/2; + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE, "LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE"); + + /* Checks for last index: */ + TableIndex = LC_MAX_ACTIONPOINTS - 1; + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE, "LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_INF_EID, CFE_EVS_INFORMATION, "Set AP state command: AP = 65535, New state = 2"), + "Set AP state command: AP = 65535, New state = 2"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_SetAllActionPointsPassive */ + +void LC_SetAPStateCmd_Test_SetAllActionPointsDisabled(void) +{ + LC_SetAPState_t CmdPacket; + uint16 TableIndex; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_DISABLED; + CmdPacket.APNumber = LC_ALL_ACTIONPOINTS; + + for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].CurrentState = 99; + } + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + + /* Checks for first index: */ + TableIndex = 0; + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED, "LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED"); + + /* Checks for middle index: */ + TableIndex = LC_MAX_ACTIONPOINTS/2; + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED, "LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED"); + + /* Checks for last index: */ + TableIndex = LC_MAX_ACTIONPOINTS - 1; + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED, "LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_INF_EID, CFE_EVS_INFORMATION, "Set AP state command: AP = 65535, New state = 3"), + "Set AP state command: AP = 65535, New state = 3"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_SetAllActionPointsDisabled */ + +void LC_SetAPStateCmd_Test_UpdateSingleActionPointActive(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_ACTIVE; + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS - 1; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = 99; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_ACTIVE, "LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_ACTIVE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_INF_EID, CFE_EVS_INFORMATION, "Set AP state command: AP = 175, New state = 1"), + "Set AP state command: AP = 175, New state = 1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_UpdateSingleActionPointActive */ + +void LC_SetAPStateCmd_Test_UpdateSingleActionPointPassive(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_PASSIVE; + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS - 1; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = 99; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_PASSIVE, "LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_PASSIVE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_INF_EID, CFE_EVS_INFORMATION, "Set AP state command: AP = 175, New state = 2"), + "Set AP state command: AP = 175, New state = 2"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_UpdateSingleActionPointPassive */ + +void LC_SetAPStateCmd_Test_UpdateSingleActionPointDisabled(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_DISABLED; + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS - 1; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = 99; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_DISABLED, "LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_DISABLED"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_INF_EID, CFE_EVS_INFORMATION, "Set AP state command: AP = 175, New state = 3"), + "Set AP state command: AP = 175, New state = 3"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_UpdateSingleActionPointDisabled */ + +void LC_SetAPStateCmd_Test_InvalidCurrentAPStateActive(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_ACTIVE; + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS - 1; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = LC_APSTATE_PERMOFF; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_CURR_ERR_EID, CFE_EVS_ERROR, "Set AP state error: AP = 175, Invalid current AP state = 4"), + "Set AP state error: AP = 175, Invalid current AP state = 4"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_InvalidCurrentAPStateActive */ + +void LC_SetAPStateCmd_Test_InvalidCurrentAPStatePassive(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_PASSIVE; + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS - 1; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = LC_APSTATE_PERMOFF; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_CURR_ERR_EID, CFE_EVS_ERROR, "Set AP state error: AP = 175, Invalid current AP state = 4"), + "Set AP state error: AP = 175, Invalid current AP state = 4"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_InvalidCurrentAPStatePassive */ + +void LC_SetAPStateCmd_Test_InvalidCurrentAPStateDisabled(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_DISABLED; + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS - 1; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = LC_APSTATE_PERMOFF; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_CURR_ERR_EID, CFE_EVS_ERROR, "Set AP state error: AP = 175, Invalid current AP state = 4"), + "Set AP state error: AP = 175, Invalid current AP state = 4"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_InvalidCurrentAPStateDisabled */ + +void LC_SetAPStateCmd_Test_InvalidAPNumberActive(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_ACTIVE; + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = LC_APSTATE_PERMOFF; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_APNUM_ERR_EID, CFE_EVS_ERROR, "Set AP state error: Invalid AP number = 176"), + "Set AP state error: Invalid AP number = 176"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_InvalidAPNumberActive */ + +void LC_SetAPStateCmd_Test_InvalidAPNumberPassive(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_PASSIVE; + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = LC_APSTATE_PERMOFF; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_APNUM_ERR_EID, CFE_EVS_ERROR, "Set AP state error: Invalid AP number = 176"), + "Set AP state error: Invalid AP number = 176"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_InvalidAPNumberPassive */ + +void LC_SetAPStateCmd_Test_InvalidAPNumberDisabled(void) +{ + LC_SetAPState_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.NewAPState = LC_APSTATE_DISABLED; + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = LC_APSTATE_PERMOFF; + + /* Execute the function being tested */ + LC_SetAPStateCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATE_APNUM_ERR_EID, CFE_EVS_ERROR, "Set AP state error: Invalid AP number = 176"), + "Set AP state error: Invalid AP number = 176"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPStateCmd_Test_InvalidAPNumberDisabled */ + +void LC_SetAPPermOffCmd_Test_InvalidAPNumberMaxActionpoints(void) +{ + LC_SetAPPermOff_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS; + + /* Execute the function being tested */ + LC_SetAPPermOffCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APOFF_APNUM_ERR_EID, CFE_EVS_ERROR, "Set AP perm off error: Invalid AP number = 176"), + "Set AP perm off error: Invalid AP number = 176"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPPermOffCmd_Test_InvalidAPNumberMaxActionpoints */ + +void LC_SetAPPermOffCmd_Test_InvalidAPNumberAllActionpoints(void) +{ + LC_SetAPPermOff_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.APNumber = LC_ALL_ACTIONPOINTS; + + /* Execute the function being tested */ + LC_SetAPPermOffCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APOFF_APNUM_ERR_EID, CFE_EVS_ERROR, "Set AP perm off error: Invalid AP number = 65535"), + "Set AP perm off error: Invalid AP number = 65535"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPPermOffCmd_Test_InvalidAPNumberAllActionpoints */ + +void LC_SetAPPermOffCmd_Test_APNotDisabled(void) +{ + LC_SetAPPermOff_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.APNumber = 1; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = 99; + + /* Execute the function being tested */ + LC_SetAPPermOffCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APOFF_CURR_ERR_EID, CFE_EVS_ERROR, "Set AP perm off error, AP NOT Disabled: AP = 1, Current state = 99"), + "Set AP perm off error, AP NOT Disabled: AP = 1, Current state = 99"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPPermOffCmd_Test_APNotDisabled */ + +void LC_SetAPPermOffCmd_Test_Nominal(void) +{ + LC_SetAPPermOff_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); + + CmdPacket.APNumber = 1; + + LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState = LC_APSTATE_DISABLED; + + /* Execute the function being tested */ + LC_SetAPPermOffCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == 4, "LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == 4"); + UtAssert_True (LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APOFF_INF_EID, CFE_EVS_INFORMATION, "Set AP permanently off command: AP = 1"), + "Set AP permanently off command: AP = 1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SetAPPermOffCmd_Test_Nominal */ + +void LC_ResetAPStatsCmd_Test_AllActionPoints(void) +{ + LC_ResetAPStats_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_ResetAPStats_t), TRUE); + + CmdPacket.APNumber = LC_ALL_ACTIONPOINTS; + + /* Execute the function being tested */ + LC_ResetAPStatsCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATS_INF_EID, CFE_EVS_INFORMATION, "Reset AP stats command: AP = 65535"), + "Reset AP stats command: AP = 65535"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ResetAPStatsCmd_Test_AllActionPoints */ + +void LC_ResetAPStatsCmd_Test_SingleActionPoint(void) +{ + LC_ResetAPStats_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_ResetAPStats_t), TRUE); + + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS - 1; + + /* Execute the function being tested */ + LC_ResetAPStatsCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATS_INF_EID, CFE_EVS_INFORMATION, "Reset AP stats command: AP = 175"), + "Reset AP stats command: AP = 175"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ResetAPStatsCmd_Test_SingleActionPoint */ + +void LC_ResetAPStatsCmd_Test_InvalidAPNumber(void) +{ + LC_ResetAPStats_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_ResetAPStats_t), TRUE); + + CmdPacket.APNumber = LC_MAX_ACTIONPOINTS; + + /* Execute the function being tested */ + LC_ResetAPStatsCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSTATS_APNUM_ERR_EID, CFE_EVS_ERROR, "Reset AP stats error: invalid AP number = 176"), + "Reset AP stats error: invalid AP number = 176"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ResetAPStatsCmd_Test_InvalidAPNumber */ + +void LC_ResetResultsAP_Test(void) +{ + uint32 TableIndex; + uint32 StartIndex = 0; + uint32 EndIndex = 5; + boolean ResetStatsCmd = FALSE; + + for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++) + { + LC_OperData.ARTPtr[TableIndex].ActionResult = 99; + LC_OperData.ARTPtr[TableIndex].CurrentState = 99; + + LC_OperData.ARTPtr[TableIndex].PassiveAPCount = 99; + LC_OperData.ARTPtr[TableIndex].FailToPassCount = 99; + LC_OperData.ARTPtr[TableIndex].PassToFailCount = 99; + + LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount = 99; + LC_OperData.ARTPtr[TableIndex].CumulativeFailCount = 99; + LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount = 99; + LC_OperData.ARTPtr[TableIndex].CumulativeEventMsgsSent = 99; + + LC_OperData.ADTPtr[TableIndex].DefaultState = 1; + } + + /* Execute the function being tested */ + LC_ResetResultsAP(StartIndex, EndIndex, ResetStatsCmd); + + /* Verify results */ + + /* Checks for first index: */ + TableIndex = StartIndex; + + UtAssert_True + (LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE, + "LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE"); + + UtAssert_True + (LC_OperData.ARTPtr[TableIndex].CurrentState == 1, + "LC_OperData.ARTPtr[TableIndex].CurrentState == 1"); + + UtAssert_True (LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0, "LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0, "LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0, "LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0"); + + UtAssert_True (LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0, "LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0, "LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0, "LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CumulativeEventMsgsSent == 0, "LC_OperData.ARTPtr[TableIndex].CumulativeEventMsgsSent == 0"); + + /* Checks for middle index: */ + TableIndex = (StartIndex + EndIndex)/2; + + UtAssert_True + (LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE, + "LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE"); + + UtAssert_True + (LC_OperData.ARTPtr[TableIndex].CurrentState == 1, + "LC_OperData.ARTPtr[TableIndex].CurrentState == 1"); + + UtAssert_True (LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0, "LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0, "LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0, "LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0"); + + UtAssert_True (LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0, "LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0, "LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0, "LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0"); + + /* Checks for last index: */ + TableIndex = EndIndex; + + UtAssert_True + (LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE, + "LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE"); + + UtAssert_True + (LC_OperData.ARTPtr[TableIndex].CurrentState == 1, + "LC_OperData.ARTPtr[TableIndex].CurrentState == 1"); + + UtAssert_True (LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0, "LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0, "LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0, "LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0"); + + UtAssert_True (LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0, "LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0, "LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0"); + UtAssert_True (LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0, "LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ResetResultsAP_Test */ + +void LC_ResetWPStatsCmd_Test_AllWatchPoints(void) +{ + LC_ResetWPStats_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_ResetWPStats_t), TRUE); + + CmdPacket.WPNumber = LC_ALL_WATCHPOINTS; + + /* Execute the function being tested */ + LC_ResetWPStatsCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WPSTATS_INF_EID, CFE_EVS_INFORMATION, "Reset WP stats command: WP = 65535"), + "Reset WP stats command: WP = 65535"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ResetWPStatsCmd_Test_AllWatchPoints */ + +void LC_ResetWPStatsCmd_Test_SingleWatchPoint(void) +{ + LC_ResetWPStats_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_ResetWPStats_t), TRUE); + + CmdPacket.WPNumber = LC_MAX_WATCHPOINTS - 1; + + /* Execute the function being tested */ + LC_ResetWPStatsCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdCount == 1, "LC_AppData.CmdCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WPSTATS_INF_EID, CFE_EVS_INFORMATION, "Reset WP stats command: WP = 175"), + "Reset WP stats command: WP = 175"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ResetWPStatsCmd_Test_SingleWatchPoint */ + +void LC_ResetWPStatsCmd_Test_InvalidWPNumber(void) +{ + LC_ResetWPStats_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), LC_CMD_MID, sizeof(LC_ResetWPStats_t), TRUE); + + CmdPacket.WPNumber = LC_MAX_WATCHPOINTS; + + /* Execute the function being tested */ + LC_ResetWPStatsCmd((CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WPSTATS_WPNUM_ERR_EID, CFE_EVS_ERROR, "Reset WP stats error: invalid WP number = 176"), + "Reset WP stats error: invalid WP number = 176"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ResetWPStatsCmd_Test_InvalidWPNumber */ + +void LC_ResetResultsWP_Test(void) +{ + uint32 TableIndex; + uint32 StartIndex = 0; + uint32 EndIndex = 5; + boolean ResetStatsCmd = FALSE; + + for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++) + { + LC_OperData.WRTPtr[TableIndex].WatchResult = 99; + LC_OperData.WRTPtr[TableIndex].CountdownToStale = 99; + + LC_OperData.WRTPtr[TableIndex].EvaluationCount = 99; + LC_OperData.WRTPtr[TableIndex].FalseToTrueCount = 99; + LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount = 99; + LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount = 99; + + LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value = 99; + LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds = 99; + LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds = 99; + + LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value = 99; + LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds = 99; + LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds = 99; + } + + /* Execute the function being tested */ + LC_ResetResultsWP(StartIndex, EndIndex, ResetStatsCmd); + + /* Verify results */ + + /* Checks for first index: */ + TableIndex = StartIndex; + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE, "LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0, "LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0"); + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0, "LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0, "LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0, "LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0, "LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0"); + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0, "LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0, "LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0, "LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0"); + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0, "LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0, "LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0, "LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0"); + + /* Checks for middle index: */ + TableIndex = (StartIndex + EndIndex)/2; + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE, "LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0, "LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0"); + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0, "LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0, "LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0, "LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0, "LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0"); + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0, "LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0, "LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0, "LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0"); + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0, "LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0, "LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0, "LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0"); + + /* Checks for last index: */ + TableIndex = EndIndex; + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE, "LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0, "LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0"); + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0, "LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0, "LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0, "LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0, "LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0"); + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0, "LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0, "LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0, "LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0"); + + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0, "LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0, "LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0"); + UtAssert_True (LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0, "LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ResetResultsWP_Test */ + +void LC_VerifyMsgLength_Test_HKRequestLengthError(void) +{ + boolean Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg (&CmdPacket, LC_SEND_HK_MID, 1, TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_NOOP_CC); + + /* Execute the function being tested */ + Result = LC_VerifyMsgLength((CFE_SB_MsgPtr_t)(&CmdPacket), sizeof(CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == FALSE, "Result == FALSE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_HKREQ_LEN_ERR_EID, CFE_EVS_ERROR, "Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 1, Expected = 8"), + "Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 1, Expected = 8"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_VerifyMsgLength_Test_HKRequestLengthError */ + +void LC_VerifyMsgLength_Test_APSampleLengthError(void) +{ + boolean Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg (&CmdPacket, LC_SAMPLE_AP_MID, 1, TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_NOOP_CC); + + /* Execute the function being tested */ + Result = LC_VerifyMsgLength((CFE_SB_MsgPtr_t)(&CmdPacket), sizeof(CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == FALSE, "Result == FALSE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APSAMPLE_LEN_ERR_EID, CFE_EVS_ERROR, "Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 1, Expected = 8"), + "Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 1, Expected = 8"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_VerifyMsgLength_Test_APSampleLengthError */ + +void LC_VerifyMsgLength_Test_GenericLengthError(void) +{ + boolean Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg (&CmdPacket, 1, 1, TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_NOOP_CC); + + /* Execute the function being tested */ + Result = LC_VerifyMsgLength((CFE_SB_MsgPtr_t)(&CmdPacket), sizeof(CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == FALSE, "Result == FALSE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_LEN_ERR_EID, CFE_EVS_ERROR, "Invalid msg length: ID = 0x0001, CC = 0, Len = 1, Expected = 8"), + "Invalid AP sample msg length: ID = 0x0001, CC = 0, Len = 1, Expected = 8"); + + UtAssert_True (LC_AppData.CmdErrCount == 1, "LC_AppData.CmdErrCount == 1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_VerifyMsgLength_Test_GenericLengthError */ + +void LC_VerifyMsgLength_Test_Nominal(void) +{ + boolean Result; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg (&CmdPacket, 1, sizeof(LC_NoArgsCmd_t), TRUE); + CFE_SB_SetCmdCode((CFE_SB_MsgPtr_t)(&CmdPacket), LC_NOOP_CC); + + /* Execute the function being tested */ + Result = LC_VerifyMsgLength((CFE_SB_MsgPtr_t)(&CmdPacket), sizeof(CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_VerifyMsgLength_Test_Nominal */ + +void LC_ManageTables_Test_InfoUpdated(void) +{ + int32 Result; + + /* Set to satisfy all instances of condition "Result == CFE_TBL_INFO_UPDATED" */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, CFE_TBL_INFO_UPDATED, 1); + Ut_CFE_TBL_ContinueReturnCodeAfterCountZero(UT_CFE_TBL_GETADDRESS_INDEX); + + /* Execute the function being tested */ + Result = LC_ManageTables(); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ManageTables_Test_InfoUpdated */ + +void LC_ManageTables_Test_WDTGetAddressError(void) +{ + int32 Result; + /* Set to generate event message LC_WDT_GETADDR_ERR_EID */ + Ut_CFE_TBL_SetReturnCode(UT_CFE_TBL_GETADDRESS_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_ManageTables(); + + /* Verify results */ + UtAssert_True (Result == -1, "Result == -1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, "Error getting WDT address, RC=0xFFFFFFFF"), + "Error getting WDT address, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ManageTables_Test_WDTGetAddressError */ + +void LC_ManageTables_Test_ADTGetAddressError(void) +{ + int32 Result; + + /* Generates event message LC_ADT_GETADDR_ERR_EID */ + LC_CMDS_TEST_CFE_TBL_GetAddressHookCount = 0; + Ut_CFE_TBL_SetFunctionHook(UT_CFE_TBL_GETADDRESS_INDEX, &LC_CMDS_TEST_CFE_TBL_GetAddressHook); + + /* Execute the function being tested */ + Result = LC_ManageTables(); + + /* Verify results */ + UtAssert_True (Result == -1, "Result == -1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, "Error getting ADT address, RC=0xFFFFFFFF"), + "Error getting ADT address, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ManageTables_Test_ADTGetAddressError */ + +void LC_UpdateTaskCDS_Test_UpdateWatchpointError(void) +{ + int32 Result; + + /* Set to generate error message LC_WRT_NO_SAVE_ERR_EID */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_COPYTOCDS_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = LC_UpdateTaskCDS(); + + /* Verify results */ + UtAssert_True (Result == -1, "Result == -1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WRT_NO_SAVE_ERR_EID, CFE_EVS_ERROR, "Unable to update watchpoint results in CDS, RC=0xFFFFFFFF"), + "Unable to update watchpoint results in CDS, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_UpdateTaskCDS_Test_UpdateWatchpointError */ + +void LC_UpdateTaskCDS_Test_UpdateActionpointError(void) +{ + int32 Result; + + /* Set to generate error message LC_ART_NO_SAVE_ERR_EID */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_COPYTOCDS_INDEX, -1, 2); + + /* Execute the function being tested */ + Result = LC_UpdateTaskCDS(); + + /* Verify results */ + UtAssert_True (Result == -1, "Result == -1"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_ART_NO_SAVE_ERR_EID, CFE_EVS_ERROR, "Unable to update actionpoint results in CDS, RC=0xFFFFFFFF"), + "Unable to update actionpoint results in CDS, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_UpdateTaskCDS_Test_UpdateActionpointError */ + +void LC_UpdateTaskCDS_Test_UpdateAppDataError(void) +{ + int32 Result; + + /* Set to generate error message LC_APP_NO_SAVE_START_ERR_EID */ + Ut_CFE_ES_SetReturnCode(UT_CFE_ES_COPYTOCDS_INDEX, -1, 3); + + /* Execute the function being tested */ + Result = LC_UpdateTaskCDS(); + + /* Verify results */ + UtAssert_True (Result == -1, "Result == -1"); + UtAssert_True (LC_AppData.CDSSavedOnExit == LC_CDS_SAVED, "LC_AppData.CDSSavedOnExit == LC_CDS_SAVED"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_APP_NO_SAVE_START_ERR_EID, CFE_EVS_ERROR, "Unable to update application data in CDS, RC=0xFFFFFFFF"), + "Unable to update application data in CDS, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_UpdateTaskCDS_Test_UpdateAppDataError */ + +void LC_UpdateTaskCDS_Test_Nominal(void) +{ + int32 Result; + + /* Execute the function being tested */ + Result = LC_UpdateTaskCDS(); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + UtAssert_True (LC_AppData.CDSSavedOnExit == LC_CDS_SAVED, "LC_AppData.CDSSavedOnExit == LC_CDS_SAVED"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_UpdateTaskCDS_Test_Nominal */ + +void LC_Cmds_Test_AddTestCases(void) +{ + UtTest_Add(LC_AppPipe_Test_SampleAPRequest, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_SampleAPRequest"); + UtTest_Add(LC_AppPipe_Test_HousekeepingRequest, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_HousekeepingRequest"); + UtTest_Add(LC_AppPipe_Test_Noop, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_Noop"); + UtTest_Add(LC_AppPipe_Test_Reset, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_Reset"); + UtTest_Add(LC_AppPipe_Test_SetLCState, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_SetLCState"); + UtTest_Add(LC_AppPipe_Test_SetAPState, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_SetAPState"); + UtTest_Add(LC_AppPipe_Test_SetAPPermoff, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_SetAPPermoff"); + UtTest_Add(LC_AppPipe_Test_ResetAPStats, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_ResetAPStats"); + UtTest_Add(LC_AppPipe_Test_ResetWPStats, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_ResetWPStats"); + UtTest_Add(LC_AppPipe_Test_InvalidCommandCode, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_InvalidCommandCode"); + UtTest_Add(LC_AppPipe_Test_MonitorPacket, LC_Test_Setup, LC_Test_TearDown, "LC_AppPipe_Test_MonitorPacket"); + + UtTest_Add(LC_SampleAPReq_Test_AllowSampleAllWatchStale, LC_Test_Setup, LC_Test_TearDown, "LC_SampleAPReq_Test_AllowSampleAllWatchStale"); + UtTest_Add(LC_SampleAPReq_Test_StartLessOrEqualToEndAndEndWithinArrayWatchStale, LC_Test_Setup, LC_Test_TearDown, "LC_SampleAPReq_Test_StartLessOrEqualToEndAndEndWithinArrayWatchStale"); + UtTest_Add(LC_SampleAPReq_Test_ArrayIndexOutOfRange, LC_Test_Setup, LC_Test_TearDown, "LC_SampleAPReq_Test_ArrayIndexOutOfRange"); + + UtTest_Add(LC_HousekeepingReq_Test_WatchStale, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_WatchStale"); + UtTest_Add(LC_HousekeepingReq_Test_WatchFalse, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_WatchFalse"); + UtTest_Add(LC_HousekeepingReq_Test_WatchTrue, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_WatchTrue"); + UtTest_Add(LC_HousekeepingReq_Test_WatchError, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_WatchError"); + UtTest_Add(LC_HousekeepingReq_Test_DefaultWatchResult, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_DefaultWatchResult"); + UtTest_Add(LC_HousekeepingReq_Test_ActionNotUsedStale, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_ActionNotUsedStale"); + UtTest_Add(LC_HousekeepingReq_Test_APStateActiveActionPass, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_APStateActiveActionPass"); + UtTest_Add(LC_HousekeepingReq_Test_APStatePassiveActionFail, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_APStatePassiveActionFail"); + UtTest_Add(LC_HousekeepingReq_Test_APStateDisabledActionError, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_APStateDisabledActionError"); + UtTest_Add(LC_HousekeepingReq_Test_APStatePermOffActionError, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_APStatePermOffActionError"); + UtTest_Add(LC_HousekeepingReq_Test_DefaultCurrentStateAndActionResult, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_DefaultCurrentStateAndActionResult"); + UtTest_Add(LC_HousekeepingReq_Test_ManageTablesError, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_ManageTablesError"); + UtTest_Add(LC_HousekeepingReq_Test_UpdateTaskCDSNotSuccess, LC_Test_Setup, LC_Test_TearDown, "LC_HousekeepingReq_Test_UpdateTaskCDSNotSuccess"); + +/* Noop fully tested in LC_AppPipe_Test_Noop */ +/* Reset fully tested in LC_AppPipe_Test_Reset */ + + UtTest_Add(LC_ResetCounters_Test, LC_Test_Setup, LC_Test_TearDown, "LC_ResetCounters_Test"); + + UtTest_Add(LC_SetLCStateCmd_Test_Active, LC_Test_Setup, LC_Test_TearDown, "LC_SetLCStateCmd_Test_Active"); + UtTest_Add(LC_SetLCStateCmd_Test_Passive, LC_Test_Setup, LC_Test_TearDown, "LC_SetLCStateCmd_Test_Passive"); + UtTest_Add(LC_SetLCStateCmd_Test_Disabled, LC_Test_Setup, LC_Test_TearDown, "LC_SetLCStateCmd_Test_Disabled"); + UtTest_Add(LC_SetLCStateCmd_Test_Default, LC_Test_Setup, LC_Test_TearDown, "LC_SetLCStateCmd_Test_Default"); + + UtTest_Add(LC_SetAPStateCmd_Test_Default, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_Default"); + UtTest_Add(LC_SetAPStateCmd_Test_SetAllActionPointsActive, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_SetAllActionPointsActive"); + UtTest_Add(LC_SetAPStateCmd_Test_SetAllActionPointsPassive, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_SetAllActionPointsPassive"); + UtTest_Add(LC_SetAPStateCmd_Test_SetAllActionPointsDisabled, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_SetAllActionPointsDisabled"); + UtTest_Add(LC_SetAPStateCmd_Test_UpdateSingleActionPointActive, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_UpdateSingleActionPointActive"); + UtTest_Add(LC_SetAPStateCmd_Test_UpdateSingleActionPointPassive, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_UpdateSingleActionPointPassive"); + UtTest_Add(LC_SetAPStateCmd_Test_UpdateSingleActionPointDisabled, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_UpdateSingleActionPointDisabled"); + UtTest_Add(LC_SetAPStateCmd_Test_InvalidCurrentAPStateActive, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_InvalidCurrentAPStateActive"); + UtTest_Add(LC_SetAPStateCmd_Test_InvalidCurrentAPStatePassive, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_InvalidCurrentAPStatePassive"); + UtTest_Add(LC_SetAPStateCmd_Test_InvalidCurrentAPStateDisabled, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_InvalidCurrentAPStateDisabled"); + UtTest_Add(LC_SetAPStateCmd_Test_InvalidAPNumberActive, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_InvalidAPNumberActive"); + UtTest_Add(LC_SetAPStateCmd_Test_InvalidAPNumberPassive, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_InvalidAPNumberPassive"); + UtTest_Add(LC_SetAPStateCmd_Test_InvalidAPNumberDisabled, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPStateCmd_Test_InvalidAPNumberDisabled"); + + UtTest_Add(LC_SetAPPermOffCmd_Test_InvalidAPNumberMaxActionpoints, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPPermOffCmd_Test_InvalidAPNumberMaxActionpoints"); + UtTest_Add(LC_SetAPPermOffCmd_Test_InvalidAPNumberAllActionpoints, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPPermOffCmd_Test_InvalidAPNumberAllActionpoints"); + UtTest_Add(LC_SetAPPermOffCmd_Test_APNotDisabled, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPPermOffCmd_Test_APNotDisabled"); + UtTest_Add(LC_SetAPPermOffCmd_Test_Nominal, LC_Test_Setup, LC_Test_TearDown, "LC_SetAPPermOffCmd_Test_Nominal"); + + UtTest_Add(LC_ResetAPStatsCmd_Test_AllActionPoints, LC_Test_Setup, LC_Test_TearDown, "LC_ResetAPStatsCmd_Test_AllActionPoints"); + UtTest_Add(LC_ResetAPStatsCmd_Test_SingleActionPoint, LC_Test_Setup, LC_Test_TearDown, "LC_ResetAPStatsCmd_Test_SingleActionPoint"); + UtTest_Add(LC_ResetAPStatsCmd_Test_InvalidAPNumber, LC_Test_Setup, LC_Test_TearDown, "LC_ResetAPStatsCmd_Test_InvalidAPNumber"); + + UtTest_Add(LC_ResetResultsAP_Test, LC_Test_Setup, LC_Test_TearDown, "LC_ResetResultsAP_Test"); + + UtTest_Add(LC_ResetWPStatsCmd_Test_AllWatchPoints, LC_Test_Setup, LC_Test_TearDown, "LC_ResetWPStatsCmd_Test_AllWatchPoints"); + UtTest_Add(LC_ResetWPStatsCmd_Test_SingleWatchPoint, LC_Test_Setup, LC_Test_TearDown, "LC_ResetWPStatsCmd_Test_SingleWatchPoint"); + UtTest_Add(LC_ResetWPStatsCmd_Test_InvalidWPNumber, LC_Test_Setup, LC_Test_TearDown, "LC_ResetWPStatsCmd_Test_InvalidWPNumber"); + + UtTest_Add(LC_ResetResultsWP_Test, LC_Test_Setup, LC_Test_TearDown, "LC_ResetResultsWP_Test"); + + UtTest_Add(LC_VerifyMsgLength_Test_HKRequestLengthError, LC_Test_Setup, LC_Test_TearDown, "LC_VerifyMsgLength_Test_HKRequestLengthError"); + UtTest_Add(LC_VerifyMsgLength_Test_APSampleLengthError, LC_Test_Setup, LC_Test_TearDown, "LC_VerifyMsgLength_Test_APSampleLengthError"); + UtTest_Add(LC_VerifyMsgLength_Test_GenericLengthError, LC_Test_Setup, LC_Test_TearDown, "LC_VerifyMsgLength_Test_GenericLengthError"); + UtTest_Add(LC_VerifyMsgLength_Test_Nominal, LC_Test_Setup, LC_Test_TearDown, "LC_VerifyMsgLength_Test_Nominal"); + + UtTest_Add(LC_ManageTables_Test_InfoUpdated, LC_Test_Setup, LC_Test_TearDown, "LC_ManageTables_Test_InfoUpdated"); + UtTest_Add(LC_ManageTables_Test_WDTGetAddressError, LC_Test_Setup, LC_Test_TearDown, "LC_ManageTables_Test_WDTGetAddressError"); + UtTest_Add(LC_ManageTables_Test_ADTGetAddressError, LC_Test_Setup, LC_Test_TearDown, "LC_ManageTables_Test_ADTGetAddressError"); + + UtTest_Add(LC_UpdateTaskCDS_Test_UpdateWatchpointError, LC_Test_Setup, LC_Test_TearDown, "LC_UpdateTaskCDS_Test_UpdateWatchpointError"); + UtTest_Add(LC_UpdateTaskCDS_Test_UpdateActionpointError, LC_Test_Setup, LC_Test_TearDown, "LC_UpdateTaskCDS_Test_UpdateActionpointError"); + UtTest_Add(LC_UpdateTaskCDS_Test_UpdateAppDataError, LC_Test_Setup, LC_Test_TearDown, "LC_UpdateTaskCDS_Test_UpdateAppDataError"); + UtTest_Add(LC_UpdateTaskCDS_Test_Nominal, LC_Test_Setup, LC_Test_TearDown, "LC_UpdateTaskCDS_Test_Nominal"); + +} /* end LC_Cmds_Test_AddTestCases */ + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_cmds_test.h b/fsw/unit_test/lc_cmds_test.h new file mode 100644 index 0000000..a7f61bb --- /dev/null +++ b/fsw/unit_test/lc_cmds_test.h @@ -0,0 +1,41 @@ + /************************************************************************* + ** File: + ** $Id: lc_cmds_test.h 1.2 2017/01/22 17:24:59EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains the function prototypes for the unit test cases for lc_cmds.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "utassert.h" +#include "uttest.h" + +/* + * Function Prototypes + */ + +void LC_Cmds_Test_AddTestCases(void); + + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_custom.c.gcov b/fsw/unit_test/lc_custom.c.gcov new file mode 100644 index 0000000..d55f34f --- /dev/null +++ b/fsw/unit_test/lc_custom.c.gcov @@ -0,0 +1,134 @@ + -: 0:Source:../src/lc_custom.c + -: 0:Programs:5 + -: 1:/************************************************************************* + -: 2:** File: + -: 3:** $Id: lc_custom.c.gcov 1.3 2016/11/22 17:32:23EST mdeschu Exp $ + -: 4:** + -: 5:** Copyright © 2007-2014 United States Government as represented by the + -: 6:** Administrator of the National Aeronautics and Space Administration. + -: 7:** All Other Rights Reserved. + -: 8:** + -: 9:** This software was created at NASA's Goddard Space Flight Center. + -: 10:** This software is governed by the NASA Open Source Agreement and may be + -: 11:** used, distributed and modified only pursuant to the terms of that + -: 12:** agreement. + -: 13:** + -: 14:** Purpose: + -: 15:** CFS Limit Checker (LC) mission specific code, including the + -: 16:** custom function template. + -: 17:** + -: 18:** $Log: lc_custom.c.gcov $ + -: 18:** Revision 1.3 2016/11/22 17:32:23EST mdeschu + -: 18:** Update unit test results, gcov, and README for LC 2.1.0.0 + -: 19:** Revision 1.2 2015/11/16 14:26:18EST wmoleski + -: 20:** Most of the files were missing the Copyright comments. + -: 21:** Revision 1.2 2015/03/04 16:09:52EST sstrege + -: 22:** Added copyright information + -: 23:** Revision 1.1 2012/07/31 16:53:38EDT nschweis + -: 24:** Initial revision + -: 25:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj + -: 26:** Revision 1.3 2009/12/18 14:48:28EST lwalling + -: 27:** Update local copy of SC start RTS command packet + -: 28:** Revision 1.2 2008/12/03 13:59:43EST dahardis + -: 29:** Corrections from peer code review + -: 30:** Revision 1.1 2008/10/29 14:19:08EDT dahardison + -: 31:** Initial revision + -: 32:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj + -: 33:** + -: 34:*************************************************************************/ + -: 35: + -: 36:/************************************************************************* + -: 37:** Includes + -: 38:*************************************************************************/ + -: 39:#include "lc_custom.h" + -: 40:#include "lc_tbldefs.h" + -: 41:#include "lc_events.h" + -: 42:#include "lc_mission_cfg.h" + -: 43: + -: 44:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 45:/* */ + -: 46:/* Initiate an RTS request */ + -: 47:/* */ + -: 48:/* NOTE: For complete prolog information, see 'lc_custom.h' */ + -: 49:/* */ + -: 50:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 2: 51:void LC_ExecuteRTS(uint16 RTSId) + -: 52:{ + -: 53: /*************************************************************** + -: 54: ** This is a local declaration of the command message structure + -: 55: ** to initiate an RTS and has been placed here to allow the + -: 56: ** the LC application to be built without including headers from + -: 57: ** any other applications (like Stored Commanding). + -: 58: ** A mission may choose to remove this and use a message + -: 59: ** structure declared elsewhere instead. + -: 60: ** + -: 61: ** This also applies to the LC_RTS_REQ_MID and LC_RTS_REQ_CC + -: 62: ** constants (see lc_mission_cfg.h). + -: 63: */ + -: 64: typedef struct { + -: 65: uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; + -: 66: + -: 67: uint16 RTSId; + -: 68: + -: 69: } LC_RTSRequest_t; + -: 70: + -: 71: LC_RTSRequest_t RTSRequest; + -: 72: /**************************************************************/ + -: 73: + 2: 74: CFE_SB_InitMsg((CFE_SB_Msg_t *) ((uint32) &RTSRequest), + -: 75: LC_RTS_REQ_MID, sizeof(LC_RTSRequest_t), TRUE); + -: 76: + 2: 77: CFE_SB_SetCmdCode((CFE_SB_Msg_t *) ((uint32) &RTSRequest), + -: 78: LC_RTS_REQ_CC); + -: 79: + 2: 80: RTSRequest.RTSId = RTSId; + -: 81: + 2: 82: CFE_SB_SendMsg((CFE_SB_Msg_t *) ((uint32) &RTSRequest)); + -: 83: + 2: 84: return; + -: 85: + -: 86:} /* end LC_ExecuteRTS */ + -: 87: + -: 88:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 89:/* */ + -: 90:/* Mission specific custom function entry point */ + -: 91:/* */ + -: 92:/* NOTE: For complete prolog information, see 'lc_custom.h' */ + -: 93:/* */ + -: 94:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 4: 95:uint8 LC_CustomFunction(uint16 WatchIndex, + -: 96: uint32 ProcessedWPData, + -: 97: CFE_SB_MsgPtr_t MessagePtr, + -: 98: uint32 WDTCustomFuncArg) + -: 99:{ + 4: 100: uint8 EvalResult = LC_WATCH_FALSE; + -: 101: + -: 102: /* + -: 103: ** This function is the entry point for all watchpoints where + -: 104: ** the OperatorID in the watchpoint definition table entry + -: 105: ** is set to LC_OPER_CUSTOM. + -: 106: ** + -: 107: ** For this reason The first step would normally be to + -: 108: ** switch on the WatchIndex to figure out what watchpoint got + -: 109: ** us here. As an alternate, a mission may choose to use the + -: 110: ** WDTCustomFuncArg for this instead. + -: 111: */ + 4: 112: switch (WatchIndex) + -: 113: { + -: 114: case 0x0000: + -: 115: case 0x0001: + -: 116: default: + 4: 117: CFE_EVS_SendEvent(LC_CFCALL_ERR_EID, CFE_EVS_ERROR, + -: 118: "Unexpected LC_CustomFunction call: WP = %d", + -: 119: WatchIndex); + -: 120: break; + -: 121: + -: 122: } /* end WatchIndex switch */ + -: 123: + 4: 124: return (EvalResult); + -: 125: + -: 126:} /* end LC_CustomFunction */ + -: 127: + -: 128:/************************/ + -: 129:/* End of File Comment */ + -: 130:/************************/ diff --git a/fsw/unit_test/lc_custom_test.c b/fsw/unit_test/lc_custom_test.c new file mode 100644 index 0000000..3e3837b --- /dev/null +++ b/fsw/unit_test/lc_custom_test.c @@ -0,0 +1,119 @@ + /************************************************************************* + ** File: + ** $Id: lc_custom_test.c 1.3 2017/01/22 17:24:34EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains unit test cases for the functions contained in the file lc_custom.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "lc_custom_test.h" +#include "lc_custom.h" +#include "lc_app.h" +#include "lc_msg.h" +#include "lc_msgdefs.h" +#include "lc_msgids.h" +#include "lc_events.h" +#include "lc_version.h" +#include "lc_test_utils.h" +#include "ut_osapi_stubs.h" +#include "ut_cfe_sb_stubs.h" +#include "ut_cfe_es_stubs.h" +#include "ut_cfe_es_hooks.h" +#include "ut_cfe_evs_stubs.h" +#include "ut_cfe_evs_hooks.h" +#include "ut_cfe_time_stubs.h" +#include "ut_cfe_psp_memutils_stubs.h" +#include "ut_cfe_psp_watchdog_stubs.h" +#include "ut_cfe_psp_timer_stubs.h" +#include "ut_cfe_tbl_stubs.h" +#include "ut_cfe_fs_stubs.h" +#include "ut_cfe_time_stubs.h" +#include +#include +#include + +/* + * Function Definitions + */ + +void LC_ExecuteRTS_Test(void) +{ + uint16 RTSId = 1; + + /* Execute the function being tested */ + LC_ExecuteRTS(RTSId); + + /* Verify results */ + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ExecuteRTS_Test */ + +void LC_CustomFunction_Test_WatchIndex0(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + + /* Execute the function being tested */ + Result = LC_CustomFunction(WatchIndex, 0, 0, 0); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_CFCALL_ERR_EID, CFE_EVS_ERROR, "Unexpected LC_CustomFunction call: WP = 0"), + "Unexpected LC_CustomFunction call: WP = 0"); + + UtAssert_True (Result == LC_WATCH_FALSE, "Result == LC_WATCH_FALSE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CustomFunction_Test_WatchIndex0 */ + +void LC_CustomFunction_Test_WatchIndex1(void) +{ + uint8 Result; + uint16 WatchIndex = 1; + + /* Execute the function being tested */ + Result = LC_CustomFunction(WatchIndex, 0, 0, 0); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_CFCALL_ERR_EID, CFE_EVS_ERROR, "Unexpected LC_CustomFunction call: WP = 1"), + "Unexpected LC_CustomFunction call: WP = 1"); + + UtAssert_True (Result == LC_WATCH_FALSE, "Result == LC_WATCH_FALSE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CustomFunction_Test_WatchIndex1 */ + +void LC_Custom_Test_AddTestCases(void) +{ + UtTest_Add(LC_ExecuteRTS_Test, LC_Test_Setup, LC_Test_TearDown, "LC_ExecuteRTS_Test"); + UtTest_Add(LC_CustomFunction_Test_WatchIndex0, LC_Test_Setup, LC_Test_TearDown, "LC_CustomFunction_Test_WatchIndex0"); + UtTest_Add(LC_CustomFunction_Test_WatchIndex1, LC_Test_Setup, LC_Test_TearDown, "LC_CustomFunction_Test_WatchIndex1"); + +} /* end LC_Custom_Test_AddTestCases */ + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_custom_test.h b/fsw/unit_test/lc_custom_test.h new file mode 100644 index 0000000..01d640d --- /dev/null +++ b/fsw/unit_test/lc_custom_test.h @@ -0,0 +1,37 @@ + /************************************************************************* + ** File: + ** $Id: lc_custom_test.h 1.2 2017/01/22 17:24:31EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains the function prototypes for the unit test cases for lc_custom.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +#include "utassert.h" +#include "uttest.h" + +/* + * Function Prototypes + */ + +void LC_Custom_Test_AddTestCases(void); + + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_platform_cfg.h b/fsw/unit_test/lc_platform_cfg.h new file mode 100644 index 0000000..3b07c60 --- /dev/null +++ b/fsw/unit_test/lc_platform_cfg.h @@ -0,0 +1,249 @@ + /************************************************************************* + ** File: + ** $Id: lc_platform_cfg.h 1.4 2017/03/07 17:35:08EST mdeschu Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** CFS Limit Checker (LC) Application Platform Configuration Header File + ** + ** Notes: + ** + ** + *************************************************************************/ +#ifndef _lc_platform_cfg_ +#define _lc_platform_cfg_ + +/** \lccfg Application Name +** +** \par Description: +** This definition must match the name used at startup by the cFE +** Executive Services when creating the LC application. Note that +** application names are also an argument to certain cFE commands. +** For example, the application name is needed to access tables +** via cFE Table Services commands. +** +** \par Limits: +** LC requires that this name be defined, but otherwise places +** no limits on the definition. Refer to CFE Executive Services +** for specific information on limits related to application names. +*/ +#define LC_APP_NAME "LC" + + +/** \lccfg Command Pipe Depth +** +** \par Description: +** Maximum number of messages that will be allowed in the +** LC command pipe at one time. Used during initialization +** in the call to #CFE_SB_CreatePipe +** +** \par Limits: +** This parameter can't be larger than an unsigned 16 bit +** integer (65535). +*/ +#define LC_PIPE_DEPTH 12 + +/** \lccfg Maximum number of watchpoints +** +** \par Description: +** Maximum number of watchpoints that can be defined in the +** Watchpoint Definition Table (WDT) +** +** \par Limits: +** This parameter can't be larger than 65520 (0xFFF0) because +** higher values are reserved for use as Reverse Polish +** operators. It must be a multiple of 4 to avoid +** indexing past the end of the array as LC indexes +** ahead to build the packed status bytes. +** +** This parameter will dictate the size of the Watchpoint +** Definition Table: +** +** WDT Size = LC_MAX_WATCHPOINTS * sizeof(#LC_WDTEntry_t) +** +** The total size of this table should not exceed the +** cFE size limit for a single buffered table set by the +** #CFE_TBL_MAX_SNGL_TABLE_SIZE parameter +*/ +#define LC_MAX_WATCHPOINTS 176 + +/** \lccfg Maximum number of actionpoints +** +** \par Description: +** Maximum number of actionpoints that can be defined in the +** Actionpoint Definition Table (ADT) +** +** \par Limits: +** This parameter can't be larger than an unsigned 16 bit +** integer (65535). It must be a multiple of 2 to avoid +** indexing past the end of the array as LC indexes +** ahead to build the packed status bytes. +** +** +** This parameter will dictate the size of the Actionpoint +** Definition Table: +** +** ADT Size = LC_MAX_ACTIONPOINTS * sizeof(#LC_ADTEntry_t) +** +** The total size of this table should not exceed the +** cFE size limit for a single buffered table set by the +** #CFE_TBL_MAX_SNGL_TABLE_SIZE parameter +*/ +#define LC_MAX_ACTIONPOINTS 176 + +/** \lccfg LC state after power-on reset +** +** \par Description: +** What operating state LC should initialize to after a power-on +** reset. +** +** \par Limits: +** This parameter must be one of the following: +** #LC_STATE_ACTIVE +** #LC_STATE_PASSIVE +** #LC_STATE_DISABLED +*/ +#define LC_STATE_POWER_ON_RESET LC_STATE_DISABLED + +/** \lccfg Save data to CDS compiler switch +** +** \par Description: +** Compile switch that tells LC that we should save data +** over a processor or application reset by using the +** Critical Data Store (CDS). +** Comment out or \#undef to force LC to do a default (power-on) +** initialization sequence on all restarts (this is the +** default case). +** +** \par Limits: +** n/a +*/ +// #define LC_SAVE_TO_CDS */ + +/** \lccfg LC state when CDS is restored +** +** \par Description: +** What operating state LC should initialize to after successfully +** restoring information from the CDS after a processor or +** application reset. This is only used when #LC_SAVE_TO_CDS +** is set to TRUE, and provides a way to override any state LC +** may have been operating in prior to the reset occurring. +** +** \par Limits: +** This parameter must be one of the following: +** #LC_STATE_ACTIVE +** #LC_STATE_PASSIVE +** #LC_STATE_DISABLED +** #LC_STATE_FROM_CDS +*/ +#define LC_STATE_WHEN_CDS_RESTORED LC_STATE_FROM_CDS + +/** \lccfg Watchpoint Definition Table (WDT) filename +** +** \par Description: +** Default file to load the watchpoint definition table from +** during a power-on reset sequence +** +** \par Limits: +** This string shouldn't be longer than #OS_MAX_PATH_LEN for the +** target platform in question +*/ +#define LC_WDT_FILENAME "/cf/apps/lc_def_wdt.tbl" + +/** \lccfg Actionpoint Definition Table (ADT) filename +** +** \par Description: +** Default file to load the actionpoint definition table from +** during a power-on reset sequence +** +** \par Limits: +** This string shouldn't be longer than #OS_MAX_PATH_LEN for the +** target platform in question +*/ +#define LC_ADT_FILENAME "/cf/apps/lc_def_adt.tbl" + +/** \lccfg Maximum reverse polish (RPN) equation size +** +** \par Description: +** Maximum combined number of operators and operands that may +** exist in an actionpoint definition's reverse polish equation +** +** \par Limits: +** The LC app does not place a limit on this parameter. +** However, raising this value will increase the size of the +** Actionpoint Definition Table (ADT) +*/ +#define LC_MAX_RPN_EQU_SIZE 20 + +/** \lccfg Maximum actionpoint event text string size +** +** \par Description: +** Maximum length of the event message string that can specified +** in an actionpoint definition (including NUL terminator) +** +** \par Limits: +** LC appends the trailer text #LC_AP_EVENT_TAIL_STR to this +** string when reporting actionpoint failures. The size of this +** string is #LC_AP_EVENT_TAIL_LEN +** +** The total value of LC_MAX_ACTION_TEXT + #LC_AP_EVENT_TAIL_LEN +** should be less than #CFE_EVS_MAX_MESSAGE_LENGTH to avoid +** event message truncation +** +** Raising this value will also increase the size of the +** Actionpoint Definition Table (ADT) +*/ +#define LC_MAX_ACTION_TEXT 32 + +/** \lccfg Maximum valid ADT RTS ID +** +** \par Description: +** The maximum RTS ID that LC will allow during table +** validation in a Actionpoint Definition Table (ADT) entry +** +** \par Limits: +** This parameter can't be larger than an unsigned 16 bit +** integer (65535). +*/ +#define LC_MAX_VALID_ADT_RTSID 0xFFF0 + +/** \lccfg Floating Point Compare Tolerance +** +** \par Description: +** Difference between 2 floats that will still compare as + equal. The default value of (1.0e-25) was taken from + the GNC file mathconstants.h +** +** \par Limits: +** The LC app does not place a limit on this parameter. +*/ +#define LC_FLOAT_TOLERANCE (1.0e-25) + +/** \mmcfg Mission specific version number for LC application +** +** \par Description: +** An application version number consists of four parts: +** major version number, minor version number, revision +** number and mission specific revision number. The mission +** specific revision number is defined here and the other +** parts are defined in "lc_version.h". +** +** \par Limits: +** Must be defined as a numeric value that is greater than +** or equal to zero. +*/ +#define LC_MISSION_REV 0 + +#endif /*_lc_platform_cfg_*/ + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_test_log_altconfig.txt b/fsw/unit_test/lc_test_log_altconfig.txt new file mode 100644 index 0000000..5fbcfd4 --- /dev/null +++ b/fsw/unit_test/lc_test_log_altconfig.txt @@ -0,0 +1,1399 @@ +############################################################################## +## $Id: lc_test_log_altconfig.txt 1.5 2017/07/06 12:26:37EDT mdeschu Exp $ +## +## Purpose: CFS LC application unit test baseline output log +## +## Author: Charles Zogby +## +############################################################################## + +LC 2.1.0.0 Unit Test Output for default configuration (LC_SAVE_TO_CDS defined): + +./lc_testrunner.exe + +Running Test: LC_AppMain_Test_RegisterAppError +CRITICAL EVENT ID=1 Task terminating, err = 0xFFFFFFFF +SYSTEM LOG: LC task terminating, err = 0xFFFFFFFF + +PASS: Task terminating, err = 0xFFFFFFFF +PASS: LC task terminating, err = 0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppInit_Test_EVSInitError +SYSTEM LOG: LC App: Error Registering For Event Services, RC = 0xFFFFFFFF + +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AppInit_Test_SBInitError +ERROR EVENT ID=3 Error Creating LC Pipe, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppInit_Test_TableInitError +ERROR EVENT ID=15 Error (RC=0xFFFFFFFF) Loading WDT with '/cf/apps/lc_def_wdt.tbl' +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_EvsInit_Test_Nominal +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvsInit_Test_EVSRegisterError +SYSTEM LOG: LC App: Error Registering For Event Services, RC = 0xFFFFFFFF + +PASS: Result == -1 +PASS: LC App: Error Registering For Event Services, RC = 0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SbInit_Test_Nominal +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SbInit_Test_CreatePipeError +ERROR EVENT ID=3 Error Creating LC Pipe, RC=0xFFFFFFFF +PASS: Error Creating LC Pipe, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SbInit_Test_SubscribeHKReqError +ERROR EVENT ID=4 Error Subscribing to HK Request, MID=0x18A5, RC=0xFFFFFFFF +PASS: Error Subscribing to HK Request, MID=0x18A5, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SbInit_Test_SubscribeGndCmdError +ERROR EVENT ID=5 Error Subscribing to GND CMD, MID=0x18A4, RC=0xFFFFFFFF +PASS: Error Subscribing to GND CMD, MID=0x18A4, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SbInit_Test_SubscribeSampleCmdError +ERROR EVENT ID=6 Error Subscribing to Sample CMD, MID=0x18A6, RC=0xFFFFFFFF +PASS: Error Subscribing to Sample CMD, MID=0x18A6, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_CreateTaskCDSError +ERROR EVENT ID=12 Error registering WRT CDS Area, RC=0xFFFFFFFF +ERROR EVENT ID=15 Error (RC=0xCC000013) Loading WDT with '/cf/apps/lc_def_wdt.tbl' +PASS: LC_OperData.HaveActiveCDS == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_TableInit_Test_CDSRestored +INFO EVENT ID=21 Previous state restored from Critical Data Store +PASS: Result == CFE_SUCCESS +PASS: Previous state restored from Critical Data Store +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_CDSUpdated +ERROR EVENT ID=12 Error registering WRT CDS Area, RC=0xFFFFFFFF +INFO EVENT ID=22 Default state loaded and written to CDS, activity mask = 0x00991999 +PASS: Result == CFE_SUCCESS +PASS: Default state loaded and written to CDS, activity mask = 0x00991999 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_TableInit_Test_CreateResultTablesError +ERROR EVENT ID=10 Error registering WRT, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_LoadDefaultTables +ERROR EVENT ID=15 Error (RC=0xFFFFFFFF) Loading WDT with '/cf/apps/lc_def_wdt.tbl' +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_GetWDTAddressError +ERROR EVENT ID=19 Error getting WDT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error getting WDT address, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_GetADTAddressError +ERROR EVENT ID=20 Error getting ADT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error getting ADT address, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateResultTables_Test_Nominal +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WRT_TBL_CREATED | LC_ART_TBL_CREATED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateResultTables_Test_WRTRegisterError +ERROR EVENT ID=10 Error registering WRT, RC=0xFFFFFFFF +PASS: Error registering WRT, RC=0xFFFFFFFF +PASS: LC_OperData.TableResults == 0 +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateResultTables_Test_WRTGetAddressError +ERROR EVENT ID=17 Error getting WRT address, RC=0xFFFFFFFF +PASS: Error getting WRT address, RC=0xFFFFFFFF +PASS: LC_OperData.TableResults == 0 +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateResultTables_Test_ARTRegisterError +ERROR EVENT ID=11 Error registering ART, RC=0xFFFFFFFF +PASS: Error registering ART, RC=0xFFFFFFFF +PASS: LC_OperData.TableResults == LC_WRT_TBL_CREATED +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateResultTables_Test_ARTGetAddressError +ERROR EVENT ID=18 Error getting ART address, RC=0xFFFFFFFF +PASS: Error getting ART address, RC=0xFFFFFFFF +PASS: LC_OperData.TableResults == LC_WRT_TBL_CREATED +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateDefinitionTables_Test_NominalCDSActive +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_ADT_CRITICAL_TBL) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_NominalCDSInactive +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_NOT_CRITICAL | LC_ADT_NOT_CRITICAL) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_WDTReRegisterThenInfoRecovered +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HaveActiveCDS == FALSE +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_CRITICAL_TBL | LC_ADT_TBL_RESTORED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_ADTReRegisterThenInfoRecovered +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HaveActiveCDS == FALSE +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_CRITICAL_TBL | LC_ADT_TBL_RESTORED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_WDTReRegisterError +ERROR EVENT ID=8 Error re-registering WDT, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_NOT_CRITICAL) +PASS: Error re-registering WDT, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateDefinitionTables_Test_WDTCriticalADTNoncritical +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_NOT_CRITICAL | LC_WDT_NOT_CRITICAL) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_WDTRegisterError +ERROR EVENT ID=7 Error registering WDT, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error registering WDT, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateDefinitionTables_Test_ADTRegisterError +ERROR EVENT ID=9 Error registering ADT, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error registering ADT, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateTaskCDS_Test_NominalPowerOnReset +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED | LC_APP_CDS_CREATED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateTaskCDS_Test_NominalProcessorReset +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED | LC_APP_CDS_CREATED | LC_WRT_CDS_RESTORED | LC_ART_CDS_RESTORED | LC_APP_CDS_RESTORED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateTaskCDS_Test_WRTRegisterCDSError +ERROR EVENT ID=12 Error registering WRT CDS Area, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_OperData.TableResults == 0 +PASS: Error registering WRT CDS Area, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateTaskCDS_Test_ARTRegisterCDSError +ERROR EVENT ID=13 Error registering ART CDS Area, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_OperData.TableResults == LC_WRT_CDS_CREATED +PASS: Error registering ART CDS Area, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateTaskCDS_Test_AppDataRegisterCDSError +ERROR EVENT ID=14 Error registering application data CDS Area, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED) +PASS: Error registering application data CDS Area, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_NominalActiveCDS +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA | LC_CDS_UPDATED) +PASS: LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_LoadDefaultTables_Test_ActiveCDSNotSuccess +ERROR EVENT ID=46 Unable to update watchpoint results in CDS, RC=0xFFFFFFFF +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA +PASS: LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET +PASS: LC_OperData.HaveActiveCDS == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_NominalInactiveCDS +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA) +PASS: LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_LoadDefaultTables_Test_LoadWDTError +ERROR EVENT ID=15 Error (RC=0xFFFFFFFF) Loading WDT with '/cf/apps/lc_def_wdt.tbl' +PASS: Error (RC=0xFFFFFFFF) Loading WDT with '/cf/apps/lc_def_wdt.tbl' +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_GetWDTAddressError +ERROR EVENT ID=19 Error getting WDT address, RC=0xFFFFFFFF +PASS: Error getting WDT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_LoadADTError +ERROR EVENT ID=16 Error (RC=0xCC000013) Loading ADT with '/cf/apps/lc_def_adt.tbl' +PASS: Error (RC=0xCC000013) Loading ADT with '/cf/apps/lc_def_adt.tbl' +PASS: Result == 0xCC000013 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_GetADTAddressError +ERROR EVENT ID=20 Error getting ADT address, RC=0xCC000001 +PASS: Error getting ADT address, RC=0xCC000001 +PASS: Result == 0xCC000001 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleAPs_Test_SingleActionPointNominal +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleAPs_Test_SingleActionPointError +ERROR EVENT ID=57 Sample AP error, invalid current AP state: AP = 0, State = 255 +PASS: Sample AP error, invalid current AP state: AP = 0, State = 255 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleAPs_Test_MultiActionPointNominal +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleSingleAP_Test_StateChangePassToFail +INFO EVENT ID=58 AP state change from PASS to FAIL: AP = 0 +DEBUG EVENT ID=59 AP failed while LC App passive: AP = 0, FailCount = 1, RTS = 0 +PASS: LC_AppData.APSampleCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_FAIL +PASS: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeFailCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].PassToFailCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1 +PASS: AP state change from PASS to FAIL: AP = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_SampleSingleAP_Test_ActiveRequestRTS +PKT: 18 A9 C0 00 00 03 00 04 00 00 +INFO EVENT ID=1 Event Message: AP = 0, FailCount = 6, RTS = 0 +PASS: LC_OperData.ARTPtr[APNumber].CurrentState == LC_APSTATE_PASSIVE +PASS: LC_OperData.ARTPtr[APNumber].CumulativeRTSExecCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1 +PASS: LC_AppData.RTSExecCount == 1 +PASS: Event Message: AP = 0, FailCount = 6, RTS = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleSingleAP_Test_APFailWhileLCStatePassive +DEBUG EVENT ID=59 AP failed while LC App passive: AP = 0, FailCount = 6, RTS = 0 +PASS: LC_OperData.ARTPtr[APNumber].CurrentState == LC_APSTATE_PASSIVE +PASS: LC_AppData.PassiveRTSExecCount == 1 +PASS: AP failed while LC App passive: AP = 0, FailCount = 6, RTS = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleSingleAP_Test_APFailWhilePassive +INFO EVENT ID=60 AP failed while passive: AP = 0, FailCount = 6, RTS = 0 +PASS: LC_OperData.ARTPtr[APNumber].PassiveAPCount == 5 +PASS: LC_OperData.ARTPtr[APNumber].PassiveAPCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1 +PASS: AP failed while passive: AP = 0, FailCount = 6, RTS = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleSingleAP_Test_StateChangeFailToPass +INFO EVENT ID=61 AP state change from FAIL to PASS: AP = 0 +PASS: LC_AppData.APSampleCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_PASS +PASS: LC_OperData.ARTPtr[APNumber].FailToPassCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1 +PASS: AP state change from FAIL to PASS: AP = 0 +PASS: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleSingleAP_Test_ActionStale +PASS: LC_AppData.APSampleCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_STALE +PASS: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleSingleAP_Test_ActionError +ERROR EVENT ID=62 AP evaluated to error: AP = 0, Result = 2 +PASS: LC_AppData.APSampleCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_ERROR +PASS: AP evaluated to error: AP = 0, Result = 2 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_EvaluateRPN_Test_AndWatchFalseOp1 +PASS: Result == LC_ACTION_PASS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndWatchFalseOp2 +PASS: Result == LC_ACTION_PASS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrWatchTrueOp1 +PASS: Result == LC_ACTION_FAIL +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrWatchTrueOp2 +PASS: Result == LC_ACTION_FAIL +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndWatchErrorOp1 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndWatchErrorOp2 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrWatchErrorOp1 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrWatchErrorOp2 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorWatchErrorOp1 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorWatchErrorOp2 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_NotWatchError +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndStaleOp1 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndStaleOp2 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrStaleOp1 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrStaleOp2 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorStaleOp1 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorStaleOp2 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_NotStale +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndNominal +PASS: Result == LC_ACTION_FAIL +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrNominal +PASS: Result == LC_ACTION_PASS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorNominal +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_NotNominal +PASS: Result == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_EqualIllegalRPN +ERROR EVENT ID=63 AP has illegal RPN expression: AP = 0, LastOperand = 2, StackPtr = 1 +PASS: AP has illegal RPN expression: AP = 0, LastOperand = 2, StackPtr = 1 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_EvaluateRPN_Test_WatchpointNumberNominal +PASS: Result == 77 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_DefaultIllegalRPN +ERROR EVENT ID=63 AP has illegal RPN expression: AP = 0, LastOperand = 0, StackPtr = 0 +PASS: Result == LC_ACTION_ERROR +PASS: AP has illegal RPN expression: AP = 0, LastOperand = 0, StackPtr = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_EvaluateRPN_Test_EndOfBufferWhenNotDone +ERROR EVENT ID=63 AP has illegal RPN expression: AP = 0, LastOperand = 19, StackPtr = 20 +PASS: Result == LC_ACTION_ERROR +PASS: AP has illegal RPN expression: AP = 0, LastOperand = 19, StackPtr = 20 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateADT_Test_ActionNotUsed +INFO EVENT ID=66 ADT verify results: good = 0, bad = 0, unused = 176 +PASS: Result == CFE_SUCCESS +PASS: ADT verify results: good = 0, bad = 0, unused = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateADT_Test_InvalidDefaultState +ERROR EVENT ID=65 ADT verify err: AP = 0, Err = 1, State = 99, RTS = 88, FailCnt = 77, EvtType = 66 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_DEFSTATE +PASS: ADT verify err: AP = 0, Err = 1, State = 99, RTS = 88, FailCnt = 77, EvtType = 66 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_BadRtsID +ERROR EVENT ID=65 ADT verify err: AP = 0, Err = 2, State = 1, RTS = 65521, FailCnt = 77, EvtType = 66 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_RTSID +PASS: ADT verify err: AP = 0, Err = 2, State = 1, RTS = 65521, FailCnt = 77, EvtType = 66 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_BadFailCount +ERROR EVENT ID=65 ADT verify err: AP = 0, Err = 3, State = 1, RTS = 1, FailCnt = 0, EvtType = 66 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_FAILCNT +PASS: ADT verify err: AP = 0, Err = 3, State = 1, RTS = 1, FailCnt = 0, EvtType = 66 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_InvalidEventType +ERROR EVENT ID=65 ADT verify err: AP = 0, Err = 4, State = 1, RTS = 1, FailCnt = 88, EvtType = 99 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_EVTTYPE +PASS: ADT verify err: AP = 0, Err = 4, State = 1, RTS = 1, FailCnt = 88, EvtType = 99 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_ValidateRpnAdtValError +ERROR EVENT ID=64 ADT verify RPN err: AP = 0, Index = 0, StackDepth = 0 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_RPN +PASS: ADT verify RPN err: AP = 0, Index = 0, StackDepth = 0 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_ValidateRpnAdtValNoError +INFO EVENT ID=66 ADT verify results: good = 176, bad = 0, unused = 0 +PASS: Result == LC_ADTVAL_NO_ERR +PASS: ADT verify results: good = 176, bad = 0, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateRPN_Test_RpnAnd +PASS: Result == LC_ADTVAL_NO_ERR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_RpnOr +PASS: Result == LC_ADTVAL_NO_ERR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_RpnXor +PASS: Result == LC_ADTVAL_NO_ERR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_RpnNot +PASS: Result == LC_ADTVAL_NO_ERR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_StackDepthZero +PASS: Result == LC_ADTVAL_ERR_RPN +PASS: IndexValue == 0 +PASS: StackDepthValue == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_InvalidBufferItem +PASS: Result == LC_ADTVAL_ERR_RPN +PASS: IndexValue == 0 +PASS: StackDepthValue == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AppPipe_Test_SampleAPRequest +ERROR EVENT ID=42 Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 1, Expected = 14 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_HousekeepingRequest +ERROR EVENT ID=41 Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 1, Expected = 8 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_Noop +INFO EVENT ID=26 No-op command: Version 2.1.0.0 +PASS: Result == CFE_SUCCESS +PASS: No-op command: Version 2.1.0.0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_Reset +DEBUG EVENT ID=27 Reset counters command +PASS: Result == CFE_SUCCESS +PASS: Reset counters command +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_SetLCState +ERROR EVENT ID=29 Set LC state error: invalid state = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_SetAPState +ERROR EVENT ID=30 Set AP state error: AP = 0, Invalid new state = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_SetAPPermoff +ERROR EVENT ID=35 Set AP perm off error, AP NOT Disabled: AP = 0, Current state = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_ResetAPStats +INFO EVENT ID=38 Reset AP stats command: AP = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_ResetWPStats +INFO EVENT ID=40 Reset WP stats command: WP = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_InvalidCommandCode +ERROR EVENT ID=24 Invalid command code: ID = 0x18A4, CC = 99 +PASS: Result == CFE_SUCCESS +PASS: Invalid command code: ID = 0x18A4, CC = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_MonitorPacket +INFO EVENT ID=49 Msg with unreferenced message ID rcvd: ID = 0x0063 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleAPReq_Test_AllowSampleAllWatchStale +PASS: LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleAPReq_Test_StartLessOrEqualToEndAndEndWithinArrayWatchStale +PASS: LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleAPReq_Test_ArrayIndexOutOfRange +ERROR EVENT ID=25 Sample AP error: invalid AP number, start = 2, end = 1 +PASS: Sample AP error: invalid AP number, start = 2, end = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_HousekeepingReq_Test_WatchStale +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_WatchFalse +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_WatchTrue +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_WatchError +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_DefaultWatchResult +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_ActionNotUsedStale +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_APStateActiveActionPass +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.ActiveAPs = LC_MAX_ACTIONPOINTS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_APStatePassiveActionFail +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_APStateDisabledActionError +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_APStatePermOffActionError +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_DefaultCurrentStateAndActionResult +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_ManageTablesError +PKT: 00 00 00 00 00 00 00 +ERROR EVENT ID=19 Error getting WDT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_HousekeepingReq_Test_UpdateTaskCDSNotSuccess +PKT: 00 00 00 00 00 00 00 +ERROR EVENT ID=46 Unable to update watchpoint results in CDS, RC=0xFFFFFFFF +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HaveActiveCDS == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetCounters_Test +PASS: LC_AppData.CmdCount == 0 +PASS: LC_AppData.CmdErrCount == 0 +PASS: LC_AppData.APSampleCount == 0 +PASS: LC_AppData.MonitoredMsgCount == 0 +PASS: LC_AppData.RTSExecCount == 0 +PASS: LC_AppData.PassiveRTSExecCount == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SetLCStateCmd_Test_Active +INFO EVENT ID=28 Set LC state command: new state = 1 +PASS: LC_AppData.CurrentLCState == LC_STATE_ACTIVE +PASS: LC_AppData.CmdCount == 1 +PASS: Set LC state command: new state = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetLCStateCmd_Test_Passive +INFO EVENT ID=28 Set LC state command: new state = 2 +PASS: LC_AppData.CurrentLCState == LC_STATE_PASSIVE +PASS: LC_AppData.CmdCount == 1 +PASS: Set LC state command: new state = 2 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetLCStateCmd_Test_Disabled +INFO EVENT ID=28 Set LC state command: new state = 3 +PASS: LC_AppData.CurrentLCState == LC_STATE_DISABLED +PASS: LC_AppData.CmdCount == 1 +PASS: Set LC state command: new state = 3 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetLCStateCmd_Test_Default +ERROR EVENT ID=29 Set LC state error: invalid state = 99 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set LC state error: invalid state = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_Default +ERROR EVENT ID=30 Set AP state error: AP = 1, Invalid new state = 99 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: AP = 1, Invalid new state = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_SetAllActionPointsActive +INFO EVENT ID=33 Set AP state command: AP = 65535, New state = 1 +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE +PASS: Set AP state command: AP = 65535, New state = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_SetAllActionPointsPassive +INFO EVENT ID=33 Set AP state command: AP = 65535, New state = 2 +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE +PASS: Set AP state command: AP = 65535, New state = 2 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_SetAllActionPointsDisabled +INFO EVENT ID=33 Set AP state command: AP = 65535, New state = 3 +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED +PASS: Set AP state command: AP = 65535, New state = 3 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_UpdateSingleActionPointActive +INFO EVENT ID=33 Set AP state command: AP = 175, New state = 1 +PASS: LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_ACTIVE +PASS: Set AP state command: AP = 175, New state = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_UpdateSingleActionPointPassive +INFO EVENT ID=33 Set AP state command: AP = 175, New state = 2 +PASS: LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_PASSIVE +PASS: Set AP state command: AP = 175, New state = 2 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_UpdateSingleActionPointDisabled +INFO EVENT ID=33 Set AP state command: AP = 175, New state = 3 +PASS: LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_DISABLED +PASS: Set AP state command: AP = 175, New state = 3 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidCurrentAPStateActive +ERROR EVENT ID=31 Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidCurrentAPStatePassive +ERROR EVENT ID=31 Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidCurrentAPStateDisabled +ERROR EVENT ID=31 Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidAPNumberActive +ERROR EVENT ID=32 Set AP state error: Invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: Invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidAPNumberPassive +ERROR EVENT ID=32 Set AP state error: Invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: Invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidAPNumberDisabled +ERROR EVENT ID=32 Set AP state error: Invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: Invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPPermOffCmd_Test_InvalidAPNumberMaxActionpoints +ERROR EVENT ID=34 Set AP perm off error: Invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP perm off error: Invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPPermOffCmd_Test_InvalidAPNumberAllActionpoints +ERROR EVENT ID=34 Set AP perm off error: Invalid AP number = 65535 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP perm off error: Invalid AP number = 65535 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPPermOffCmd_Test_APNotDisabled +ERROR EVENT ID=35 Set AP perm off error, AP NOT Disabled: AP = 1, Current state = 99 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP perm off error, AP NOT Disabled: AP = 1, Current state = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPPermOffCmd_Test_Nominal +INFO EVENT ID=36 Set AP permanently off command: AP = 1 +PASS: LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == 4 +PASS: LC_AppData.CmdCount == 1 +PASS: Set AP permanently off command: AP = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetAPStatsCmd_Test_AllActionPoints +INFO EVENT ID=38 Reset AP stats command: AP = 65535 +PASS: LC_AppData.CmdCount == 1 +PASS: Reset AP stats command: AP = 65535 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetAPStatsCmd_Test_SingleActionPoint +INFO EVENT ID=38 Reset AP stats command: AP = 175 +PASS: LC_AppData.CmdCount == 1 +PASS: Reset AP stats command: AP = 175 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetAPStatsCmd_Test_InvalidAPNumber +ERROR EVENT ID=37 Reset AP stats error: invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Reset AP stats error: invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetResultsAP_Test +PASS: LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == 1 +PASS: LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeEventMsgsSent == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == 1 +PASS: LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == 1 +PASS: LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ResetWPStatsCmd_Test_AllWatchPoints +INFO EVENT ID=40 Reset WP stats command: WP = 65535 +PASS: LC_AppData.CmdCount == 1 +PASS: Reset WP stats command: WP = 65535 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetWPStatsCmd_Test_SingleWatchPoint +INFO EVENT ID=40 Reset WP stats command: WP = 175 +PASS: LC_AppData.CmdCount == 1 +PASS: Reset WP stats command: WP = 175 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetWPStatsCmd_Test_InvalidWPNumber +ERROR EVENT ID=39 Reset WP stats error: invalid WP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Reset WP stats error: invalid WP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetResultsWP_Test +PASS: LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE +PASS: LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0 +PASS: LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE +PASS: LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0 +PASS: LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE +PASS: LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0 +PASS: LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_VerifyMsgLength_Test_HKRequestLengthError +ERROR EVENT ID=41 Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 1, Expected = 8 +PASS: Result == FALSE +PASS: Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 1, Expected = 8 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_VerifyMsgLength_Test_APSampleLengthError +ERROR EVENT ID=42 Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 1, Expected = 8 +PASS: Result == FALSE +PASS: Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 1, Expected = 8 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_VerifyMsgLength_Test_GenericLengthError +ERROR EVENT ID=43 Invalid msg length: ID = 0x0001, CC = 0, Len = 1, Expected = 8 +PASS: Result == FALSE +PASS: Invalid AP sample msg length: ID = 0x0001, CC = 0, Len = 1, Expected = 8 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_VerifyMsgLength_Test_Nominal +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ManageTables_Test_InfoUpdated +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ManageTables_Test_WDTGetAddressError +ERROR EVENT ID=19 Error getting WDT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error getting WDT address, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ManageTables_Test_ADTGetAddressError +ERROR EVENT ID=20 Error getting ADT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error getting ADT address, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UpdateTaskCDS_Test_UpdateWatchpointError +ERROR EVENT ID=46 Unable to update watchpoint results in CDS, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Unable to update watchpoint results in CDS, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UpdateTaskCDS_Test_UpdateActionpointError +ERROR EVENT ID=47 Unable to update actionpoint results in CDS, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Unable to update actionpoint results in CDS, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UpdateTaskCDS_Test_UpdateAppDataError +ERROR EVENT ID=48 Unable to update application data in CDS, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_AppData.CDSSavedOnExit == LC_CDS_SAVED +PASS: Unable to update application data in CDS, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UpdateTaskCDS_Test_Nominal +PASS: Result == CFE_SUCCESS +PASS: LC_AppData.CDSSavedOnExit == LC_CDS_SAVED +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ExecuteRTS_Test +PKT: 18 A9 C0 00 00 03 00 04 01 00 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CustomFunction_Test_WatchIndex0 +ERROR EVENT ID=67 Unexpected LC_CustomFunction call: WP = 0 +PASS: Unexpected LC_CustomFunction call: WP = 0 +PASS: Result == LC_WATCH_FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CustomFunction_Test_WatchIndex1 +ERROR EVENT ID=67 Unexpected LC_CustomFunction call: WP = 1 +PASS: Unexpected LC_CustomFunction call: WP = 1 +PASS: Result == LC_WATCH_FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateHashTable_Test_UnsubscribeError +ERROR EVENT ID=44 Error unsubscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF +PASS: Error unsubscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateHashTable_Test_NominalAllSameMID +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AddWatchpoint_Test_HashTableAndWatchPtListNullPointersNominal +PASS: LC_OperData.HashTable[HashTableIndex] == &LC_OperData.MessageLinks[0] +PASS: LC_OperData.MessageLinks[0].MessageID == 1 +PASS: LC_OperData.MessageLinks[0].WatchPtList == &LC_OperData.WatchPtLinks[0] +PASS: Result == &LC_OperData.WatchPtLinks[0] +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AddWatchpoint_Test_HashTableAndWatchPtListNotNullPointerTwoMsgLinksMIDFound +PASS: Result == &LC_OperData.WatchPtLinks[0] +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AddWatchpoint_Test_NullPointersErrorSubscribingWatchpoint +ERROR EVENT ID=45 Error subscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF +PASS: Error subscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CheckMsgForWPs_Test_Nominal +ERROR EVENT ID=67 Unexpected LC_CustomFunction call: WP = 0 +PASS: LC_AppData.MonitoredMsgCount == 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CheckMsgForWPs_Test_UnreferencedMessageID +INFO EVENT ID=49 Msg with unreferenced message ID rcvd: ID = 0x0001 +PASS: Msg with unreferenced message ID rcvd: ID = 0x0001 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ProcessWP_Test_CustomFunctionWatchFalse +ERROR EVENT ID=67 Unexpected LC_CustomFunction call: WP = 0 +PASS: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_FALSE +PASS: LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1 +PASS: Unexpected LC_CustomFunction call: WP = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ProcessWP_Test_OperatorCompareError +ERROR EVENT ID=51 WP has invalid operator ID: WP = 0, OperID = 99 +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR +PASS: LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ProcessWP_Test_OperatorCompareWatchTruePreviousStale +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_TRUE +PASS: LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].CumulativeTrueCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].FalseToTrueCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Value == 0 +PASS: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Seconds == 3 +PASS: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Subseconds == 5 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ProcessWP_Test_OperatorCompareWatchFalsePreviousStale +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_FALSE +PASS: LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Value == 0 +PASS: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Seconds == 3 +PASS: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Subseconds == 5 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataByte +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataWordLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataDWordLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataUByte +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataUWordLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataUDWordLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataFloatLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataTypeError +ERROR EVENT ID=50 WP has undefined data type: WP = 0, DataType = 99 +PASS: Result == LC_WATCH_ERROR +PASS: WP has undefined data type: WP = 0, DataType = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SignedCompare_Test_LE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_LT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_EQ +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_NE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_GT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_GE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_InvalidOperatorID +ERROR EVENT ID=51 WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Result == LC_WATCH_ERROR +PASS: WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UnsignedCompare_Test_LE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_LT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_EQ +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_NE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_GT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_GE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_InvalidOperatorID +ERROR EVENT ID=51 WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Result == LC_WATCH_ERROR +PASS: WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_FloatCompare_Test_LE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_LT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_EQ +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_NE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_GT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_GE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_InvalidOperatorID +ERROR EVENT ID=51 WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Result == LC_WATCH_ERROR +PASS: WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_FloatCompare_Test_NaN +ERROR EVENT ID=52 WP data value is a float NAN: WP = 0, Value = 0x7F8FFFFF +PASS: Result == LC_WATCH_ERROR +PASS: WP data value is a float NAN: WP = 0, Value = 0x7F8FFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_WPOffsetValid_Test_DataUByte +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_WPOffsetValid_Test_UWordLE +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_WPOffsetValid_Test_UDWordLE +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_WPOffsetValid_Test_FloatLE +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_WPOffsetValid_Test_DataTypeError +ERROR EVENT ID=50 WP has undefined data type: WP = 0, DataType = 99 +PASS: Result == FALSE +PASS: WP has undefined data type: WP = 0, DataType = 99 +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_WPOffsetValid_Test_OffsetError +ERROR EVENT ID=53 WP offset error: MID = 1, WP = 0, Offset = 8, DataSize = 1, MsgLen = 8 +PASS: Result == FALSE +PASS: WP offset error: MID = 1, WP = 0, Offset = 8, DataSize = 1, MsgLen = 8 +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_GetSizedWPData_Test_DataByte +PASS: Result == TRUE +PASS: SizedData == 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataUByte +PASS: Result == TRUE +PASS: SizedData == 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataWordBELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x0102 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataWordLELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x0201 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataUWordBELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x0102 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataUWordLELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x0201 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataFloatBELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x01020304 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataFloatLELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x04030201 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataTypeError +ERROR EVENT ID=50 WP has undefined data type: WP = 0, DataType = 99 +PASS: Result == FALSE +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0 +PASS: WP has undefined data type: WP = 0, DataType = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateWDT_Test_UnusedTableEntry +INFO EVENT ID=56 WDT verify results: good = 0, bad = 0, unused = 176 +PASS: Result == CFE_SUCCESS +PASS: WDT verify results: good = 0, bad = 0, unused = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateWDT_Test_InvalidDataType +ERROR EVENT ID=55 WDT verify err: WP = 0, Err = 1, DType = 99, Oper = 1, MID = 2 +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_DATATYPE +PASS: WDT verify err: WP = 0, Err = 1, DType = 99, Oper = 1, MID = 2 +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_InvalidOperator +ERROR EVENT ID=55 WDT verify err: WP = 0, Err = 2, DType = 1, Oper = 99, MID = 2 +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_OPER +PASS: WDT verify err: WP = 0, Err = 2, DType = 1, Oper = 99, MID = 2 +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_BadMessageID +ERROR EVENT ID=55 WDT verify err: WP = 0, Err = 3, DType = 1, Oper = 1, MID = 8192 +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_MID +PASS: WDT verify err: WP = 0, Err = 3, DType = 1, Oper = 1, MID = 8192 +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_NaN +ERROR EVENT ID=54 WDT verify float err: WP = 0, Err = 4, ComparisonValue = 0x7F8FFFFF +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_FPNAN +PASS: WDT verify float err: WP = 0, Err = 4, ComparisonValue = 0x7F8FFFFF +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_Inf +ERROR EVENT ID=54 WDT verify float err: WP = 0, Err = 5, ComparisonValue = 0x7F800000 +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_FPINF +PASS: WDT verify float err: WP = 0, Err = 5, ComparisonValue = 0x7F800000 +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_FloatingPointPassed +INFO EVENT ID=56 WDT verify results: good = 176, bad = 0, unused = 0 +PASS: Result == LC_WDTVAL_NO_ERR +PASS: WDT verify results: good = 176, bad = 0, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateWDT_Test_NonFloatingPointPassed +INFO EVENT ID=56 WDT verify results: good = 176, bad = 0, unused = 0 +PASS: Result == LC_WDTVAL_NO_ERR +PASS: WDT verify results: good = 176, bad = 0, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_Uint32IsNAN_Test_True +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_Uint32IsNAN_Test_False +PASS: Result == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_Uint32IsInfinite_Test_True +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_Uint32IsInfinite_Test_False +PASS: Result == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Tests Executed: 231 +Assert Pass Count: 761 +Assert Fail Count: 0 + +gcov: '../src/lc_custom.c' 100.00% 11 +gcov: '../src/lc_action.c' 100.00% 199 +gcov: '../src/lc_app.c' 95.02% 241 +gcov: '../src/lc_cmds.c' 100.00% 357 +gcov: '../src/lc_watch.c' 99.71% 341 + diff --git a/fsw/unit_test/lc_test_log_defaultconfig.txt b/fsw/unit_test/lc_test_log_defaultconfig.txt new file mode 100644 index 0000000..ec0bbd7 --- /dev/null +++ b/fsw/unit_test/lc_test_log_defaultconfig.txt @@ -0,0 +1,1432 @@ +############################################################################## +## $Id: lc_test_log_defaultconfig.txt 1.5 2017/07/06 12:26:37EDT mdeschu Exp $ +## +## Purpose: CFS LC application unit test baseline output log +## +## Author: Charles Zogby +## +############################################################################## + +LC 2.1.0.0 Unit Test Output for default configuration (LC_SAVE_TO_CDS not defined): + + + +./lc_testrunner.exe + +Running Test: LC_AppMain_Test_Nominal +INFO EVENT ID=23 LC use of Critical Data Store disabled, activity mask = 0x00991990 +INFO EVENT ID=2 LC Initialized. Version 2.1.0.0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_AppMain_Test_RegisterAppError +CRITICAL EVENT ID=1 Task terminating, err = 0xFFFFFFFF +SYSTEM LOG: LC task terminating, err = 0xFFFFFFFF + +PASS: Task terminating, err = 0xFFFFFFFF +PASS: LC task terminating, err = 0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppMain_Test_AppInitError +ERROR EVENT ID=3 Error Creating LC Pipe, RC=0xFFFFFFFF +CRITICAL EVENT ID=1 Task terminating, err = 0xFFFFFFFF +SYSTEM LOG: LC task terminating, err = 0xFFFFFFFF + +PASS: Task terminating, err = 0xFFFFFFFF +PASS: LC task terminating, err = 0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_AppMain_Test_RcvMsgError +INFO EVENT ID=23 LC use of Critical Data Store disabled, activity mask = 0x00991990 +INFO EVENT ID=2 LC Initialized. Version 2.1.0.0 +CRITICAL EVENT ID=1 Task terminating, err = 0xFFFFFFFF +SYSTEM LOG: LC task terminating, err = 0xFFFFFFFF + +PASS: Task terminating, err = 0xFFFFFFFF +PASS: LC task terminating, err = 0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 3 + +Running Test: LC_AppInit_Test_Nominal +INFO EVENT ID=23 LC use of Critical Data Store disabled, activity mask = 0x00991990 +INFO EVENT ID=2 LC Initialized. Version 2.1.0.0 +PASS: LC Initialized. Version 2.1.0.0 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.MsgPtr == 0 +PASS: LC_OperData.CmdPipe == 0 +PASS: LC_OperData.WRTHandle == 0 +PASS: LC_OperData.WRTDataCDSHandle == 0 +PASS: LC_OperData.ARTDataCDSHandle == 0 +PASS: LC_OperData.AppDataCDSHandle == 0 +PASS: LC_OperData.HaveActiveCDS == 0 +PASS: LC_AppData.CmdCount == 0 +PASS: LC_AppData.CmdErrCount == 0 +PASS: LC_AppData.APSampleCount == 0 +PASS: LC_AppData.MonitoredMsgCount == 0 +PASS: LC_AppData.RTSExecCount == 0 +PASS: LC_AppData.PassiveRTSExecCount == 0 +PASS: LC_AppData.CDSSavedOnExit == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_AppInit_Test_EVSInitError +SYSTEM LOG: LC App: Error Registering For Event Services, RC = 0xFFFFFFFF + +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AppInit_Test_SBInitError +ERROR EVENT ID=3 Error Creating LC Pipe, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppInit_Test_TableInitError +ERROR EVENT ID=15 Error (RC=0xFFFFFFFF) Loading WDT with '/cf/apps/lc_def_wdt.tbl' +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_EvsInit_Test_Nominal +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvsInit_Test_EVSRegisterError +SYSTEM LOG: LC App: Error Registering For Event Services, RC = 0xFFFFFFFF + +PASS: Result == -1 +PASS: LC App: Error Registering For Event Services, RC = 0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SbInit_Test_Nominal +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SbInit_Test_CreatePipeError +ERROR EVENT ID=3 Error Creating LC Pipe, RC=0xFFFFFFFF +PASS: Error Creating LC Pipe, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SbInit_Test_SubscribeHKReqError +ERROR EVENT ID=4 Error Subscribing to HK Request, MID=0x18A5, RC=0xFFFFFFFF +PASS: Error Subscribing to HK Request, MID=0x18A5, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SbInit_Test_SubscribeGndCmdError +ERROR EVENT ID=5 Error Subscribing to GND CMD, MID=0x18A4, RC=0xFFFFFFFF +PASS: Error Subscribing to GND CMD, MID=0x18A4, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SbInit_Test_SubscribeSampleCmdError +ERROR EVENT ID=6 Error Subscribing to Sample CMD, MID=0x18A6, RC=0xFFFFFFFF +PASS: Error Subscribing to Sample CMD, MID=0x18A6, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_CreateResultTablesError +ERROR EVENT ID=10 Error registering WRT, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_CreateDefinitionTablesError +ERROR EVENT ID=7 Error registering WDT, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_LoadDefaultTables +ERROR EVENT ID=15 Error (RC=0xFFFFFFFF) Loading WDT with '/cf/apps/lc_def_wdt.tbl' +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_GetWDTAddressError +ERROR EVENT ID=19 Error getting WDT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error getting WDT address, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_TableInit_Test_GetADTAddressError +ERROR EVENT ID=20 Error getting ADT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error getting ADT address, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateResultTables_Test_Nominal +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WRT_TBL_CREATED | LC_ART_TBL_CREATED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateResultTables_Test_WRTRegisterError +ERROR EVENT ID=10 Error registering WRT, RC=0xFFFFFFFF +PASS: Error registering WRT, RC=0xFFFFFFFF +PASS: LC_OperData.TableResults == 0 +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateResultTables_Test_WRTGetAddressError +ERROR EVENT ID=17 Error getting WRT address, RC=0xFFFFFFFF +PASS: Error getting WRT address, RC=0xFFFFFFFF +PASS: LC_OperData.TableResults == 0 +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateResultTables_Test_ARTRegisterError +ERROR EVENT ID=11 Error registering ART, RC=0xFFFFFFFF +PASS: Error registering ART, RC=0xFFFFFFFF +PASS: LC_OperData.TableResults == LC_WRT_TBL_CREATED +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateResultTables_Test_ARTGetAddressError +ERROR EVENT ID=18 Error getting ART address, RC=0xFFFFFFFF +PASS: Error getting ART address, RC=0xFFFFFFFF +PASS: LC_OperData.TableResults == LC_WRT_TBL_CREATED +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateDefinitionTables_Test_NominalCDSActive +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_ADT_CRITICAL_TBL) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_NominalCDSInactive +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_NOT_CRITICAL | LC_ADT_NOT_CRITICAL) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_WDTReRegisterThenInfoRecovered +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HaveActiveCDS == FALSE +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_CRITICAL_TBL | LC_ADT_TBL_RESTORED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_ADTReRegisterThenInfoRecovered +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HaveActiveCDS == FALSE +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_CRITICAL_TBL | LC_ADT_TBL_RESTORED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_WDTReRegisterError +ERROR EVENT ID=8 Error re-registering WDT, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_NOT_CRITICAL) +PASS: Error re-registering WDT, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateDefinitionTables_Test_WDTCriticalADTNoncritical +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_CRITICAL_TBL | LC_WDT_TBL_RESTORED | LC_ADT_NOT_CRITICAL | LC_WDT_NOT_CRITICAL) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateDefinitionTables_Test_WDTRegisterError +ERROR EVENT ID=7 Error registering WDT, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error registering WDT, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateDefinitionTables_Test_ADTRegisterError +ERROR EVENT ID=9 Error registering ADT, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error registering ADT, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateTaskCDS_Test_NominalPowerOnReset +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED | LC_APP_CDS_CREATED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateTaskCDS_Test_NominalProcessorReset +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED | LC_APP_CDS_CREATED | LC_WRT_CDS_RESTORED | LC_ART_CDS_RESTORED | LC_APP_CDS_RESTORED) +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CreateTaskCDS_Test_WRTRegisterCDSError +ERROR EVENT ID=12 Error registering WRT CDS Area, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_OperData.TableResults == 0 +PASS: Error registering WRT CDS Area, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateTaskCDS_Test_ARTRegisterCDSError +ERROR EVENT ID=13 Error registering ART CDS Area, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_OperData.TableResults == LC_WRT_CDS_CREATED +PASS: Error registering ART CDS Area, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateTaskCDS_Test_AppDataRegisterCDSError +ERROR EVENT ID=14 Error registering application data CDS Area, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_OperData.TableResults == (LC_WRT_CDS_CREATED | LC_ART_CDS_CREATED) +PASS: Error registering application data CDS Area, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_NominalActiveCDS +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA | LC_CDS_UPDATED) +PASS: LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_LoadDefaultTables_Test_ActiveCDSNotSuccess +ERROR EVENT ID=46 Unable to update watchpoint results in CDS, RC=0xFFFFFFFF +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA +PASS: LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET +PASS: LC_OperData.HaveActiveCDS == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_NominalInactiveCDS +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.TableResults == (LC_WDT_DEFAULT_TBL | LC_ADT_DEFAULT_TBL | LC_WRT_DEFAULT_DATA | LC_ART_DEFAULT_DATA | LC_APP_DEFAULT_DATA) +PASS: LC_AppData.CurrentLCState == LC_STATE_POWER_ON_RESET +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_LoadDefaultTables_Test_LoadWDTError +ERROR EVENT ID=15 Error (RC=0xFFFFFFFF) Loading WDT with '/cf/apps/lc_def_wdt.tbl' +PASS: Error (RC=0xFFFFFFFF) Loading WDT with '/cf/apps/lc_def_wdt.tbl' +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_GetWDTAddressError +ERROR EVENT ID=19 Error getting WDT address, RC=0xFFFFFFFF +PASS: Error getting WDT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_LoadADTError +ERROR EVENT ID=16 Error (RC=0xCC000013) Loading ADT with '/cf/apps/lc_def_adt.tbl' +PASS: Error (RC=0xCC000013) Loading ADT with '/cf/apps/lc_def_adt.tbl' +PASS: Result == 0xCC000013 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_LoadDefaultTables_Test_GetADTAddressError +ERROR EVENT ID=20 Error getting ADT address, RC=0xCC000001 +PASS: Error getting ADT address, RC=0xCC000001 +PASS: Result == 0xCC000001 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleAPs_Test_SingleActionPointNominal +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleAPs_Test_SingleActionPointError +ERROR EVENT ID=57 Sample AP error, invalid current AP state: AP = 0, State = 255 +PASS: Sample AP error, invalid current AP state: AP = 0, State = 255 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleAPs_Test_MultiActionPointNominal +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleSingleAP_Test_StateChangePassToFail +INFO EVENT ID=58 AP state change from PASS to FAIL: AP = 0 +DEBUG EVENT ID=59 AP failed while LC App passive: AP = 0, FailCount = 1, RTS = 0 +PASS: LC_AppData.APSampleCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_FAIL +PASS: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeFailCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].PassToFailCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1 +PASS: AP state change from PASS to FAIL: AP = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_SampleSingleAP_Test_ActiveRequestRTS +PKT: 18 A9 C0 00 00 03 00 04 00 00 +INFO EVENT ID=1 Event Message: AP = 0, FailCount = 6, RTS = 0 +PASS: LC_OperData.ARTPtr[APNumber].CurrentState == LC_APSTATE_PASSIVE +PASS: LC_OperData.ARTPtr[APNumber].CumulativeRTSExecCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1 +PASS: LC_AppData.RTSExecCount == 1 +PASS: Event Message: AP = 0, FailCount = 6, RTS = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleSingleAP_Test_APFailWhileLCStatePassive +DEBUG EVENT ID=59 AP failed while LC App passive: AP = 0, FailCount = 6, RTS = 0 +PASS: LC_OperData.ARTPtr[APNumber].CurrentState == LC_APSTATE_PASSIVE +PASS: LC_AppData.PassiveRTSExecCount == 1 +PASS: AP failed while LC App passive: AP = 0, FailCount = 6, RTS = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleSingleAP_Test_APFailWhilePassive +INFO EVENT ID=60 AP failed while passive: AP = 0, FailCount = 6, RTS = 0 +PASS: LC_OperData.ARTPtr[APNumber].PassiveAPCount == 5 +PASS: LC_OperData.ARTPtr[APNumber].PassiveAPCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1 +PASS: AP failed while passive: AP = 0, FailCount = 6, RTS = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleSingleAP_Test_StateChangeFailToPass +INFO EVENT ID=61 AP state change from FAIL to PASS: AP = 0 +PASS: LC_AppData.APSampleCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_PASS +PASS: LC_OperData.ARTPtr[APNumber].FailToPassCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].CumulativeEventMsgsSent == 1 +PASS: AP state change from FAIL to PASS: AP = 0 +PASS: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleSingleAP_Test_ActionStale +PASS: LC_AppData.APSampleCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_STALE +PASS: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleSingleAP_Test_ActionError +ERROR EVENT ID=62 AP evaluated to error: AP = 0, Result = 2 +PASS: LC_AppData.APSampleCount == 1 +PASS: LC_OperData.ARTPtr[APNumber].ActionResult == LC_ACTION_ERROR +PASS: AP evaluated to error: AP = 0, Result = 2 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_EvaluateRPN_Test_AndWatchFalseOp1 +PASS: Result == LC_ACTION_PASS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndWatchFalseOp2 +PASS: Result == LC_ACTION_PASS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrWatchTrueOp1 +PASS: Result == LC_ACTION_FAIL +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrWatchTrueOp2 +PASS: Result == LC_ACTION_FAIL +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndWatchErrorOp1 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndWatchErrorOp2 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrWatchErrorOp1 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrWatchErrorOp2 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorWatchErrorOp1 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorWatchErrorOp2 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_NotWatchError +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndStaleOp1 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndStaleOp2 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrStaleOp1 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrStaleOp2 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorStaleOp1 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorStaleOp2 +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_NotStale +PASS: Result == LC_ACTION_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_AndNominal +PASS: Result == LC_ACTION_FAIL +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_OrNominal +PASS: Result == LC_ACTION_PASS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_XorNominal +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_NotNominal +PASS: Result == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_EqualIllegalRPN +ERROR EVENT ID=63 AP has illegal RPN expression: AP = 0, LastOperand = 2, StackPtr = 1 +PASS: AP has illegal RPN expression: AP = 0, LastOperand = 2, StackPtr = 1 +PASS: Result == LC_ACTION_ERROR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_EvaluateRPN_Test_WatchpointNumberNominal +PASS: Result == 77 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_EvaluateRPN_Test_DefaultIllegalRPN +ERROR EVENT ID=63 AP has illegal RPN expression: AP = 0, LastOperand = 0, StackPtr = 0 +PASS: Result == LC_ACTION_ERROR +PASS: AP has illegal RPN expression: AP = 0, LastOperand = 0, StackPtr = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_EvaluateRPN_Test_EndOfBufferWhenNotDone +ERROR EVENT ID=63 AP has illegal RPN expression: AP = 0, LastOperand = 19, StackPtr = 20 +PASS: Result == LC_ACTION_ERROR +PASS: AP has illegal RPN expression: AP = 0, LastOperand = 19, StackPtr = 20 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateADT_Test_ActionNotUsed +INFO EVENT ID=66 ADT verify results: good = 0, bad = 0, unused = 176 +PASS: Result == CFE_SUCCESS +PASS: ADT verify results: good = 0, bad = 0, unused = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateADT_Test_InvalidDefaultState +ERROR EVENT ID=65 ADT verify err: AP = 0, Err = 1, State = 99, RTS = 88, FailCnt = 77, EvtType = 66 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_DEFSTATE +PASS: ADT verify err: AP = 0, Err = 1, State = 99, RTS = 88, FailCnt = 77, EvtType = 66 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_BadRtsID +ERROR EVENT ID=65 ADT verify err: AP = 0, Err = 2, State = 1, RTS = 65521, FailCnt = 77, EvtType = 66 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_RTSID +PASS: ADT verify err: AP = 0, Err = 2, State = 1, RTS = 65521, FailCnt = 77, EvtType = 66 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_BadFailCount +ERROR EVENT ID=65 ADT verify err: AP = 0, Err = 3, State = 1, RTS = 1, FailCnt = 0, EvtType = 66 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_FAILCNT +PASS: ADT verify err: AP = 0, Err = 3, State = 1, RTS = 1, FailCnt = 0, EvtType = 66 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_InvalidEventType +ERROR EVENT ID=65 ADT verify err: AP = 0, Err = 4, State = 1, RTS = 1, FailCnt = 88, EvtType = 99 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_EVTTYPE +PASS: ADT verify err: AP = 0, Err = 4, State = 1, RTS = 1, FailCnt = 88, EvtType = 99 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_ValidateRpnAdtValError +ERROR EVENT ID=64 ADT verify RPN err: AP = 0, Index = 0, StackDepth = 0 +INFO EVENT ID=66 ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_ADTVAL_ERR_RPN +PASS: ADT verify RPN err: AP = 0, Index = 0, StackDepth = 0 +PASS: ADT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateADT_Test_ValidateRpnAdtValNoError +INFO EVENT ID=66 ADT verify results: good = 176, bad = 0, unused = 0 +PASS: Result == LC_ADTVAL_NO_ERR +PASS: ADT verify results: good = 176, bad = 0, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateRPN_Test_RpnAnd +PASS: Result == LC_ADTVAL_NO_ERR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_RpnOr +PASS: Result == LC_ADTVAL_NO_ERR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_RpnXor +PASS: Result == LC_ADTVAL_NO_ERR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_RpnNot +PASS: Result == LC_ADTVAL_NO_ERR +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_StackDepthZero +PASS: Result == LC_ADTVAL_ERR_RPN +PASS: IndexValue == 0 +PASS: StackDepthValue == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ValidateRPN_Test_InvalidBufferItem +PASS: Result == LC_ADTVAL_ERR_RPN +PASS: IndexValue == 0 +PASS: StackDepthValue == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AppPipe_Test_SampleAPRequest +ERROR EVENT ID=42 Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 1, Expected = 14 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_HousekeepingRequest +ERROR EVENT ID=41 Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 1, Expected = 8 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_Noop +INFO EVENT ID=26 No-op command: Version 2.1.0.0 +PASS: Result == CFE_SUCCESS +PASS: No-op command: Version 2.1.0.0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_Reset +DEBUG EVENT ID=27 Reset counters command +PASS: Result == CFE_SUCCESS +PASS: Reset counters command +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_SetLCState +ERROR EVENT ID=29 Set LC state error: invalid state = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_SetAPState +ERROR EVENT ID=30 Set AP state error: AP = 0, Invalid new state = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_SetAPPermoff +ERROR EVENT ID=35 Set AP perm off error, AP NOT Disabled: AP = 0, Current state = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_ResetAPStats +INFO EVENT ID=38 Reset AP stats command: AP = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_ResetWPStats +INFO EVENT ID=40 Reset WP stats command: WP = 0 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_InvalidCommandCode +ERROR EVENT ID=24 Invalid command code: ID = 0x18A4, CC = 99 +PASS: Result == CFE_SUCCESS +PASS: Invalid command code: ID = 0x18A4, CC = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_AppPipe_Test_MonitorPacket +INFO EVENT ID=49 Msg with unreferenced message ID rcvd: ID = 0x0063 +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SampleAPReq_Test_AllowSampleAllWatchStale +PASS: LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleAPReq_Test_StartLessOrEqualToEndAndEndWithinArrayWatchStale +PASS: LC_OperData.WRTPtr[0].WatchResult == LC_WATCH_STALE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SampleAPReq_Test_ArrayIndexOutOfRange +ERROR EVENT ID=25 Sample AP error: invalid AP number, start = 2, end = 1 +PASS: Sample AP error: invalid AP number, start = 2, end = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_HousekeepingReq_Test_WatchStale +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_WatchFalse +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_WatchTrue +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_WatchError +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_DefaultWatchResult +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.WPResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_ActionNotUsedStale +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_APStateActiveActionPass +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.ActiveAPs = LC_MAX_ACTIONPOINTS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_APStatePassiveActionFail +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_APStateDisabledActionError +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_APStatePermOffActionError +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_DefaultCurrentStateAndActionResult +PKT: 00 00 00 00 00 00 00 +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: LC_OperData.HkPacket.APResults[HKIndex] == ExpectedByteData +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_HousekeepingReq_Test_ManageTablesError +PKT: 00 00 00 00 00 00 00 +ERROR EVENT ID=19 Error getting WDT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_HousekeepingReq_Test_UpdateTaskCDSNotSuccess +PKT: 00 00 00 00 00 00 00 +ERROR EVENT ID=46 Unable to update watchpoint results in CDS, RC=0xFFFFFFFF +PASS: Result == CFE_SUCCESS +PASS: LC_OperData.HaveActiveCDS == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetCounters_Test +PASS: LC_AppData.CmdCount == 0 +PASS: LC_AppData.CmdErrCount == 0 +PASS: LC_AppData.APSampleCount == 0 +PASS: LC_AppData.MonitoredMsgCount == 0 +PASS: LC_AppData.RTSExecCount == 0 +PASS: LC_AppData.PassiveRTSExecCount == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SetLCStateCmd_Test_Active +INFO EVENT ID=28 Set LC state command: new state = 1 +PASS: LC_AppData.CurrentLCState == LC_STATE_ACTIVE +PASS: LC_AppData.CmdCount == 1 +PASS: Set LC state command: new state = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetLCStateCmd_Test_Passive +INFO EVENT ID=28 Set LC state command: new state = 2 +PASS: LC_AppData.CurrentLCState == LC_STATE_PASSIVE +PASS: LC_AppData.CmdCount == 1 +PASS: Set LC state command: new state = 2 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetLCStateCmd_Test_Disabled +INFO EVENT ID=28 Set LC state command: new state = 3 +PASS: LC_AppData.CurrentLCState == LC_STATE_DISABLED +PASS: LC_AppData.CmdCount == 1 +PASS: Set LC state command: new state = 3 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetLCStateCmd_Test_Default +ERROR EVENT ID=29 Set LC state error: invalid state = 99 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set LC state error: invalid state = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_Default +ERROR EVENT ID=30 Set AP state error: AP = 1, Invalid new state = 99 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: AP = 1, Invalid new state = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_SetAllActionPointsActive +INFO EVENT ID=33 Set AP state command: AP = 65535, New state = 1 +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_ACTIVE +PASS: Set AP state command: AP = 65535, New state = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_SetAllActionPointsPassive +INFO EVENT ID=33 Set AP state command: AP = 65535, New state = 2 +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_PASSIVE +PASS: Set AP state command: AP = 65535, New state = 2 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_SetAllActionPointsDisabled +INFO EVENT ID=33 Set AP state command: AP = 65535, New state = 3 +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == LC_APSTATE_DISABLED +PASS: Set AP state command: AP = 65535, New state = 3 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_UpdateSingleActionPointActive +INFO EVENT ID=33 Set AP state command: AP = 175, New state = 1 +PASS: LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_ACTIVE +PASS: Set AP state command: AP = 175, New state = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_UpdateSingleActionPointPassive +INFO EVENT ID=33 Set AP state command: AP = 175, New state = 2 +PASS: LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_PASSIVE +PASS: Set AP state command: AP = 175, New state = 2 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_UpdateSingleActionPointDisabled +INFO EVENT ID=33 Set AP state command: AP = 175, New state = 3 +PASS: LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == LC_APSTATE_DISABLED +PASS: Set AP state command: AP = 175, New state = 3 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidCurrentAPStateActive +ERROR EVENT ID=31 Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidCurrentAPStatePassive +ERROR EVENT ID=31 Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidCurrentAPStateDisabled +ERROR EVENT ID=31 Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: AP = 175, Invalid current AP state = 4 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidAPNumberActive +ERROR EVENT ID=32 Set AP state error: Invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: Invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidAPNumberPassive +ERROR EVENT ID=32 Set AP state error: Invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: Invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPStateCmd_Test_InvalidAPNumberDisabled +ERROR EVENT ID=32 Set AP state error: Invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP state error: Invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPPermOffCmd_Test_InvalidAPNumberMaxActionpoints +ERROR EVENT ID=34 Set AP perm off error: Invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP perm off error: Invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPPermOffCmd_Test_InvalidAPNumberAllActionpoints +ERROR EVENT ID=34 Set AP perm off error: Invalid AP number = 65535 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP perm off error: Invalid AP number = 65535 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPPermOffCmd_Test_APNotDisabled +ERROR EVENT ID=35 Set AP perm off error, AP NOT Disabled: AP = 1, Current state = 99 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Set AP perm off error, AP NOT Disabled: AP = 1, Current state = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SetAPPermOffCmd_Test_Nominal +INFO EVENT ID=36 Set AP permanently off command: AP = 1 +PASS: LC_OperData.ARTPtr[CmdPacket.APNumber].CurrentState == 4 +PASS: LC_AppData.CmdCount == 1 +PASS: Set AP permanently off command: AP = 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetAPStatsCmd_Test_AllActionPoints +INFO EVENT ID=38 Reset AP stats command: AP = 65535 +PASS: LC_AppData.CmdCount == 1 +PASS: Reset AP stats command: AP = 65535 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetAPStatsCmd_Test_SingleActionPoint +INFO EVENT ID=38 Reset AP stats command: AP = 175 +PASS: LC_AppData.CmdCount == 1 +PASS: Reset AP stats command: AP = 175 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetAPStatsCmd_Test_InvalidAPNumber +ERROR EVENT ID=37 Reset AP stats error: invalid AP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Reset AP stats error: invalid AP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetResultsAP_Test +PASS: LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == 1 +PASS: LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeEventMsgsSent == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == 1 +PASS: LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ActionResult == LC_ACTION_STALE +PASS: LC_OperData.ARTPtr[TableIndex].CurrentState == 1 +PASS: LC_OperData.ARTPtr[TableIndex].PassiveAPCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].FailToPassCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].PassToFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount == 0 +PASS: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ResetWPStatsCmd_Test_AllWatchPoints +INFO EVENT ID=40 Reset WP stats command: WP = 65535 +PASS: LC_AppData.CmdCount == 1 +PASS: Reset WP stats command: WP = 65535 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetWPStatsCmd_Test_SingleWatchPoint +INFO EVENT ID=40 Reset WP stats command: WP = 175 +PASS: LC_AppData.CmdCount == 1 +PASS: Reset WP stats command: WP = 175 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetWPStatsCmd_Test_InvalidWPNumber +ERROR EVENT ID=39 Reset WP stats error: invalid WP number = 176 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Reset WP stats error: invalid WP number = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ResetResultsWP_Test +PASS: LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE +PASS: LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0 +PASS: LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE +PASS: LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0 +PASS: LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].WatchResult == LC_WATCH_STALE +PASS: LC_OperData.WRTPtr[TableIndex].CountdownToStale == 0 +PASS: LC_OperData.WRTPtr[TableIndex].EvaluationCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds == 0 +PASS: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_VerifyMsgLength_Test_HKRequestLengthError +ERROR EVENT ID=41 Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 1, Expected = 8 +PASS: Result == FALSE +PASS: Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 1, Expected = 8 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_VerifyMsgLength_Test_APSampleLengthError +ERROR EVENT ID=42 Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 1, Expected = 8 +PASS: Result == FALSE +PASS: Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 1, Expected = 8 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_VerifyMsgLength_Test_GenericLengthError +ERROR EVENT ID=43 Invalid msg length: ID = 0x0001, CC = 0, Len = 1, Expected = 8 +PASS: Result == FALSE +PASS: Invalid AP sample msg length: ID = 0x0001, CC = 0, Len = 1, Expected = 8 +PASS: LC_AppData.CmdErrCount == 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_VerifyMsgLength_Test_Nominal +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ManageTables_Test_InfoUpdated +PASS: Result == CFE_SUCCESS +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ManageTables_Test_WDTGetAddressError +ERROR EVENT ID=19 Error getting WDT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error getting WDT address, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ManageTables_Test_ADTGetAddressError +ERROR EVENT ID=20 Error getting ADT address, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Error getting ADT address, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UpdateTaskCDS_Test_UpdateWatchpointError +ERROR EVENT ID=46 Unable to update watchpoint results in CDS, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Unable to update watchpoint results in CDS, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UpdateTaskCDS_Test_UpdateActionpointError +ERROR EVENT ID=47 Unable to update actionpoint results in CDS, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: Unable to update actionpoint results in CDS, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UpdateTaskCDS_Test_UpdateAppDataError +ERROR EVENT ID=48 Unable to update application data in CDS, RC=0xFFFFFFFF +PASS: Result == -1 +PASS: LC_AppData.CDSSavedOnExit == LC_CDS_SAVED +PASS: Unable to update application data in CDS, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UpdateTaskCDS_Test_Nominal +PASS: Result == CFE_SUCCESS +PASS: LC_AppData.CDSSavedOnExit == LC_CDS_SAVED +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ExecuteRTS_Test +PKT: 18 A9 C0 00 00 03 00 04 01 00 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_CustomFunction_Test_WatchIndex0 +ERROR EVENT ID=67 Unexpected LC_CustomFunction call: WP = 0 +PASS: Unexpected LC_CustomFunction call: WP = 0 +PASS: Result == LC_WATCH_FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CustomFunction_Test_WatchIndex1 +ERROR EVENT ID=67 Unexpected LC_CustomFunction call: WP = 1 +PASS: Unexpected LC_CustomFunction call: WP = 1 +PASS: Result == LC_WATCH_FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateHashTable_Test_UnsubscribeError +ERROR EVENT ID=44 Error unsubscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF +PASS: Error unsubscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CreateHashTable_Test_NominalAllSameMID +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AddWatchpoint_Test_HashTableAndWatchPtListNullPointersNominal +PASS: LC_OperData.HashTable[HashTableIndex] == &LC_OperData.MessageLinks[0] +PASS: LC_OperData.MessageLinks[0].MessageID == 1 +PASS: LC_OperData.MessageLinks[0].WatchPtList == &LC_OperData.WatchPtLinks[0] +PASS: Result == &LC_OperData.WatchPtLinks[0] +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AddWatchpoint_Test_HashTableAndWatchPtListNotNullPointerTwoMsgLinksMIDFound +PASS: Result == &LC_OperData.WatchPtLinks[0] +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_AddWatchpoint_Test_NullPointersErrorSubscribingWatchpoint +ERROR EVENT ID=45 Error subscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF +PASS: Error subscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CheckMsgForWPs_Test_Nominal +ERROR EVENT ID=67 Unexpected LC_CustomFunction call: WP = 0 +PASS: LC_AppData.MonitoredMsgCount == 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_CheckMsgForWPs_Test_UnreferencedMessageID +INFO EVENT ID=49 Msg with unreferenced message ID rcvd: ID = 0x0001 +PASS: Msg with unreferenced message ID rcvd: ID = 0x0001 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ProcessWP_Test_CustomFunctionWatchFalse +ERROR EVENT ID=67 Unexpected LC_CustomFunction call: WP = 0 +PASS: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_FALSE +PASS: LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1 +PASS: Unexpected LC_CustomFunction call: WP = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ProcessWP_Test_OperatorCompareError +ERROR EVENT ID=51 WP has invalid operator ID: WP = 0, OperID = 99 +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR +PASS: LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ProcessWP_Test_OperatorCompareWatchTruePreviousStale +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_TRUE +PASS: LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].CumulativeTrueCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].FalseToTrueCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Value == 0 +PASS: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Seconds == 3 +PASS: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Subseconds == 5 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_ProcessWP_Test_OperatorCompareWatchFalsePreviousStale +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_FALSE +PASS: LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 0 +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1 +PASS: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Value == 0 +PASS: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Seconds == 3 +PASS: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Subseconds == 5 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataByte +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataWordLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataDWordLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataUByte +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataUWordLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataUDWordLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataFloatLE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_OperatorCompare_Test_DataTypeError +ERROR EVENT ID=50 WP has undefined data type: WP = 0, DataType = 99 +PASS: Result == LC_WATCH_ERROR +PASS: WP has undefined data type: WP = 0, DataType = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_SignedCompare_Test_LE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_LT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_EQ +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_NE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_GT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_GE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_SignedCompare_Test_InvalidOperatorID +ERROR EVENT ID=51 WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Result == LC_WATCH_ERROR +PASS: WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_UnsignedCompare_Test_LE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_LT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_EQ +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_NE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_GT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_GE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_UnsignedCompare_Test_InvalidOperatorID +ERROR EVENT ID=51 WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Result == LC_WATCH_ERROR +PASS: WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_FloatCompare_Test_LE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_LT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_EQ +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_NE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_GT +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_GE +PASS: Result == LC_WATCH_TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_FloatCompare_Test_InvalidOperatorID +ERROR EVENT ID=51 WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Result == LC_WATCH_ERROR +PASS: WP has invalid operator ID: WP = 0, OperID = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_FloatCompare_Test_NaN +ERROR EVENT ID=52 WP data value is a float NAN: WP = 0, Value = 0x7F8FFFFF +PASS: Result == LC_WATCH_ERROR +PASS: WP data value is a float NAN: WP = 0, Value = 0x7F8FFFFF +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_WPOffsetValid_Test_DataUByte +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_WPOffsetValid_Test_UWordLE +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_WPOffsetValid_Test_UDWordLE +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_WPOffsetValid_Test_FloatLE +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_WPOffsetValid_Test_DataTypeError +ERROR EVENT ID=50 WP has undefined data type: WP = 0, DataType = 99 +PASS: Result == FALSE +PASS: WP has undefined data type: WP = 0, DataType = 99 +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_WPOffsetValid_Test_OffsetError +ERROR EVENT ID=53 WP offset error: MID = 1, WP = 0, Offset = 8, DataSize = 1, MsgLen = 8 +PASS: Result == FALSE +PASS: WP offset error: MID = 1, WP = 0, Offset = 8, DataSize = 1, MsgLen = 8 +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_GetSizedWPData_Test_DataByte +PASS: Result == TRUE +PASS: SizedData == 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataUByte +PASS: Result == TRUE +PASS: SizedData == 1 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataWordBELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x0102 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataWordLELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x0201 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataUWordBELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x0102 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataUWordLELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x0201 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataFloatBELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x01020304 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataFloatLELittleEndian +PASS: Result == TRUE +PASS: SizedData == 0x04030201 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_GetSizedWPData_Test_DataTypeError +ERROR EVENT ID=50 WP has undefined data type: WP = 0, DataType = 99 +PASS: Result == FALSE +PASS: LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR +PASS: LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0 +PASS: WP has undefined data type: WP = 0, DataType = 99 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateWDT_Test_UnusedTableEntry +INFO EVENT ID=56 WDT verify results: good = 0, bad = 0, unused = 176 +PASS: Result == CFE_SUCCESS +PASS: WDT verify results: good = 0, bad = 0, unused = 176 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateWDT_Test_InvalidDataType +ERROR EVENT ID=55 WDT verify err: WP = 0, Err = 1, DType = 99, Oper = 1, MID = 2 +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_DATATYPE +PASS: WDT verify err: WP = 0, Err = 1, DType = 99, Oper = 1, MID = 2 +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_InvalidOperator +ERROR EVENT ID=55 WDT verify err: WP = 0, Err = 2, DType = 1, Oper = 99, MID = 2 +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_OPER +PASS: WDT verify err: WP = 0, Err = 2, DType = 1, Oper = 99, MID = 2 +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_BadMessageID +ERROR EVENT ID=55 WDT verify err: WP = 0, Err = 3, DType = 1, Oper = 1, MID = 8192 +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_MID +PASS: WDT verify err: WP = 0, Err = 3, DType = 1, Oper = 1, MID = 8192 +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_NaN +ERROR EVENT ID=54 WDT verify float err: WP = 0, Err = 4, ComparisonValue = 0x7F8FFFFF +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_FPNAN +PASS: WDT verify float err: WP = 0, Err = 4, ComparisonValue = 0x7F8FFFFF +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_Inf +ERROR EVENT ID=54 WDT verify float err: WP = 0, Err = 5, ComparisonValue = 0x7F800000 +INFO EVENT ID=56 WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Result == LC_WDTVAL_ERR_FPINF +PASS: WDT verify float err: WP = 0, Err = 5, ComparisonValue = 0x7F800000 +PASS: WDT verify results: good = 0, bad = 176, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 2 + +Running Test: LC_ValidateWDT_Test_FloatingPointPassed +INFO EVENT ID=56 WDT verify results: good = 176, bad = 0, unused = 0 +PASS: Result == LC_WDTVAL_NO_ERR +PASS: WDT verify results: good = 176, bad = 0, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_ValidateWDT_Test_NonFloatingPointPassed +INFO EVENT ID=56 WDT verify results: good = 176, bad = 0, unused = 0 +PASS: Result == LC_WDTVAL_NO_ERR +PASS: WDT verify results: good = 176, bad = 0, unused = 0 +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 1 + +Running Test: LC_Uint32IsNAN_Test_True +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_Uint32IsNAN_Test_False +PASS: Result == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_Uint32IsInfinite_Test_True +PASS: Result == TRUE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Running Test: LC_Uint32IsInfinite_Test_False +PASS: Result == FALSE +PASS: Ut_CFE_EVS_GetEventQueueDepth() == 0 + +Tests Executed: 233 +Assert Pass Count: 779 +Assert Fail Count: 0 + +gcov: '../src/lc_custom.c' 100.00% 11 +gcov: '../src/lc_action.c' 100.00% 199 +gcov: '../src/lc_app.c' 96.67% 240 +gcov: '../src/lc_cmds.c' 100.00% 357 +gcov: '../src/lc_watch.c' 99.71% 341 + diff --git a/fsw/unit_test/lc_test_utils.c b/fsw/unit_test/lc_test_utils.c new file mode 100644 index 0000000..dfa2776 --- /dev/null +++ b/fsw/unit_test/lc_test_utils.c @@ -0,0 +1,94 @@ + /************************************************************************* + ** File: + ** $Id: lc_test_utils.c 1.3 2017/01/22 17:24:41EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains unit test utilities for the LC application. + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +#include "lc_test_utils.h" + +extern LC_AppData_t LC_AppData; +extern LC_OperData_t LC_OperData; + +/* Global table variables for table pointers contained in LC_OperData */ +LC_WDTEntry_t WDTable[LC_MAX_WATCHPOINTS]; +LC_ADTEntry_t ADTable[LC_MAX_ACTIONPOINTS]; +LC_WRTEntry_t WRTable[LC_MAX_WATCHPOINTS]; +LC_ARTEntry_t ARTable[LC_MAX_ACTIONPOINTS]; + +LC_MessageList_t HashTable[LC_HASH_TABLE_ENTRIES]; + +LC_WatchPtList_t WatchPtList[LC_HASH_TABLE_ENTRIES][LC_MAX_WATCHPOINTS]; + +/* + * Function Definitions + */ + +void LC_Test_Setup(void) +{ + uint16 i; + + /* initialize test environment to default state for every test */ + + CFE_PSP_MemSet(&LC_AppData, 0, sizeof(LC_AppData_t)); + CFE_PSP_MemSet(&LC_OperData, 0, sizeof(LC_OperData_t)); + + LC_OperData.WDTPtr = WDTable; + LC_OperData.ADTPtr = ADTable; + LC_OperData.WRTPtr = WRTable; + LC_OperData.ARTPtr = ARTable; + + memset(LC_OperData.WDTPtr, 0, sizeof(LC_WDTEntry_t)*LC_MAX_WATCHPOINTS); + memset(LC_OperData.ADTPtr, 0, sizeof(LC_ADTEntry_t)*LC_MAX_ACTIONPOINTS); + memset(LC_OperData.WRTPtr, 0, sizeof(LC_WRTEntry_t)*LC_MAX_WATCHPOINTS); + memset(LC_OperData.ARTPtr, 0, sizeof(LC_ARTEntry_t)*LC_MAX_ACTIONPOINTS); + + for (i = 0; i < LC_HASH_TABLE_ENTRIES; i++) + { + LC_OperData.HashTable[i] = &HashTable[i]; + + memset(LC_OperData.HashTable[i], 0, sizeof(LC_MessageList_t)); + + LC_OperData.HashTable[i]->WatchPtList = WatchPtList[i]; + + memset(LC_OperData.HashTable[i]->WatchPtList, 0, sizeof(LC_WatchPtList_t)*LC_MAX_WATCHPOINTS); + + LC_OperData.MessageLinks[i].WatchPtList = WatchPtList[i]; + } + + Ut_CFE_EVS_Reset(); + Ut_CFE_FS_Reset(); + Ut_CFE_TIME_Reset(); + Ut_CFE_TBL_Reset(); + Ut_CFE_SB_Reset(); + Ut_CFE_ES_Reset(); + Ut_OSAPI_Reset(); + Ut_OSFILEAPI_Reset(); +} /* end LC_Test_Setup */ + +void LC_Test_TearDown(void) +{ + /* cleanup test environment */ +} /* end LC_Test_TearDown */ + + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_test_utils.h b/fsw/unit_test/lc_test_utils.h new file mode 100644 index 0000000..1f39296 --- /dev/null +++ b/fsw/unit_test/lc_test_utils.h @@ -0,0 +1,54 @@ + /************************************************************************* + ** File: + ** $Id: lc_test_utils.h 1.2 2017/01/22 17:24:39EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains the function prototypes and global variables for the unit test utilities for the LC application. + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "lc_app.h" +#include "ut_cfe_evs_hooks.h" +#include "ut_cfe_time_stubs.h" +#include "ut_cfe_psp_memutils_stubs.h" +#include "ut_cfe_tbl_stubs.h" +#include "ut_cfe_tbl_hooks.h" +#include "ut_cfe_fs_stubs.h" +#include "ut_cfe_time_stubs.h" +#include "ut_osapi_stubs.h" +#include "ut_osfileapi_stubs.h" +#include "ut_cfe_sb_stubs.h" +#include "ut_cfe_es_stubs.h" +#include "ut_cfe_evs_stubs.h" +#include + +/* + * Function Definitions + */ + +void LC_Test_Setup(void); +void LC_Test_TearDown(void); + + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_testrunner.c b/fsw/unit_test/lc_testrunner.c new file mode 100644 index 0000000..f136d27 --- /dev/null +++ b/fsw/unit_test/lc_testrunner.c @@ -0,0 +1,54 @@ + /************************************************************************* + ** File: + ** $Id: lc_testrunner.c 1.3 2017/01/22 17:24:51EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains the unit test runner for the LC application. + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "uttest.h" +#include "lc_app_test.h" +#include "lc_action_test.h" +#include "lc_cmds_test.h" +#include "lc_custom_test.h" +#include "lc_watch_test.h" + +/* + * Function Definitions + */ + +int main(void) +{ + LC_App_Test_AddTestCases(); + LC_Action_Test_AddTestCases(); + LC_Cmds_Test_AddTestCases(); + LC_Custom_Test_AddTestCases(); + LC_Watch_Test_AddTestCases(); + + return(UtTest_Run()); +} /* end main */ + + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_utest.c b/fsw/unit_test/lc_utest.c deleted file mode 100644 index 4357d33..0000000 --- a/fsw/unit_test/lc_utest.c +++ /dev/null @@ -1,2881 +0,0 @@ -/************************************************************************ -** File: -** $Id: lc_utest.c 1.2.1.2 2015/03/04 16:15:45EST sstrege Exp $ -** -** Copyright © 2007-2014 United States Government as represented by the -** Administrator of the National Aeronautics and Space Administration. -** All Other Rights Reserved. -** -** This software was created at NASA's Goddard Space Flight Center. -** This software is governed by the NASA Open Source Agreement and may be -** used, distributed and modified only pursuant to the terms of that -** agreement. -** -** Purpose: -** This is a test driver used to unit test the CFS Limit Checker (LC) -** Application. -** -** The CFS Limit Checker (LC) is a table driven application -** that provides telemetry monitoring and autonomous response -** capabilities to Core Flight Executive (cFE) based systems. -** -** Output can be directed either to screen or to file: -** To direct output to screen, -** comment in '#define UTF_USE_STDOUT' statement in the -** utf_custom.h file. -** -** To direct output to file, -** comment out '#define UTF_USE_STDOUT' statement in -** utf_custom.h file. -** -** $Log: lc_utest.c $ -** Revision 1.2.1.2 2015/03/04 16:15:45EST sstrege -** Added copyright information -** Revision 1.2.1.1 2012/10/01 18:45:04EDT lwalling -** Apply revision 1.3 and 1.4 changes to branch -** Revision 1.4 2012/10/01 13:30:46PDT lwalling -** Update LC unit test driver for LCX -** Revision 1.3 2012/10/01 08:01:00PDT lwalling -** Updated LCX unit tests, modified old LC tests and added new LCX tests -** Revision 1.2 2012/09/17 13:40:24PDT lwalling -** Removed references to Test_AcquirePointers(), modified sample AP cmd args -** Revision 1.1 2012/07/31 13:53:43PDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/project.pj -** Revision 1.2 2009/12/28 14:19:06EST lwalling -** Update unit tests per latest version of CFE tools -** Revision 1.1 2009/01/15 15:24:03EST dahardis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/project.pj -** -*************************************************************************/ - -/************************************************************************ -** Includes -*************************************************************************/ -#include "lc_app.h" /* Application headers */ -#include "lc_msgids.h" -#include "lc_cmds.h" -#include "lc_watch.h" -#include "lc_action.h" - -#include "cfe_es_cds.h" /* cFE headers */ - -#include "utf_custom.h" /* UTF headers */ -#include "utf_types.h" -#include "utf_cfe_sb.h" -#include "utf_osapi.h" -#include "utf_osloader.h" -#include "utf_osfileapi.h" -#include "utf_cfe.h" - -#include /* System headers */ - -/************************************************************************ -** Macro Definitions -*************************************************************************/ -#define MESSAGE_FORMAT_IS_CCSDS - -/* -** Defined locally in lc_app.c, but we need them here -*/ -#define LC_CDS_SAVED 0xF0F0 -#define LC_CDS_NOT_SAVED 0x0F0F - -/************************************************************************ -** LC global data external to this file -*************************************************************************/ -extern LC_AppData_t LC_AppData; /* App data that can be saved to CDS */ -extern LC_OperData_t LC_OperData; /* Operational data that's never saved */ - -/* -** Actionpoint and Watchpoint Definition Tables -** declared in lc_utest.adt.c and lc_utest.wdt.c -*/ -extern LC_ADTEntry_t LC_UnitTestADT[LC_MAX_ACTIONPOINTS]; -extern LC_WDTEntry_t LC_UnitTestWDT[LC_MAX_WATCHPOINTS]; - -/* -** Non-public functions in LC that we need prototypes for so we -** can call them -*/ -int32 LC_AppInit(void); -int32 LC_CreateDefinitionTables(void); -int32 LC_CreateResultTables(void); -uint8 LC_EvaluateRPN(uint16 APNumber); -void LC_ExitApp(void); -uint8 LC_FloatCompare(uint16 WatchIndex, LC_MultiType_t WPMultiType, LC_MultiType_t CompareMultiType); -boolean LC_GetSizedWPData(uint16 WatchIndex, uint8 *WPDataPtr, uint32 *SizedDataPtr); -int32 LC_HousekeepingReq(CFE_SB_MsgPtr_t MessagePtr); -int32 LC_LoadDefaultTables(void); -int32 LC_ManageTables(void); -uint8 LC_OperatorCompare(uint16 WatchIndex, uint32 ProcessedWPData); -void LC_SampleAPReq(CFE_SB_MsgPtr_t MessagePtr); -void LC_SampleSingleAP(uint16 APNumber); -void LC_SetAPPermOffCmd(CFE_SB_MsgPtr_t MessagePtr); -void LC_SetAPStateCmd(CFE_SB_MsgPtr_t MessagePtr); -int32 LC_TableInit(void); - -/************************************************************************ -** Local data -*************************************************************************/ - -typedef struct -{ - uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; - - uint32 Data[10]; - -} LC_BigCmdPacket_t; - -typedef struct -{ - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; - - uint32 Data1; - uint32 Data2; - uint32 Data3; - -} LC_TestPacket1_t; - -typedef struct -{ - uint8 TlmHeader[CFE_SB_TLM_HDR_SIZE]; - - uint32 Data1; - uint32 Data2; - float Data3; - -} LC_TestPacket2_t; - -LC_TestPacket1_t LC_TestPacket1; -LC_TestPacket2_t LC_TestPacket2; - -LC_BigCmdPacket_t LC_BigCmdPacket; -LC_NoArgsCmd_t LC_NoArgsCmd; -LC_SetLCState_t LC_SetLCState; -LC_SetAPState_t LC_SetAPState; -LC_SetAPPermOff_t LC_SetAPPermOff; -LC_ResetAPStats_t LC_ResetAPStats; -LC_ResetWPStats_t LC_ResetWPStats; -LC_SampleAP_t LC_SampleAP; - -/* -** Actionpoint and Watchpoint Result Tables -*/ -LC_ARTEntry_t LC_UnitTestART[LC_MAX_ACTIONPOINTS]; -LC_WRTEntry_t LC_UnitTestWRT[LC_MAX_WATCHPOINTS]; - -/* -** Global variables used by function hooks -*/ -uint32 CFE_SB_SubscribeCallCount = 1; -uint32 CFE_SB_SubscribeFailCount = 1; -uint32 CFE_TBL_RegisterCallCount = 1; -uint32 CFE_TBL_RegisterFailCount = 1; -uint32 CFE_TBL_LoadCallCount = 1; -uint32 CFE_TBL_LoadFailCount = 1; -uint32 CFE_TBL_GetAddressCallCount = 1; -uint32 CFE_TBL_GetAddressFailCount = 1; -uint32 CFE_TBL_GetAddressUpdateCount = 1; - -/************************************************************************ -** Local function prototypes -*************************************************************************/ -void Test_LCInit (void); -void Test_LCInitFromCDS (void); -void Test_LCExitApp (void); -void Test_LCInitNoCDS (void); -void Test_LCCmdPipe (void); -void Test_HKRequest (void); -void Test_ValidateWDT (void); -void Test_ValidateADT (void); -void Test_SetAPState (void); -void Test_SetAPOff (void); -void Test_SampleAP (void); -void Test_WPProcessing (void); -void Test_CmdHandlers (void); -void Test_Coverage (void); -void PrintHKPacket (void); -void PrintWRTEntry (uint16 WatchIndex); -void PrintARTEntry (uint16 ActionIndex); - -/* -** Prototypes for function hooks -*/ -int32 CFE_SB_Subscribe_FailOnN (CFE_SB_MsgId_t MsgId, - CFE_SB_PipeId_t PipeId); - -int32 CFE_TBL_Register_FailOnN (CFE_TBL_Handle_t *TblHandlePtr, - const char *Name, - uint32 Size, - uint16 TblOptionFlags, - CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr); - -int32 CFE_TBL_Register_Upd2 (CFE_TBL_Handle_t *TblHandlePtr, - const char *Name, - uint32 Size, - uint16 TblOptionFlags, - CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr); - -int32 CFE_TBL_Load_FailOnN (CFE_TBL_Handle_t TblHandle, - CFE_TBL_SrcEnum_t SrcType, - const void *SrcDataPtr); - -int32 CFE_TBL_GetAddress_FailOnN (void **TblPtr, - CFE_TBL_Handle_t TblHandle); - -int32 CFE_TBL_GetAddress_UpdateOnN (void **TblPtr, - CFE_TBL_Handle_t TblHandle); - -int32 CFE_TBL_GetAddress_Hook (void **TblPtr, - CFE_TBL_Handle_t TblHandle); - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* LC unit test program main */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int main(void) -{ - /* - ** Set up output file and HK packet handler - */ - UTF_set_output_filename("lc_utest.out"); - UTF_set_packet_handler(LC_HK_TLM_MID, (utf_packet_handler)PrintHKPacket); - - /* - ** Initialize time data structures - */ - UTF_init_sim_time(0.0); - - /* - ** Initialize ES application data - */ - UTF_ES_InitAppRecords(); - UTF_ES_AddAppRecord("LC",0); - CFE_ES_RegisterApp(); - CFE_EVS_Register(NULL, 0, CFE_EVS_BINARY_FILTER); - - /* - ** Initialize CDS and table services data structures - */ - CFE_ES_CDS_EarlyInit(); - CFE_TBL_EarlyInit(); - - /* - ** Run tests on LC initialization code - */ - printf("*** LC UNIT TEST APPLICATION INIT TESTS START ***\n\n"); - - Test_LCInit(); - - printf("*** LC UNIT TEST APPLICATION INIT TESTS END ***\n\n"); - - /* - ** Test command processing through the software bus command pipe via - ** the lc_utest.in command script - */ - printf("*** LC UNIT TEST COMMAND PIPE TESTS START ***\n\n"); - - Test_LCCmdPipe(); - - printf("*** LC UNIT TEST COMMAND PIPE TESTS END ***\n\n"); - - /* - ** Run tests that invoke LC code directly - */ - printf("*** LC UNIT TEST DRIVER TESTS START ***\n\n"); - - LC_OperData.ARTPtr = LC_UnitTestART; - LC_OperData.WRTPtr = LC_UnitTestWRT; - Test_HKRequest(); - - LC_OperData.ADTPtr = LC_UnitTestADT; - LC_OperData.WDTPtr = LC_UnitTestWDT; - - Test_ValidateWDT(); - Test_ValidateADT(); - - Test_SetAPState(); - Test_SetAPOff(); - Test_SampleAP(); - Test_WPProcessing(); - Test_CmdHandlers(); - Test_Coverage(); - - printf("*** LC UNIT TEST DRIVER TESTS END ***\n\n"); - - return 0; - -} /* end main */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs tests on LC initialization code */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_LCInit (void) -{ - UTF_put_text("\n"); - UTF_put_text("************************************\n"); - UTF_put_text("* Application Initialization Tests *\n"); - UTF_put_text("************************************\n"); - UTF_put_text("\n"); - - UTF_put_text("Test CFE_EVS_Register call error \n"); - UTF_put_text("---------------------------------\n"); - UTF_CFE_EVS_Set_Api_Return_Code(CFE_EVS_REGISTER_PROC, 0xc2000003L); - LC_AppMain(); - UTF_CFE_EVS_Use_Default_Api_Return_Code(CFE_EVS_REGISTER_PROC); - UTF_put_text("\n"); - - UTF_put_text("Test CFE_SB_CreatePipe call error \n"); - UTF_put_text("---------------------------------\n"); - UTF_CFE_SB_Set_Api_Return_Code(CFE_SB_CREATEPIPE_PROC, 0xca000004L); - LC_AppMain(); - UTF_CFE_SB_Use_Default_Api_Return_Code(CFE_SB_CREATEPIPE_PROC); - UTF_put_text("\n"); - - /* - ** Set up a custom function hook for the following tests - */ - UTF_SB_set_function_hook(CFE_SB_SUBSCRIBE_HOOK, CFE_SB_Subscribe_FailOnN); - - /* - ** Test error return on first CFE_SB_Subscribe call - */ - CFE_SB_SubscribeCallCount = 1; /* Always need to init this */ - CFE_SB_SubscribeFailCount = 1; - UTF_put_text("Test CFE_SB_Subscribe call 1 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on second CFE_SB_Subscribe call - */ - CFE_SB_SubscribeCallCount = 1; /* Always need to init this */ - CFE_SB_SubscribeFailCount = 2; - UTF_put_text("Test CFE_SB_Subscribe call 2 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on third CFE_SB_Subscribe call - */ - CFE_SB_SubscribeCallCount = 1; /* Always need to init this */ - CFE_SB_SubscribeFailCount = 3; - UTF_put_text("Test CFE_SB_Subscribe call 3 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Remove the custom function hook - */ - UTF_SB_set_function_hook(CFE_SB_SUBSCRIBE_HOOK, NULL); - - /* - ** How we proceed will depend on if we are configured to - ** restore data from CDS or not - */ -#ifdef LC_SAVE_TO_CDS - Test_LCInitFromCDS(); - Test_LCExitApp(); -#else - Test_LCInitNoCDS(); -#endif - -} /* end Test_LCInit */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs tests on LC initialization code that is conditionally */ -/* compiled in when LC is configured to attempt to restore */ -/* data from the CDS on application restarts */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_LCInitFromCDS (void) -{ - UTF_put_text("\n"); - UTF_put_text("*********************************************\n"); - UTF_put_text("* Application Initialization With CDS Tests *\n"); - UTF_put_text("*********************************************\n"); - UTF_put_text("\n"); - - /* - ** Set all future calls to CFE_ES_CopyToCDS to return success - ** We do this so the LC_ExitApp routine (that is included when - ** we are using the CDS) will exit normally during all the - ** subsequent tests that we run. - */ - UTF_CFE_ES_Set_Api_Return_Code(CFE_ES_COPYTOCDS_PROC, CFE_SUCCESS); - - /* - ** Set up a custom function hook for the following tests - */ - UTF_TBL_set_function_hook(CFE_TBL_REGISTER_HOOK, CFE_TBL_Register_FailOnN); - - /* - ** Test error return on first CFE_TBL_Register call - ** Generates an error in the LC_InitFromCDS function - */ - CFE_TBL_RegisterCallCount = 1; /* Always need to init this */ - CFE_TBL_RegisterFailCount = 1; - UTF_put_text("Test CFE_TBL_Register call 1 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on second CFE_TBL_Register call - ** Generates an error in the LC_InitFromCDS function - */ - CFE_TBL_RegisterCallCount = 1; /* Always need to init this */ - CFE_TBL_RegisterFailCount = 2; - UTF_put_text("Test CFE_TBL_Register call 2 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on third CFE_TBL_Register call - ** Generates an error in the LC_InitFromCDS function - */ - CFE_TBL_RegisterCallCount = 1; /* Always need to init this */ - CFE_TBL_RegisterFailCount = 3; - UTF_put_text("Test CFE_TBL_Register call 3 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on fourth CFE_TBL_Register call - ** Generates an error in the LC_InitFromCDS function - */ - CFE_TBL_RegisterCallCount = 1; /* Always need to init this */ - CFE_TBL_RegisterFailCount = 4; - UTF_put_text("Test CFE_TBL_Register call 4 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Remove the custom function hook - */ - UTF_TBL_set_function_hook(CFE_TBL_REGISTER_HOOK, NULL); - - /* - ** Set any future CFE_TBL_Register calls to return success - ** without actually registering the tables. This prevents - ** the multiple calls to LC_AppMain below from blowing up - ** the UTF table buffers - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_REGISTER_PROC, CFE_SUCCESS); - - /* - ** Set calls to CFE_ES_RegisterCDS to return an error code - ** NOTE: CFE_ES_RegisterCDS does NOT support function hooks, - ** so we can only force an error on the first call. - */ - UTF_CFE_ES_Set_Api_Return_Code(CFE_ES_REGISTERCDS_PROC, CFE_ES_CDS_INVALID_NAME); - - /* - ** Test error return on first CFE_ES_RegisterCDS call - ** Generates an error in the LC_InitFromCDS function - */ - UTF_put_text("Test CFE_ES_RegisterCDS call 1 error \n"); - UTF_put_text("-------------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Set any future CFE_ES_RegisterCDS calls to return success - */ - UTF_CFE_ES_Set_Api_Return_Code(CFE_ES_REGISTERCDS_PROC, CFE_SUCCESS); - - /* - ** Set up a custom function hook for the following tests - */ - UTF_TBL_set_function_hook(CFE_TBL_GETADDRESS_HOOK, CFE_TBL_GetAddress_FailOnN); - - /* - ** Test error return on first CFE_TBL_GetAddress call - ** Generates an error in the LC_InitFromCDS function - */ - CFE_TBL_GetAddressCallCount = 1; /* Always need to init this */ - CFE_TBL_GetAddressFailCount = 1; - UTF_put_text("Test CFE_TBL_GetAddress call 1 error \n"); - UTF_put_text("-------------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on second CFE_TBL_GetAddress call - ** Generates an error in the LC_InitFromCDS function - */ - CFE_TBL_GetAddressCallCount = 1; /* Always need to init this */ - CFE_TBL_GetAddressFailCount = 2; - UTF_put_text("Test CFE_TBL_GetAddress call 2 error \n"); - UTF_put_text("-------------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Set a function hook for CFE_TBL_GetAddress that will return - ** pointers to our local test data buffers - */ - UTF_TBL_set_function_hook(CFE_TBL_GETADDRESS_HOOK, CFE_TBL_GetAddress_Hook); - - /* - ** Set CFE_TBL_ReleaseAddress to not do anything and - ** always return success - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_RELEASEADDRESS_PROC, CFE_SUCCESS); - - /* - ** Set up a custom function hook for the following tests - */ - UTF_TBL_set_function_hook(CFE_TBL_LOAD_HOOK, CFE_TBL_Load_FailOnN); - - /* - ** Test error return on first CFE_TBL_Load call - ** Generates an error in the LC_LoadDefaults function - */ - CFE_TBL_LoadCallCount = 1; /* Always need to init this */ - CFE_TBL_LoadFailCount = 1; - UTF_put_text("Test CFE_TBL_Load call 1 error \n"); - UTF_put_text("-------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on second CFE_TBL_Load call - ** Generates an error in the LC_LoadDefaults function - */ - CFE_TBL_LoadCallCount = 1; /* Always need to init this */ - CFE_TBL_LoadFailCount = 2; - UTF_put_text("Test CFE_TBL_Load call 2 error \n"); - UTF_put_text("-------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Remove the custom function hook - */ - UTF_TBL_set_function_hook(CFE_TBL_LOAD_HOOK, NULL); - - /* - ** Set any future CFE_TBL_Load calls to return success - ** (needed because we don't load table images from files - ** for unit testing, we use memory buffers instead) - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_LOAD_PROC, CFE_SUCCESS); - - /* - ** Setup a function hook for CFE_TBL_Register that will return - ** CFE_TBL_INFO_RECOVERED_TBL on the first two times that it's - ** called then return CFE_SUCCESS afterwards - ** - ** This will make the LC code think the ADT and WDT were - ** restored from the CDS - */ - UTF_TBL_set_function_hook(CFE_TBL_REGISTER_HOOK, CFE_TBL_Register_Upd2); - - /* - ** Set calls to CFE_ES_RestoreFromCDS to return an error code - ** NOTE: CFE_ES_RestoreFromCDS does NOT support function hooks, - ** so we can only force an error on the first call. - */ - UTF_CFE_ES_Set_Api_Return_Code(CFE_ES_RESTOREFROMCDS_PROC, CFE_ES_CDS_INVALID); - - /* - ** Set any future CFE_TBL_Manage calls to return success - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_MANAGE_PROC, CFE_SUCCESS); - - /* - ** Set any call to CFE_TBL_GetStatus to return error - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_GETSTATUS_PROC, CFE_TBL_ERR_INVALID_HANDLE); - - /* - ** Test error return on first CFE_ES_RestoreFromCDS call which will - ** fall through to the LC_AcquirePointers where we need to force - ** an error return from CFE_TBL_GetStatus so control will return - ** back to this function. - */ - CFE_TBL_RegisterCallCount = 1; /* Need to do this to get to CFE_ES_RestoreFromCDS call */ - UTF_put_text("Test CFE_ES_RestoreFromCDS call 1 error\n"); - UTF_put_text("AND CFE_TBL_GetStatus call 1 error\n"); - UTF_put_text("---------------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Set calls to CFE_ES_RestoreFromCDS to return success - */ - UTF_CFE_ES_Set_Api_Return_Code(CFE_ES_RESTOREFROMCDS_PROC, CFE_SUCCESS); - - /* - ** Rerun previous test - */ - CFE_TBL_RegisterCallCount = 1; /* Need to do this to get to CFE_ES_RestoreFromCDS call */ - UTF_put_text("Test CFE_ES_RestoreFromCDS no error\n"); - UTF_put_text("AND CFE_TBL_GetStatus call 1 error\n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Set CDSSavedOnExit to execute alternate branch - */ - LC_AppData.CDSSavedOnExit = LC_CDS_SAVED; - CFE_TBL_RegisterCallCount = 1; /* Need to do this to get to CFE_ES_RestoreFromCDS call */ - UTF_put_text("Test CFE_ES_RestoreFromCDS no error\n"); - UTF_put_text("AND LC_AppData.CDSSavedOnExit = LC_CDS_SAVED\n"); - UTF_put_text("AND CFE_TBL_GetStatus call 1 error\n"); - UTF_put_text("---------------------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Set any future call to CFE_TBL_GetStatus to return success - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_GETSTATUS_PROC, CFE_SUCCESS); - -} /* end Test_LCInitFromCDS */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs tests on LC exit code that is conditionally */ -/* compiled in when LC is configured to attempt to save */ -/* data to the CDS on application restarts */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifdef LC_SAVE_TO_CDS -void Test_LCExitApp (void) -{ - UTF_put_text("\n"); - UTF_put_text("***********************************\n"); - UTF_put_text("* Application Exit With CDS Tests *\n"); - UTF_put_text("***********************************\n"); - UTF_put_text("\n"); - - /* - ** In the current version of the UTF, CFE_ES_CopyToCDS - ** doesn't support function hooks so the best we can - ** do is test the first error condition in LC_ExitApp - */ - UTF_CFE_ES_Set_Api_Return_Code(CFE_ES_COPYTOCDS_PROC, CFE_ES_CDS_ACCESS_ERROR); - - UTF_put_text("Test CFE_ES_CopyToCDS call 1 error\n"); - UTF_put_text("----------------------------------\n"); - LC_ExitApp(); - UTF_put_text("\n"); - - /* - ** Set all future calls to CFE_ES_CopyToCDS to return success - ** so LC will exit normally during all the subsequent tests - ** that we run. - */ - UTF_CFE_ES_Set_Api_Return_Code(CFE_ES_COPYTOCDS_PROC, CFE_SUCCESS); - -} /* end Test_LCExitApp */ -#endif /* end #ifdef LC_SAVE_TO_CDS */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs tests on LC initialization code that is conditionally */ -/* compiled in when LC is configured NOT to use the CDS on */ -/* application restarts */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_LCInitNoCDS (void) -{ - UTF_put_text("\n"); - UTF_put_text("************************************************\n"); - UTF_put_text("* Application Initialization With NO CDS Tests *\n"); - UTF_put_text("************************************************\n"); - UTF_put_text("\n"); - - /* - ** Set up a custom function hook for the following tests - */ - UTF_TBL_set_function_hook(CFE_TBL_REGISTER_HOOK, CFE_TBL_Register_FailOnN); - - /* - ** Test error return on first CFE_TBL_Register call - ** Generates an error in the LC_InitNoCDS function - */ - CFE_TBL_RegisterCallCount = 1; /* Always need to init this */ - CFE_TBL_RegisterFailCount = 1; - UTF_put_text("Test CFE_TBL_Register call 1 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on second CFE_TBL_Register call - ** Generates an error in the LC_InitNoCDS function - */ - CFE_TBL_RegisterCallCount = 1; /* Always need to init this */ - CFE_TBL_RegisterFailCount = 2; - UTF_put_text("Test CFE_TBL_Register call 2 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on third CFE_TBL_Register call - ** Generates an error in the LC_InitNoCDS function - */ - CFE_TBL_RegisterCallCount = 1; /* Always need to init this */ - CFE_TBL_RegisterFailCount = 3; - UTF_put_text("Test CFE_TBL_Register call 3 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on fourth CFE_TBL_Register call - ** Generates an error in the LC_InitNoCDS function - */ - CFE_TBL_RegisterCallCount = 1; /* Always need to init this */ - CFE_TBL_RegisterFailCount = 4; - UTF_put_text("Test CFE_TBL_Register call 4 error \n"); - UTF_put_text("-----------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Remove the custom function hook - */ - UTF_TBL_set_function_hook(CFE_TBL_REGISTER_HOOK, NULL); - - /* - ** Set any future CFE_TBL_Register calls to return success - ** without actually registering the tables. This prevents - ** the multiple calls to LC_AppMain below from blowing up - ** the UTF table buffers - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_REGISTER_PROC, CFE_SUCCESS); - - /* - ** Set up a custom function hook for the following tests - */ - UTF_TBL_set_function_hook(CFE_TBL_LOAD_HOOK, CFE_TBL_Load_FailOnN); - - /* - ** Test error return on first CFE_TBL_Load call - ** Generates an error in the LC_LoadDefaults function - */ - CFE_TBL_LoadCallCount = 1; /* Always need to init this */ - CFE_TBL_LoadFailCount = 1; - UTF_put_text("Test CFE_TBL_Load call 1 error \n"); - UTF_put_text("-------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Test error return on second CFE_TBL_Load call - ** Generates an error in the LC_LoadDefaults function - */ - CFE_TBL_LoadCallCount = 1; /* Always need to init this */ - CFE_TBL_LoadFailCount = 2; - UTF_put_text("Test CFE_TBL_Load call 2 error \n"); - UTF_put_text("-------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Remove the custom function hook - */ - UTF_TBL_set_function_hook(CFE_TBL_LOAD_HOOK, NULL); - - /* - ** Set any future CFE_TBL_Load calls to return success - ** (needed because we don't load table images from files - ** for unit testing, we use memory buffers instead) - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_LOAD_PROC, CFE_SUCCESS); - - /* - ** Set any future CFE_TBL_Manage calls to return success - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_MANAGE_PROC, CFE_SUCCESS); - - /* - ** Set any call to CFE_TBL_GetStatus to return error - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_GETSTATUS_PROC, CFE_TBL_ERR_INVALID_HANDLE); - - /* - ** Test error return on first CFE_TBL_GetStatus call - ** Generates an error in the beginning of the LC_AcquirePointers - ** function that's called at the end of the init sequence. - ** - ** We test the rest of the LC_AcquirePointers code below. - */ - UTF_put_text("Test CFE_TBL_GetStatus call 1 error \n"); - UTF_put_text("------------------------------------\n"); - LC_AppMain(); - UTF_put_text("\n"); - - /* - ** Set any future call to CFE_TBL_GetStatus to return success - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_GETSTATUS_PROC, CFE_SUCCESS); - -} /* end Test_LCInitNoCDS */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs command pipe tests */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_LCCmdPipe (void) -{ - CFE_SB_PipeId_t CmdPipe_ID; - - UTF_put_text("\n"); - UTF_put_text("*************************\n"); - UTF_put_text("* LC Command Pipe Tests *\n"); - UTF_put_text("*************************\n"); - UTF_put_text("\n"); - - /* - ** Re-Initialize ES application data otherwise our earlier - ** tests will cause CFE_ES_RunLoop to not return TRUE and - ** LC will exit right away - */ - UTF_ES_InitAppRecords(); - UTF_ES_AddAppRecord("LC",0); - CFE_ES_RegisterApp(); - CFE_EVS_Register(NULL, 0, CFE_EVS_BINARY_FILTER); - - /* - ** Set CFE_TBL_ReleaseAddress to not do anything and - ** always return success - */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_RELEASEADDRESS_PROC, CFE_SUCCESS); - - /* - ** Set up to read in script through command pipe - ** The command pipe ID needs to match the value that will be - ** returned by the next call to CFE_SB_CreatePipe. So we - ** increment the last value - */ - CmdPipe_ID = LC_OperData.CmdPipe + 1; - UTF_add_input_file(CmdPipe_ID, "lc_utest.in"); - - /* - ** Add this hook so we can force a software bus read error - ** in the lc_utest.in input file that will make the application - ** exit and return control to this function. - */ - UTF_add_special_command("SET_SB_RETURN_CODE", UTF_SCRIPT_SB_Set_Api_Return_Code); - - /* - ** Call app main - */ - LC_AppMain(); - -} /* end Test_LCCmdPipe */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs housekeeping request tests */ -/* The primary purpose of these is to ensure that the Watchpoint */ -/* and Actionpoint results arrays in the housekeeping packet get */ -/* formatted correctly according to the values in the WP and AP */ -/* results tables */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_HKRequest (void) -{ - LC_NoArgsCmd_t HKReqMsg; - int32 Status; - - /* Setup the test message header */ - CFE_SB_InitMsg(&HKReqMsg, LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); - - UTF_put_text("\n"); - UTF_put_text("*********************************\n"); - UTF_put_text("* LC Housekeeping Request Tests *\n"); - UTF_put_text("*********************************\n"); - UTF_put_text("\n"); - - /* Setup some dummy Watchpoint results - ** The numbers are chosen to execute all of the - ** case switch statements in LC_HousekeepingReq where the - ** results arrays are constructed - */ - LC_OperData.WRTPtr [4].WatchResult = LC_WATCH_FALSE; - LC_OperData.WRTPtr [8].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[12].WatchResult = LC_WATCH_ERROR; - LC_OperData.WRTPtr[16].WatchResult = LC_WATCH_STALE; - - LC_OperData.WRTPtr [9].WatchResult = LC_WATCH_FALSE; - LC_OperData.WRTPtr[13].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[17].WatchResult = LC_WATCH_ERROR; - LC_OperData.WRTPtr[21].WatchResult = LC_WATCH_STALE; - - LC_OperData.WRTPtr[14].WatchResult = LC_WATCH_FALSE; - LC_OperData.WRTPtr[18].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[22].WatchResult = LC_WATCH_ERROR; - LC_OperData.WRTPtr[26].WatchResult = LC_WATCH_STALE; - - LC_OperData.WRTPtr[19].WatchResult = LC_WATCH_FALSE; - LC_OperData.WRTPtr[23].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[27].WatchResult = LC_WATCH_ERROR; - LC_OperData.WRTPtr[31].WatchResult = LC_WATCH_STALE; - - /* Setup some dummy Actionpoint results */ - LC_OperData.ARTPtr [4].CurrentState = LC_APSTATE_ACTIVE; - LC_OperData.ARTPtr [6].CurrentState = LC_APSTATE_PASSIVE; - LC_OperData.ARTPtr [8].CurrentState = LC_APSTATE_DISABLED; - LC_OperData.ARTPtr[10].CurrentState = LC_APSTATE_PERMOFF; - LC_OperData.ARTPtr[14].CurrentState = LC_ACTION_NOT_USED; - - LC_OperData.ARTPtr[13].CurrentState = LC_APSTATE_ACTIVE; - LC_OperData.ARTPtr[15].CurrentState = LC_APSTATE_PASSIVE; - LC_OperData.ARTPtr[17].CurrentState = LC_APSTATE_DISABLED; - LC_OperData.ARTPtr[19].CurrentState = LC_APSTATE_PERMOFF; - LC_OperData.ARTPtr[23].CurrentState = LC_ACTION_NOT_USED; - - LC_OperData.ARTPtr [22].ActionResult = LC_ACTION_PASS; - LC_OperData.ARTPtr [24].ActionResult = LC_ACTION_FAIL; - LC_OperData.ARTPtr [26].ActionResult = LC_ACTION_ERROR; - LC_OperData.ARTPtr [30].ActionResult = LC_ACTION_STALE; - - LC_OperData.ARTPtr [29].ActionResult = LC_ACTION_PASS; - LC_OperData.ARTPtr [31].ActionResult = LC_ACTION_FAIL; - LC_OperData.ARTPtr [33].ActionResult = LC_ACTION_ERROR; - LC_OperData.ARTPtr [37].ActionResult = LC_ACTION_STALE; - - /* - ** Generate the packet which will cause the print routine - ** to be invoked automatically - */ - Status = LC_HousekeepingReq((CFE_SB_MsgPtr_t)&HKReqMsg); - - /* - ** Reset our statistics - */ - LC_OperData.WRTPtr [4].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr [8].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[12].WatchResult = LC_WATCH_STALE; - - LC_OperData.WRTPtr [9].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[13].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[17].WatchResult = LC_WATCH_STALE; - - LC_OperData.WRTPtr[14].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[18].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[22].WatchResult = LC_WATCH_STALE; - - LC_OperData.WRTPtr[19].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[23].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[27].WatchResult = LC_WATCH_STALE; - - LC_OperData.ARTPtr [4].CurrentState = LC_ACTION_NOT_USED; - LC_OperData.ARTPtr [6].CurrentState = LC_ACTION_NOT_USED; - LC_OperData.ARTPtr [8].CurrentState = LC_ACTION_NOT_USED; - LC_OperData.ARTPtr[10].CurrentState = LC_ACTION_NOT_USED; - - LC_OperData.ARTPtr[13].CurrentState = LC_ACTION_NOT_USED; - LC_OperData.ARTPtr[15].CurrentState = LC_ACTION_NOT_USED; - LC_OperData.ARTPtr[17].CurrentState = LC_ACTION_NOT_USED; - LC_OperData.ARTPtr[19].CurrentState = LC_ACTION_NOT_USED; - - LC_OperData.ARTPtr [22].ActionResult = LC_ACTION_STALE; - LC_OperData.ARTPtr [24].ActionResult = LC_ACTION_STALE; - LC_OperData.ARTPtr [26].ActionResult = LC_ACTION_STALE; - - LC_OperData.ARTPtr [29].ActionResult = LC_ACTION_STALE; - LC_OperData.ARTPtr [31].ActionResult = LC_ACTION_STALE; - LC_OperData.ARTPtr [33].ActionResult = LC_ACTION_STALE; - -} /* end Test_HKRequest */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs Watchpoint Definition Table (WDT) Validation Tests */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_ValidateWDT (void) -{ - int32 Status; - - UTF_put_text("\n"); - UTF_put_text("***************************\n"); - UTF_put_text("* LC WDT Validation Tests *\n"); - UTF_put_text("***************************\n"); - UTF_put_text("\n"); - - UTF_put_text("Test WDT Validation with bad DataType\n"); - UTF_put_text("-------------------------------------\n"); - LC_OperData.WDTPtr[20].DataType = 45; - Status = LC_ValidateWDT(LC_OperData.WDTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test WDT Validation with bad OperatorID\n"); - UTF_put_text("---------------------------------------\n"); - LC_OperData.WDTPtr[20].DataType = LC_DATA_UWORD_LE; - LC_OperData.WDTPtr[20].OperatorID = 45; - Status = LC_ValidateWDT(LC_OperData.WDTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test WDT Validation with bad MessageID\n"); - UTF_put_text("--------------------------------------\n"); - LC_OperData.WDTPtr[20].DataType = LC_DATA_UWORD_LE; - LC_OperData.WDTPtr[20].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[20].MessageID = CFE_SB_HIGHEST_VALID_MSGID + 1; - Status = LC_ValidateWDT(LC_OperData.WDTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test WDT Validation with floating point NAN comparison value\n"); - UTF_put_text("------------------------------------------------------------\n"); - LC_OperData.WDTPtr[20].DataType = LC_DATA_FLOAT_LE; - LC_OperData.WDTPtr[20].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[20].MessageID = 1024; - LC_OperData.WDTPtr[20].ComparisonValue.Unsigned32 = 0xFFFFFFFF; - Status = LC_ValidateWDT(LC_OperData.WDTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test WDT Validation with floating point infinite comparison value\n"); - UTF_put_text("-----------------------------------------------------------------\n"); - LC_OperData.WDTPtr[20].DataType = LC_DATA_FLOAT_LE; - LC_OperData.WDTPtr[20].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[20].MessageID = 1024; - LC_OperData.WDTPtr[20].ComparisonValue.Unsigned32 = 0x7F800000; - Status = LC_ValidateWDT(LC_OperData.WDTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test WDT Validation with good non-floating point entry\n"); - UTF_put_text("------------------------------------------------------\n"); - LC_OperData.WDTPtr[20].DataType = LC_DATA_UWORD_LE; - LC_OperData.WDTPtr[20].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[20].MessageID = 1024; - LC_OperData.WDTPtr[20].ComparisonValue.Unsigned16in32.Unsigned16 = 0xF0F0; - Status = LC_ValidateWDT(LC_OperData.WDTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test WDT Validation with good floating point entry\n"); - UTF_put_text("--------------------------------------------------\n"); - LC_OperData.WDTPtr[20].DataType = LC_DATA_FLOAT_LE; - LC_OperData.WDTPtr[20].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[20].MessageID = 1024; - LC_OperData.WDTPtr[20].ComparisonValue.Float32 = 500.25; - Status = LC_ValidateWDT(LC_OperData.WDTPtr); - UTF_put_text("\n"); - - /* - ** Reset the watchpoint entry that we used - */ - LC_OperData.WDTPtr[20].DataType = LC_WATCH_NOT_USED; - LC_OperData.WDTPtr[20].OperatorID = LC_NO_OPER; - LC_OperData.WDTPtr[20].MessageID = 0; - LC_OperData.WDTPtr[20].WatchpointOffset = 0; - LC_OperData.WDTPtr[20].BitMask = LC_NO_BITMASK; - LC_OperData.WDTPtr[20].CustomFuncArgument = 0; - LC_OperData.WDTPtr[20].ComparisonValue.Unsigned32 = 0; - -} /* end Test_ValidateWDT */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs Actionpoint Definition Table (ADT) Validation Tests */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_ValidateADT (void) -{ - int32 Status; - - UTF_put_text("\n"); - UTF_put_text("***************************\n"); - UTF_put_text("* LC ADT Validation Tests *\n"); - UTF_put_text("***************************\n"); - UTF_put_text("\n"); - - UTF_put_text("Test ADT Validation with bad DefaultState\n"); - UTF_put_text("-----------------------------------------\n"); - LC_OperData.ADTPtr[30].DefaultState = 10; - Status = LC_ValidateADT(LC_OperData.ADTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test ADT Validation with bad RTSId\n"); - UTF_put_text("----------------------------------\n"); - LC_OperData.ADTPtr[30].DefaultState = LC_APSTATE_ACTIVE; - LC_OperData.ADTPtr[30].RTSId = LC_MAX_VALID_ADT_RTSID + 1; - Status = LC_ValidateADT(LC_OperData.ADTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test ADT Validation with bad MaxFailsBeforeRTS\n"); - UTF_put_text("----------------------------------------------\n"); - LC_OperData.ADTPtr[30].DefaultState = LC_APSTATE_ACTIVE; - LC_OperData.ADTPtr[30].RTSId = 20; - LC_OperData.ADTPtr[30].MaxFailsBeforeRTS = 0; - Status = LC_ValidateADT(LC_OperData.ADTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test ADT Validation with bad EventType\n"); - UTF_put_text("--------------------------------------\n"); - LC_OperData.ADTPtr[30].DefaultState = LC_APSTATE_ACTIVE; - LC_OperData.ADTPtr[30].RTSId = 20; - LC_OperData.ADTPtr[30].MaxFailsBeforeRTS = 5; - LC_OperData.ADTPtr[30].EventType = 10; - Status = LC_ValidateADT(LC_OperData.ADTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test ADT Validation with bad RPN expression\n"); - UTF_put_text("LC_RPN_NOT as the first symbol\n"); - UTF_put_text("-------------------------------------------\n"); - LC_OperData.ADTPtr[30].DefaultState = LC_APSTATE_ACTIVE; - LC_OperData.ADTPtr[30].RTSId = 20; - LC_OperData.ADTPtr[30].MaxFailsBeforeRTS = 5; - LC_OperData.ADTPtr[30].EventType = CFE_EVS_INFORMATION; - LC_OperData.ADTPtr[30].RPNEquation[0] = LC_RPN_NOT; - Status = LC_ValidateADT(LC_OperData.ADTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test ADT Validation with bad RPN expression\n"); - UTF_put_text("Missing watchpoint ID\n"); - UTF_put_text("-------------------------------------------\n"); - LC_OperData.ADTPtr[30].DefaultState = LC_APSTATE_ACTIVE; - LC_OperData.ADTPtr[30].RTSId = 20; - LC_OperData.ADTPtr[30].MaxFailsBeforeRTS = 5; - LC_OperData.ADTPtr[30].EventType = CFE_EVS_INFORMATION; - LC_OperData.ADTPtr[30].RPNEquation[0] = 4; - LC_OperData.ADTPtr[30].RPNEquation[1] = LC_RPN_AND; - Status = LC_ValidateADT(LC_OperData.ADTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test ADT Validation with bad RPN expression\n"); - UTF_put_text("Not a valid polish symbol or watchpoint ID\n"); - UTF_put_text("-------------------------------------------\n"); - LC_OperData.ADTPtr[30].DefaultState = LC_APSTATE_ACTIVE; - LC_OperData.ADTPtr[30].RTSId = 20; - LC_OperData.ADTPtr[30].MaxFailsBeforeRTS = 5; - LC_OperData.ADTPtr[30].EventType = CFE_EVS_INFORMATION; - LC_OperData.ADTPtr[30].RPNEquation[0] = 4; - LC_OperData.ADTPtr[30].RPNEquation[1] = 755; - Status = LC_ValidateADT(LC_OperData.ADTPtr); - UTF_put_text("\n"); - - UTF_put_text("Test ADT Validation with good entry\n"); - UTF_put_text("-----------------------------------\n"); - LC_OperData.ADTPtr[30].DefaultState = LC_APSTATE_ACTIVE; - LC_OperData.ADTPtr[30].RTSId = 20; - LC_OperData.ADTPtr[30].MaxFailsBeforeRTS = 5; - LC_OperData.ADTPtr[30].EventType = CFE_EVS_INFORMATION; - LC_OperData.ADTPtr[30].RPNEquation[0] = 4; - LC_OperData.ADTPtr[30].RPNEquation[1] = 16; - LC_OperData.ADTPtr[30].RPNEquation[2] = LC_RPN_AND; - LC_OperData.ADTPtr[30].RPNEquation[3] = LC_RPN_EQUAL; - Status = LC_ValidateADT(LC_OperData.ADTPtr); - UTF_put_text("\n"); - - /* - ** Reset the actionpoint entry that we used - */ - LC_OperData.ADTPtr[30].DefaultState = LC_ACTION_NOT_USED; - LC_OperData.ADTPtr[30].RTSId = 0; - LC_OperData.ADTPtr[30].MaxFailsBeforeRTS = 0; - LC_OperData.ADTPtr[30].EventType = CFE_EVS_INFORMATION; - LC_OperData.ADTPtr[30].EventID = 0; - LC_OperData.ADTPtr[30].EventText[0] = '\0'; - LC_OperData.ADTPtr[30].RPNEquation[0] = 0; - LC_OperData.ADTPtr[30].RPNEquation[1] = LC_RPN_EQUAL; - -} /* end Test_ValidateADT */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs tests on code that handles the set actionpoint state */ -/* command */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_SetAPState (void) -{ - LC_SetAPState_t SetAPStateCmd; - - /* Setup the test message header */ - CFE_SB_InitMsg(&SetAPStateCmd, LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); - - UTF_put_text("\n"); - UTF_put_text("**********************************\n"); - UTF_put_text("* LC Set Actionpoint State Tests *\n"); - UTF_put_text("**********************************\n"); - UTF_put_text("\n"); - - UTF_put_text("Test set AP state command with invalid new state\n"); - UTF_put_text("------------------------------------------------\n"); - SetAPStateCmd.APNumber = 100; - SetAPStateCmd.NewAPState = 100; - LC_SetAPStateCmd((CFE_SB_MsgPtr_t)&SetAPStateCmd); - UTF_put_text("\n"); - - UTF_put_text("Test set AP state command with invalid AP number\n"); - UTF_put_text("------------------------------------------------\n"); - SetAPStateCmd.APNumber = LC_MAX_ACTIONPOINTS + 1; - SetAPStateCmd.NewAPState = LC_APSTATE_PASSIVE; - LC_SetAPStateCmd((CFE_SB_MsgPtr_t)&SetAPStateCmd); - UTF_put_text("\n"); - - UTF_put_text("Test set AP state command with invalid current AP state\n"); - UTF_put_text("-------------------------------------------------------\n"); - SetAPStateCmd.APNumber = 100; /* Current state is LC_ACTION_NOT_USED */ - SetAPStateCmd.NewAPState = LC_APSTATE_PASSIVE; - LC_SetAPStateCmd((CFE_SB_MsgPtr_t)&SetAPStateCmd); - UTF_put_text("\n"); - - UTF_put_text("Test good set AP state command for a single AP\n"); - UTF_put_text("----------------------------------------------\n"); - LC_OperData.ARTPtr[100].CurrentState = LC_APSTATE_ACTIVE; - SetAPStateCmd.APNumber = 100; - SetAPStateCmd.NewAPState = LC_APSTATE_PASSIVE; - LC_SetAPStateCmd((CFE_SB_MsgPtr_t)&SetAPStateCmd); - UTF_put_text("\n"); - - UTF_put_text("Test good set AP state command for all APs\n"); - UTF_put_text("------------------------------------------\n"); - /* - ** Set all actionpoints ACTIVE, which will only set the one - ** used previously since all others are unused - */ - SetAPStateCmd.APNumber = LC_ALL_ACTIONPOINTS; - SetAPStateCmd.NewAPState = LC_APSTATE_ACTIVE; - LC_SetAPStateCmd((CFE_SB_MsgPtr_t)&SetAPStateCmd); - UTF_put_text("\n"); - - /* - ** Reset the actionpoint entry that we used - */ - LC_OperData.ARTPtr[100].CurrentState = LC_ACTION_NOT_USED; - -} /* end Test_SetAPState */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs tests on code that handles the set actionpoint state */ -/* to permananetly off command */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_SetAPOff (void) -{ - LC_SetAPPermOff_t SetAPOffCmd; - - /* Setup the test message header */ - CFE_SB_InitMsg(&SetAPOffCmd, LC_CMD_MID, sizeof(LC_SetAPPermOff_t), TRUE); - - UTF_put_text("\n"); - UTF_put_text("**********************************\n"); - UTF_put_text("* LC Set Actionpoint Off Tests *\n"); - UTF_put_text("**********************************\n"); - UTF_put_text("\n"); - - UTF_put_text("Test set AP off command with invalid AP number\n"); - UTF_put_text("----------------------------------------------\n"); - SetAPOffCmd.APNumber = LC_MAX_ACTIONPOINTS + 1; - LC_SetAPPermOffCmd((CFE_SB_MsgPtr_t)&SetAPOffCmd); - UTF_put_text("\n"); - - UTF_put_text("Test set AP off command with invalid current AP state\n"); - UTF_put_text("-----------------------------------------------------\n"); - SetAPOffCmd.APNumber = 100; /* Current state is LC_ACTION_NOT_USED */ - LC_SetAPPermOffCmd((CFE_SB_MsgPtr_t)&SetAPOffCmd); - UTF_put_text("\n"); - - UTF_put_text("Test good set AP off command\n"); - UTF_put_text("----------------------------\n"); - LC_OperData.ARTPtr[100].CurrentState = LC_APSTATE_DISABLED; - SetAPOffCmd.APNumber = 100; - LC_SetAPPermOffCmd((CFE_SB_MsgPtr_t)&SetAPOffCmd); - UTF_put_text("\n"); - - /* - ** Reset the actionpoint entry that we used - */ - LC_OperData.ARTPtr[100].CurrentState = LC_ACTION_NOT_USED; - -} /* end Test_SetAPOff */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Runs tests on code that handles actionpoint sampling */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_SampleAP (void) -{ - LC_SampleAP_t SampleAPMsg; - - /* Setup the test message header */ - CFE_SB_InitMsg(&SampleAPMsg, LC_SAMPLE_AP_MID, sizeof(LC_SampleAP_t), TRUE); - - UTF_put_text("\n"); - UTF_put_text("*******************************\n"); - UTF_put_text("* LC Sample Actionpoint Tests *\n"); - UTF_put_text("*******************************\n"); - UTF_put_text("\n"); - - /* - ** Set the LC application state to active - */ - LC_AppData.CurrentLCState = LC_STATE_ACTIVE; - - UTF_put_text("Test sample AP message with invalid AP number\n"); - UTF_put_text("---------------------------------------------\n"); - SampleAPMsg.StartIndex = LC_MAX_ACTIONPOINTS + 1; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message with invalid current AP state\n"); - UTF_put_text("-----------------------------------------------------------\n"); - SampleAPMsg.StartIndex = 75; /* Current state is LC_ACTION_NOT_USED */ - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - UTF_put_text("Test sample all APs message \n"); - UTF_put_text("----------------------------\n"); - /* - ** This is just for code coverage since all APs are currently - ** set to LC_ACTION_NOT_USED nothing will trigger - */ - SampleAPMsg.StartIndex = LC_ALL_ACTIONPOINTS; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - /* - ** Setup an actionpoint definition - */ - LC_OperData.ADTPtr[75].DefaultState = LC_APSTATE_ACTIVE; - LC_OperData.ADTPtr[75].RTSId = 20; - LC_OperData.ADTPtr[75].MaxFailsBeforeRTS = 5; - LC_OperData.ADTPtr[75].EventType = CFE_EVS_INFORMATION; - LC_OperData.ADTPtr[75].RPNEquation[0] = 4; - LC_OperData.ADTPtr[75].RPNEquation[1] = LC_RPN_EQUAL; - - /* - ** Setup the AP results - */ - LC_OperData.ARTPtr[75].ActionResult = LC_ACTION_STALE; - LC_OperData.ARTPtr[75].CurrentState = LC_APSTATE_ACTIVE; - LC_OperData.ARTPtr[75].FailToPassCount = 0; - LC_OperData.ARTPtr[75].PassToFailCount = 0; - LC_OperData.ARTPtr[75].ConsecutiveFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeRTSExecCount = 0; - - /* - ** Setup the watch result - */ - LC_OperData.WRTPtr[4].WatchResult = LC_WATCH_STALE; - - UTF_put_text("Test sample single AP message with watch not measured\n"); - UTF_put_text("-----------------------------------------------------\n"); - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message with watch error\n"); - UTF_put_text("----------------------------------------------\n"); - LC_OperData.WRTPtr[4].WatchResult = LC_WATCH_ERROR; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - /* - ** Setup the watch results for the next set of tests - */ - LC_OperData.WRTPtr[4].WatchResult = LC_WATCH_FALSE; - LC_OperData.WRTPtr[5].WatchResult = LC_WATCH_FALSE; - - UTF_put_text("Test sample single AP message with bad RPN expression\n"); - UTF_put_text("Expression terminated with LC_RPN_AND\n"); - UTF_put_text("-----------------------------------------------------\n"); - LC_OperData.ADTPtr[75].RPNEquation[1] = LC_RPN_AND; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message with bad RPN expression\n"); - UTF_put_text("Expression terminated with LC_RPN_OR\n"); - UTF_put_text("-----------------------------------------------------\n"); - LC_OperData.ADTPtr[75].RPNEquation[1] = LC_RPN_OR; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message with bad RPN expression\n"); - UTF_put_text("Expression terminated with LC_RPN_XOR\n"); - UTF_put_text("-----------------------------------------------------\n"); - LC_OperData.ADTPtr[75].RPNEquation[1] = LC_RPN_XOR; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message with bad RPN expression\n"); - UTF_put_text("Expression begins with LC_RPN_NOT\n"); - UTF_put_text("-----------------------------------------------------\n"); - LC_OperData.ADTPtr[75].RPNEquation[0] = LC_RPN_NOT; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message with bad RPN expression\n"); - UTF_put_text("Premature LC_RPN_EQUAL in expression\n"); - UTF_put_text("-----------------------------------------------------\n"); - LC_OperData.ADTPtr[75].RPNEquation[0] = 4; - LC_OperData.ADTPtr[75].RPNEquation[1] = 5; - LC_OperData.ADTPtr[75].RPNEquation[2] = LC_RPN_EQUAL; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message with bad RPN expression\n"); - UTF_put_text("Expression runs beyond LC_MAX_RPN_EQU_SIZE\n"); - UTF_put_text("-----------------------------------------------------\n"); - LC_OperData.ADTPtr[75].RPNEquation[0] = 4; - LC_OperData.ADTPtr[75].RPNEquation[1] = 5; - LC_OperData.ADTPtr[75].RPNEquation[2] = 4; - LC_OperData.ADTPtr[75].RPNEquation[3] = 5; - LC_OperData.ADTPtr[75].RPNEquation[4] = 4; - LC_OperData.ADTPtr[75].RPNEquation[5] = 5; - LC_OperData.ADTPtr[75].RPNEquation[6] = 4; - LC_OperData.ADTPtr[75].RPNEquation[7] = 5; - LC_OperData.ADTPtr[75].RPNEquation[8] = 4; - LC_OperData.ADTPtr[75].RPNEquation[9] = 5; - LC_OperData.ADTPtr[75].RPNEquation[10] = 4; - LC_OperData.ADTPtr[75].RPNEquation[11] = 5; - LC_OperData.ADTPtr[75].RPNEquation[12] = 5; - LC_OperData.ADTPtr[75].RPNEquation[13] = 4; - LC_OperData.ADTPtr[75].RPNEquation[14] = 5; - LC_OperData.ADTPtr[75].RPNEquation[15] = 4; - LC_OperData.ADTPtr[75].RPNEquation[16] = 5; - LC_OperData.ADTPtr[75].RPNEquation[17] = 4; - LC_OperData.ADTPtr[75].RPNEquation[18] = 5; - LC_OperData.ADTPtr[75].RPNEquation[19] = 4; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - UTF_put_text("\n"); - - /* - ** Setup an actionpoint definition - */ - LC_OperData.ADTPtr[75].DefaultState = LC_APSTATE_ACTIVE; - LC_OperData.ADTPtr[75].RTSId = 20; - LC_OperData.ADTPtr[75].MaxFailsBeforeRTS = 1; - LC_OperData.ADTPtr[75].EventType = CFE_EVS_INFORMATION; - LC_OperData.ADTPtr[75].EventID = 455; - strcpy (LC_OperData.ADTPtr[75].EventText, "Test event text"); - LC_OperData.ADTPtr[75].RPNEquation[0] = 4; - LC_OperData.ADTPtr[75].RPNEquation[1] = LC_RPN_EQUAL; - - /* - ** Setup the AP results - */ - LC_OperData.ARTPtr[75].ActionResult = LC_ACTION_PASS; - LC_OperData.ARTPtr[75].CurrentState = LC_APSTATE_ACTIVE; - LC_OperData.ARTPtr[75].FailToPassCount = 0; - LC_OperData.ARTPtr[75].PassToFailCount = 0; - LC_OperData.ARTPtr[75].ConsecutiveFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeRTSExecCount = 0; - - /* - ** Setup the watch result - */ - LC_OperData.WRTPtr[4].WatchResult = LC_WATCH_TRUE; - - UTF_put_text("Test sample single AP message, PASS to FAIL Transition\n"); - UTF_put_text("-----------------------------------------------------\n"); - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - PrintARTEntry (75); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message, PASS to FAIL Transition\n"); - UTF_put_text("While LC state = LC_STATE_PASSIVE\n"); - UTF_put_text("-----------------------------------------------------\n"); - LC_AppData.CurrentLCState = LC_STATE_PASSIVE; - LC_OperData.ARTPtr[75].ActionResult = LC_ACTION_PASS; - LC_OperData.ARTPtr[75].CurrentState = LC_APSTATE_ACTIVE; - LC_OperData.ARTPtr[75].FailToPassCount = 0; - LC_OperData.ARTPtr[75].PassToFailCount = 0; - LC_OperData.ARTPtr[75].ConsecutiveFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeRTSExecCount = 0; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - PrintARTEntry (75); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message, PASS to FAIL Transition\n"); - UTF_put_text("While AP state = LC_APSTATE_PASSIVE\n"); - UTF_put_text("-----------------------------------------------------\n"); - LC_AppData.CurrentLCState = LC_STATE_ACTIVE; - LC_OperData.ARTPtr[75].ActionResult = LC_ACTION_PASS; - LC_OperData.ARTPtr[75].CurrentState = LC_APSTATE_PASSIVE; - LC_OperData.ARTPtr[75].FailToPassCount = 0; - LC_OperData.ARTPtr[75].PassToFailCount = 0; - LC_OperData.ARTPtr[75].ConsecutiveFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeRTSExecCount = 0; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - PrintARTEntry (75); - UTF_put_text("\n"); - - UTF_put_text("Test sample single AP message, FAIL to PASS Transition\n"); - UTF_put_text("------------------------------------------------------\n"); - LC_AppData.CurrentLCState = LC_STATE_ACTIVE; - LC_OperData.WRTPtr[4].WatchResult = LC_WATCH_FALSE; - LC_OperData.ARTPtr[75].ActionResult = LC_ACTION_FAIL; - LC_OperData.ARTPtr[75].CurrentState = LC_APSTATE_ACTIVE; - LC_OperData.ARTPtr[75].FailToPassCount = 0; - LC_OperData.ARTPtr[75].PassToFailCount = 0; - LC_OperData.ARTPtr[75].ConsecutiveFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeRTSExecCount = 0; - SampleAPMsg.StartIndex = 75; - SampleAPMsg.EndIndex = SampleAPMsg.StartIndex; - LC_SampleAPReq((CFE_SB_MsgPtr_t)&SampleAPMsg); - PrintARTEntry (75); - UTF_put_text("\n"); - - /* - ** Reset the data that we used - */ - LC_AppData.CurrentLCState = LC_STATE_ACTIVE; - - LC_OperData.WRTPtr[4].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[5].WatchResult = LC_WATCH_STALE; - - LC_OperData.ARTPtr[75].ActionResult = LC_ACTION_STALE; - LC_OperData.ARTPtr[75].CurrentState = LC_ACTION_NOT_USED; - LC_OperData.ARTPtr[75].FailToPassCount = 0; - LC_OperData.ARTPtr[75].PassToFailCount = 0; - LC_OperData.ARTPtr[75].ConsecutiveFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeFailCount = 0; - LC_OperData.ARTPtr[75].CumulativeRTSExecCount = 0; - - LC_OperData.ADTPtr[75].DefaultState = LC_ACTION_NOT_USED; - LC_OperData.ADTPtr[75].RTSId = 0; - LC_OperData.ADTPtr[75].MaxFailsBeforeRTS = 0; - LC_OperData.ADTPtr[75].EventType = CFE_EVS_INFORMATION; - LC_OperData.ADTPtr[75].EventID = 0; - LC_OperData.ADTPtr[75].EventText[0] ='\0'; - LC_OperData.ADTPtr[75].RPNEquation[0] = 0; - LC_OperData.ADTPtr[75].RPNEquation[1] = LC_RPN_EQUAL; - -} /* end Test_SampleAP */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Run tests on code that handles watchpoint processing */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_WPProcessing (void) -{ - - UTF_put_text("Test creation of WP hash table\n"); - UTF_put_text("--------------------------------------------------\n"); - LC_OperData.WDTPtr[11].DataType = LC_DATA_BYTE; - LC_OperData.WDTPtr[11].OperatorID = LC_OPER_EQ; - LC_OperData.WDTPtr[11].MessageID = 0x400; - LC_OperData.WDTPtr[11].WatchpointOffset = 12; - LC_OperData.WDTPtr[11].BitMask = 0xFF; - LC_OperData.WDTPtr[11].ComparisonValue.Signed8in32.Signed8 = 0x12; - LC_OperData.WDTPtr[12].DataType = LC_DATA_UBYTE; - LC_OperData.WDTPtr[12].OperatorID = LC_OPER_EQ; - LC_OperData.WDTPtr[12].MessageID = 0x401; - LC_OperData.WDTPtr[12].WatchpointOffset = 12; - LC_OperData.WDTPtr[12].BitMask = 0xFF; - LC_OperData.WDTPtr[12].ComparisonValue.Unsigned8in32.Unsigned8 = 0x12; - LC_OperData.WDTPtr[13].DataType = LC_DATA_BYTE; - LC_OperData.WDTPtr[13].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[13].MessageID = 0x400; - LC_OperData.WDTPtr[13].WatchpointOffset = 12; - LC_OperData.WDTPtr[13].BitMask = 0xFF; - LC_OperData.WDTPtr[13].ComparisonValue.Signed8in32.Signed8 = 0x12; - LC_OperData.WDTPtr[14].DataType = LC_DATA_UBYTE; - LC_OperData.WDTPtr[14].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[14].MessageID = 0x401; - LC_OperData.WDTPtr[14].WatchpointOffset = 12; - LC_OperData.WDTPtr[14].BitMask = 0xFF; - LC_OperData.WDTPtr[14].ComparisonValue.Unsigned8in32.Unsigned8 = 0x12; - LC_OperData.WDTPtr[15].DataType = LC_DATA_BYTE; - LC_OperData.WDTPtr[15].OperatorID = LC_OPER_GE; - LC_OperData.WDTPtr[15].MessageID = 0x400; - LC_OperData.WDTPtr[15].WatchpointOffset = 12; - LC_OperData.WDTPtr[15].BitMask = 0xFF; - LC_OperData.WDTPtr[15].ComparisonValue.Signed8in32.Signed8 = 0x12; - LC_OperData.WDTPtr[16].DataType = LC_DATA_BYTE; - LC_OperData.WDTPtr[16].OperatorID = LC_OPER_GT; - LC_OperData.WDTPtr[16].MessageID = 0x400; - LC_OperData.WDTPtr[16].WatchpointOffset = 12; - LC_OperData.WDTPtr[16].BitMask = 0xFF; - LC_OperData.WDTPtr[16].ComparisonValue.Signed8in32.Signed8 = 0x12; - LC_OperData.WDTPtr[17].DataType = LC_DATA_UBYTE; - LC_OperData.WDTPtr[17].OperatorID = LC_OPER_GT; - LC_OperData.WDTPtr[17].MessageID = 0x401; - LC_OperData.WDTPtr[17].WatchpointOffset = 12; - LC_OperData.WDTPtr[17].BitMask = 0xFF; - LC_OperData.WDTPtr[17].ComparisonValue.Unsigned8in32.Unsigned8 = 0x12; - LC_OperData.WDTPtr[18].DataType = LC_DATA_UBYTE; - LC_OperData.WDTPtr[18].OperatorID = LC_OPER_GE; - LC_OperData.WDTPtr[18].MessageID = 0x401; - LC_OperData.WDTPtr[18].WatchpointOffset = 12; - LC_OperData.WDTPtr[18].BitMask = 0xFF; - LC_OperData.WDTPtr[18].ComparisonValue.Unsigned8in32.Unsigned8 = 0x12; - - LC_OperData.WDTPtr[21].DataType = LC_DATA_BYTE; - LC_OperData.WDTPtr[21].OperatorID = LC_OPER_LE; - LC_OperData.WDTPtr[21].MessageID = 0x400; - LC_OperData.WDTPtr[21].WatchpointOffset = 12; - LC_OperData.WDTPtr[21].BitMask = 0xFF; - LC_OperData.WDTPtr[21].ComparisonValue.Signed8in32.Signed8 = 0x12; - LC_OperData.WDTPtr[22].DataType = LC_DATA_BYTE; - LC_OperData.WDTPtr[22].OperatorID = LC_OPER_LT; - LC_OperData.WDTPtr[22].MessageID = 0x400; - LC_OperData.WDTPtr[22].WatchpointOffset = 12; - LC_OperData.WDTPtr[22].BitMask = 0xFF; - LC_OperData.WDTPtr[22].ComparisonValue.Signed8in32.Signed8 = 0x12; - LC_OperData.WDTPtr[23].DataType = LC_DATA_BYTE; - LC_OperData.WDTPtr[23].OperatorID = LC_OPER_LT; - LC_OperData.WDTPtr[23].MessageID = 0x400; - LC_OperData.WDTPtr[23].WatchpointOffset = 24; - LC_OperData.WDTPtr[23].BitMask = 0xFF; - LC_OperData.WDTPtr[23].ComparisonValue.Signed8in32.Signed8 = 0x12; - LC_OperData.WDTPtr[24].DataType = LC_DATA_UBYTE; - LC_OperData.WDTPtr[24].OperatorID = LC_OPER_LT; - LC_OperData.WDTPtr[24].MessageID = 0x401; - LC_OperData.WDTPtr[24].WatchpointOffset = 12; - LC_OperData.WDTPtr[24].BitMask = 0xFF; - LC_OperData.WDTPtr[24].ComparisonValue.Unsigned8in32.Unsigned8 = 0x12; - LC_OperData.WDTPtr[25].DataType = LC_DATA_UBYTE; - LC_OperData.WDTPtr[25].OperatorID = LC_OPER_LE; - LC_OperData.WDTPtr[25].MessageID = 0x401; - LC_OperData.WDTPtr[25].WatchpointOffset = 12; - LC_OperData.WDTPtr[25].BitMask = 0xFF; - LC_OperData.WDTPtr[25].ComparisonValue.Unsigned8in32.Unsigned8 = 0x12; - - LC_OperData.WDTPtr[31].DataType = LC_DATA_WORD_LE; - LC_OperData.WDTPtr[31].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[31].MessageID = 0x400; - LC_OperData.WDTPtr[31].WatchpointOffset = 12; - LC_OperData.WDTPtr[31].BitMask = 0xFFFF; - LC_OperData.WDTPtr[31].ComparisonValue.Signed16in32.Signed16 = 0x1234; - LC_OperData.WDTPtr[32].DataType = LC_DATA_WORD_BE; - LC_OperData.WDTPtr[32].OperatorID = LC_OPER_EQ; - LC_OperData.WDTPtr[32].MessageID = 0x400; - LC_OperData.WDTPtr[32].WatchpointOffset = 16; - LC_OperData.WDTPtr[32].BitMask = 0xFFFF; - LC_OperData.WDTPtr[32].ComparisonValue.Unsigned16in32.Unsigned16 = 0x1234; - LC_OperData.WDTPtr[33].DataType = LC_DATA_UWORD_LE; - LC_OperData.WDTPtr[33].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[33].MessageID = 0x401; - LC_OperData.WDTPtr[33].WatchpointOffset = 12; - LC_OperData.WDTPtr[33].BitMask = 0xFFFF; - LC_OperData.WDTPtr[33].ComparisonValue.Signed16in32.Signed16 = 0x1234; - LC_OperData.WDTPtr[34].DataType = LC_DATA_UWORD_BE; - LC_OperData.WDTPtr[34].OperatorID = LC_OPER_EQ; - LC_OperData.WDTPtr[34].MessageID = 0x401; - LC_OperData.WDTPtr[34].WatchpointOffset = 16; - LC_OperData.WDTPtr[34].BitMask = 0xFFFF; - LC_OperData.WDTPtr[34].ComparisonValue.Unsigned16in32.Unsigned16 = 0x1234; - - LC_OperData.WDTPtr[41].DataType = LC_DATA_DWORD_LE; - LC_OperData.WDTPtr[41].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[41].MessageID = 0x500; - LC_OperData.WDTPtr[41].WatchpointOffset = 12; - LC_OperData.WDTPtr[41].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[41].ComparisonValue.Signed32 = 0x12345678; - LC_OperData.WDTPtr[42].DataType = LC_DATA_DWORD_BE; - LC_OperData.WDTPtr[42].OperatorID = LC_OPER_EQ; - LC_OperData.WDTPtr[42].MessageID = 0x500; - LC_OperData.WDTPtr[42].WatchpointOffset = 16; - LC_OperData.WDTPtr[42].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[42].ComparisonValue.Unsigned32 = 0x12345678; - LC_OperData.WDTPtr[43].DataType = LC_DATA_UDWORD_LE; - LC_OperData.WDTPtr[43].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[43].MessageID = 0x501; - LC_OperData.WDTPtr[43].WatchpointOffset = 12; - LC_OperData.WDTPtr[43].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[43].ComparisonValue.Signed32 = 0x12345678; - LC_OperData.WDTPtr[44].DataType = LC_DATA_UDWORD_BE; - LC_OperData.WDTPtr[44].OperatorID = LC_OPER_EQ; - LC_OperData.WDTPtr[44].MessageID = 0x501; - LC_OperData.WDTPtr[44].WatchpointOffset = 16; - LC_OperData.WDTPtr[44].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[44].ComparisonValue.Unsigned32 = 0x12345678; - - LC_OperData.WDTPtr[51].DataType = LC_DATA_FLOAT_BE; - LC_OperData.WDTPtr[51].OperatorID = LC_OPER_EQ; - LC_OperData.WDTPtr[51].MessageID = 0x500; - LC_OperData.WDTPtr[51].WatchpointOffset = 12; - LC_OperData.WDTPtr[51].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[51].ComparisonValue.Float32 = 1.5; - LC_OperData.WDTPtr[52].DataType = LC_DATA_FLOAT_BE; - LC_OperData.WDTPtr[52].OperatorID = LC_OPER_NE; - LC_OperData.WDTPtr[52].MessageID = 0x500; - LC_OperData.WDTPtr[52].WatchpointOffset = 16; - LC_OperData.WDTPtr[52].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[52].ComparisonValue.Float32 = 1.5; - LC_OperData.WDTPtr[53].DataType = LC_DATA_FLOAT_BE; - LC_OperData.WDTPtr[53].OperatorID = LC_OPER_GT; - LC_OperData.WDTPtr[53].MessageID = 0x500; - LC_OperData.WDTPtr[53].WatchpointOffset = 12; - LC_OperData.WDTPtr[53].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[53].ComparisonValue.Float32 = 1.5; - LC_OperData.WDTPtr[54].DataType = LC_DATA_FLOAT_BE; - LC_OperData.WDTPtr[54].OperatorID = LC_OPER_GE; - LC_OperData.WDTPtr[54].MessageID = 0x500; - LC_OperData.WDTPtr[54].WatchpointOffset = 16; - LC_OperData.WDTPtr[54].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[54].ComparisonValue.Float32 = 1.5; - LC_OperData.WDTPtr[55].DataType = LC_DATA_FLOAT_BE; - LC_OperData.WDTPtr[55].OperatorID = LC_OPER_LT; - LC_OperData.WDTPtr[55].MessageID = 0x500; - LC_OperData.WDTPtr[55].WatchpointOffset = 12; - LC_OperData.WDTPtr[55].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[55].ComparisonValue.Float32 = 1.5; - LC_OperData.WDTPtr[56].DataType = LC_DATA_FLOAT_BE; - LC_OperData.WDTPtr[56].OperatorID = LC_OPER_LE; - LC_OperData.WDTPtr[56].MessageID = 0x500; - LC_OperData.WDTPtr[56].WatchpointOffset = 16; - LC_OperData.WDTPtr[56].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[56].ComparisonValue.Float32 = 1.5; - - LC_OperData.WDTPtr[61].DataType = LC_DATA_DWORD_BE; - LC_OperData.WDTPtr[61].OperatorID = LC_OPER_CUSTOM; - LC_OperData.WDTPtr[61].MessageID = 0x600; - LC_OperData.WDTPtr[61].WatchpointOffset = 12; - LC_OperData.WDTPtr[61].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[61].ComparisonValue.Unsigned32 = 0x12345678; - - LC_OperData.WDTPtr[62].DataType = 99; - LC_OperData.WDTPtr[62].OperatorID = LC_OPER_EQ; - LC_OperData.WDTPtr[62].MessageID = 0x600; - LC_OperData.WDTPtr[62].WatchpointOffset = 12; - LC_OperData.WDTPtr[62].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[62].ComparisonValue.Unsigned32 = 0x12345678; - - LC_OperData.WDTPtr[63].DataType = LC_DATA_DWORD_BE; - LC_OperData.WDTPtr[63].OperatorID = 99; - LC_OperData.WDTPtr[63].MessageID = 0x600; - LC_OperData.WDTPtr[63].WatchpointOffset = 12; - LC_OperData.WDTPtr[63].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[63].ComparisonValue.Unsigned32 = 0x12345678; - - LC_OperData.WDTPtr[64].DataType = LC_DATA_UDWORD_BE; - LC_OperData.WDTPtr[64].OperatorID = 99; - LC_OperData.WDTPtr[64].MessageID = 0x600; - LC_OperData.WDTPtr[64].WatchpointOffset = 12; - LC_OperData.WDTPtr[64].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[64].ComparisonValue.Unsigned32 = 0x12345678; - - LC_OperData.WDTPtr[65].DataType = LC_DATA_FLOAT_BE; - LC_OperData.WDTPtr[65].OperatorID = 99; - LC_OperData.WDTPtr[65].MessageID = 0x600; - LC_OperData.WDTPtr[65].WatchpointOffset = 12; - LC_OperData.WDTPtr[65].BitMask = 0xFFFFFFFF; - LC_OperData.WDTPtr[65].ComparisonValue.Unsigned32 = 0x12345678; - - LC_CreateHashTable(); - LC_CreateHashTable(); - - UTF_put_text("\n"); - - UTF_put_text("Test process TLM packet\n"); - UTF_put_text("--------------------------------------------------\n"); - - CFE_SB_InitMsg(&LC_TestPacket1, 0x400, sizeof(LC_TestPacket1_t), TRUE); - LC_TestPacket1.Data1 = 0x12345678; - LC_TestPacket1.Data2 = 0x12345678; - LC_TestPacket1.Data3 = 1.5; - LC_CheckMsgForWPs(0x400, (CFE_SB_MsgPtr_t) &LC_TestPacket1); - - CFE_SB_InitMsg(&LC_TestPacket1, 0x401, sizeof(LC_TestPacket1_t), TRUE); - LC_TestPacket1.Data1 = 0x12345678; - LC_TestPacket1.Data2 = 0x12345678; - LC_TestPacket1.Data3 = 1.5; - LC_CheckMsgForWPs(0x401, (CFE_SB_MsgPtr_t) &LC_TestPacket1); - - CFE_SB_InitMsg(&LC_TestPacket1, 0x500, sizeof(LC_TestPacket1_t), TRUE); - LC_TestPacket1.Data1 = 0x12345678; - LC_TestPacket1.Data2 = 0x12345678; - LC_TestPacket1.Data3 = 1.5; - LC_CheckMsgForWPs(0x500, (CFE_SB_MsgPtr_t) &LC_TestPacket1); - - CFE_SB_InitMsg(&LC_TestPacket2, 0x501, sizeof(LC_TestPacket2_t), TRUE); - LC_TestPacket2.Data1 = 0x12345678; - LC_TestPacket2.Data2 = 0x12345678; - LC_TestPacket2.Data3 = 0x12345678; - LC_CheckMsgForWPs(0x501, (CFE_SB_MsgPtr_t) &LC_TestPacket2); - - CFE_SB_InitMsg(&LC_TestPacket2, 0x600, sizeof(LC_TestPacket2_t), TRUE); - LC_TestPacket2.Data1 = 0x12345678; - LC_TestPacket2.Data2 = 0x12345678; - LC_TestPacket2.Data3 = 0x12345678; - LC_CheckMsgForWPs(0x600, (CFE_SB_MsgPtr_t) &LC_TestPacket2); - UTF_put_text("\n"); - - CFE_SB_InitMsg(&LC_TestPacket2, 0x600, sizeof(LC_TestPacket2_t), TRUE); - LC_TestPacket2.Data1 = 0x12345678; - LC_TestPacket2.Data2 = 0x12345678; - LC_TestPacket2.Data3 = 0x12345678; - LC_CheckMsgForWPs(0x700, (CFE_SB_MsgPtr_t) &LC_TestPacket2); - UTF_put_text("\n"); - - return; - -} /* end Test_WPProcessing */ - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Run tests on code that handles LC_CMD_MID commands */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_CmdHandlers (void) -{ - /* MID = not a LC command (process watchpoints) */ - CFE_SB_InitMsg(&LC_TestPacket1, 0x400, sizeof(LC_TestPacket1_t), TRUE); - LC_TestPacket1.Data1 = 0x12345678; - LC_TestPacket1.Data2 = 0x12345678; - LC_TestPacket1.Data3 = 1.5; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_TestPacket1); - - /* MID = LC_SAMPLE_AP_MID, invalid packet length */ - CFE_SB_InitMsg(&LC_BigCmdPacket, LC_SAMPLE_AP_MID, sizeof(LC_BigCmdPacket_t), TRUE); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_BigCmdPacket); - - /* MID = LC_SAMPLE_AP_MID, invalid start index (too big) */ - CFE_SB_InitMsg(&LC_SampleAP, LC_SAMPLE_AP_MID, sizeof(LC_SampleAP_t), TRUE); - LC_SampleAP.StartIndex = LC_MAX_ACTIONPOINTS; - LC_SampleAP.EndIndex = LC_MAX_ACTIONPOINTS - 1; - LC_SampleAP.UpdateAge = FALSE; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SampleAP); - - /* MID = LC_SAMPLE_AP_MID, invalid end index (too big) */ - CFE_SB_InitMsg(&LC_SampleAP, LC_SAMPLE_AP_MID, sizeof(LC_SampleAP_t), TRUE); - LC_SampleAP.StartIndex = LC_MAX_ACTIONPOINTS - 1; - LC_SampleAP.EndIndex = LC_MAX_ACTIONPOINTS; - LC_SampleAP.UpdateAge = FALSE; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SampleAP); - - /* MID = LC_SAMPLE_AP_MID, success */ - CFE_SB_InitMsg(&LC_SampleAP, LC_SAMPLE_AP_MID, sizeof(LC_SampleAP_t), TRUE); - LC_SampleAP.StartIndex = LC_MAX_ACTIONPOINTS - 1; - LC_SampleAP.EndIndex = LC_MAX_ACTIONPOINTS - 1; - LC_SampleAP.UpdateAge = TRUE; - LC_OperData.WRTPtr[LC_MAX_WATCHPOINTS - 1].CountdownToStale = 1; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SampleAP); - - /* MID = LC_SEND_HK_MID, invalid packet length */ - CFE_SB_InitMsg(&LC_BigCmdPacket, LC_SEND_HK_MID, sizeof(LC_BigCmdPacket_t), TRUE); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_BigCmdPacket); - - /* MID = LC_SEND_HK_MID, success */ - CFE_SB_InitMsg(&LC_NoArgsCmd, LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); - LC_OperData.HaveActiveCDS = TRUE; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_NoArgsCmd); - LC_OperData.HaveActiveCDS = FALSE; - - /* MID = LC_CMD_MID, CC = invalid */ - CFE_SB_InitMsg(&LC_NoArgsCmd, LC_CMD_MID, sizeof(LC_NoArgsCmd_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_NoArgsCmd, 99); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_NoArgsCmd); - - /* CC = LC_NOOP_CC, invalid packet length */ - CFE_SB_InitMsg(&LC_BigCmdPacket, LC_CMD_MID, sizeof(LC_BigCmdPacket_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_BigCmdPacket, LC_NOOP_CC); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_BigCmdPacket); - - /* CC = LC_NOOP_CC, success */ - CFE_SB_InitMsg(&LC_NoArgsCmd, LC_CMD_MID, sizeof(LC_NoArgsCmd_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_NoArgsCmd, LC_NOOP_CC); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_NoArgsCmd); - - /* CC = LC_RESET_CC, invalid packet length */ - CFE_SB_InitMsg(&LC_BigCmdPacket, LC_CMD_MID, sizeof(LC_BigCmdPacket_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_BigCmdPacket, LC_RESET_CC); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_BigCmdPacket); - - /* CC = LC_RESET_CC, success */ - CFE_SB_InitMsg(&LC_NoArgsCmd, LC_CMD_MID, sizeof(LC_NoArgsCmd_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_NoArgsCmd, LC_RESET_CC); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_NoArgsCmd); - - /* CC = LC_SET_LC_STATE_CC, invalid packet length */ - CFE_SB_InitMsg(&LC_BigCmdPacket, LC_CMD_MID, sizeof(LC_BigCmdPacket_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_BigCmdPacket, LC_SET_LC_STATE_CC); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_BigCmdPacket); - - /* CC = LC_SET_LC_STATE_CC, invalid new LC state */ - CFE_SB_InitMsg(&LC_SetLCState, LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetLCState, LC_SET_LC_STATE_CC); - LC_SetLCState.NewLCState = 99; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetLCState); - - /* CC = LC_SET_LC_STATE_CC, success (LC_STATE_PASSIVE) */ - CFE_SB_InitMsg(&LC_SetLCState, LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetLCState, LC_SET_LC_STATE_CC); - LC_SetLCState.NewLCState = LC_STATE_PASSIVE; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetLCState); - - /* CC = LC_SET_LC_STATE_CC, success (LC_STATE_DISABLED) */ - CFE_SB_InitMsg(&LC_SetLCState, LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetLCState, LC_SET_LC_STATE_CC); - LC_SetLCState.NewLCState = LC_STATE_DISABLED; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetLCState); - - /* CC = LC_SET_LC_STATE_CC, success (LC_STATE_ACTIVE) */ - CFE_SB_InitMsg(&LC_SetLCState, LC_CMD_MID, sizeof(LC_SetLCState_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetLCState, LC_SET_LC_STATE_CC); - LC_SetLCState.NewLCState = LC_STATE_ACTIVE; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetLCState); - - /* CC = LC_SET_AP_STATE_CC, invalid packet length */ - CFE_SB_InitMsg(&LC_BigCmdPacket, LC_CMD_MID, sizeof(LC_BigCmdPacket_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_BigCmdPacket, LC_SET_AP_STATE_CC); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_BigCmdPacket); - - /* CC = LC_SET_AP_STATE_CC, invalid new AP state */ - CFE_SB_InitMsg(&LC_SetAPState, LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetAPState, LC_SET_AP_STATE_CC); - LC_SetAPState.APNumber = LC_MAX_ACTIONPOINTS - 1; - LC_SetAPState.NewAPState = 99; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetAPState); - - /* CC = LC_SET_AP_STATE_CC, invalid AP (too big) */ - CFE_SB_InitMsg(&LC_SetAPState, LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetAPState, LC_SET_AP_STATE_CC); - LC_SetAPState.APNumber = LC_MAX_ACTIONPOINTS; - LC_SetAPState.NewAPState = LC_APSTATE_ACTIVE; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetAPState); - - /* CC = LC_SET_AP_STATE_CC, success (LC_APSTATE_PASSIVE) */ - CFE_SB_InitMsg(&LC_SetAPState, LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetAPState, LC_SET_AP_STATE_CC); - LC_SetAPState.APNumber = LC_MAX_ACTIONPOINTS - 1; - LC_SetAPState.NewAPState = LC_APSTATE_PASSIVE; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetAPState); - - /* CC = LC_SET_AP_STATE_CC, success (LC_APSTATE_DISABLED) */ - CFE_SB_InitMsg(&LC_SetAPState, LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetAPState, LC_SET_AP_STATE_CC); - LC_SetAPState.APNumber = LC_MAX_ACTIONPOINTS - 1; - LC_SetAPState.NewAPState = LC_APSTATE_DISABLED; - LC_OperData.ARTPtr[LC_MAX_ACTIONPOINTS - 1].CurrentState = LC_APSTATE_PERMOFF; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetAPState); - LC_OperData.ARTPtr[LC_MAX_ACTIONPOINTS - 1].CurrentState = LC_APSTATE_DISABLED; - - /* CC = LC_SET_AP_STATE_CC, success (LC_APSTATE_ACTIVE) */ - CFE_SB_InitMsg(&LC_SetAPState, LC_CMD_MID, sizeof(LC_SetAPState_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetAPState, LC_SET_AP_STATE_CC); - LC_SetAPState.APNumber = LC_MAX_ACTIONPOINTS - 1; - LC_SetAPState.NewAPState = LC_APSTATE_ACTIVE; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetAPState); - - /* CC = LC_SET_AP_PERMOFF_CC, invalid packet length */ - CFE_SB_InitMsg(&LC_BigCmdPacket, LC_CMD_MID, sizeof(LC_BigCmdPacket_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_BigCmdPacket, LC_SET_AP_PERMOFF_CC); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_BigCmdPacket); - - /* CC = LC_SET_AP_PERMOFF_CC, invalid AP (too big) */ - CFE_SB_InitMsg(&LC_SetAPPermOff, LC_CMD_MID, sizeof(LC_SetAPPermOff_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_SetAPPermOff, LC_SET_AP_PERMOFF_CC); - LC_SetAPPermOff.APNumber = LC_MAX_ACTIONPOINTS; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_SetAPPermOff); - - /* CC = LC_RESET_AP_STATS_CC, invalid packet length */ - CFE_SB_InitMsg(&LC_BigCmdPacket, LC_CMD_MID, sizeof(LC_BigCmdPacket_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_BigCmdPacket, LC_RESET_AP_STATS_CC); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_BigCmdPacket); - - /* CC = LC_RESET_AP_STATS_CC, invalid AP (too big) */ - CFE_SB_InitMsg(&LC_ResetAPStats, LC_CMD_MID, sizeof(LC_ResetAPStats_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_ResetAPStats, LC_RESET_AP_STATS_CC); - LC_ResetAPStats.APNumber = LC_MAX_ACTIONPOINTS; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_ResetAPStats); - - /* CC = LC_RESET_AP_STATS_CC, success (all AP's) */ - CFE_SB_InitMsg(&LC_ResetAPStats, LC_CMD_MID, sizeof(LC_ResetAPStats_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_ResetAPStats, LC_RESET_AP_STATS_CC); - LC_ResetAPStats.APNumber = LC_ALL_ACTIONPOINTS; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_ResetAPStats); - - /* CC = LC_RESET_AP_STATS_CC, success (one AP) */ - CFE_SB_InitMsg(&LC_ResetAPStats, LC_CMD_MID, sizeof(LC_ResetAPStats_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_ResetAPStats, LC_RESET_AP_STATS_CC); - LC_ResetAPStats.APNumber = LC_MAX_ACTIONPOINTS - 1; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_ResetAPStats); - - /* CC = LC_RESET_WP_STATS_CC, invalid packet length */ - CFE_SB_InitMsg(&LC_BigCmdPacket, LC_CMD_MID, sizeof(LC_BigCmdPacket_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_BigCmdPacket, LC_RESET_WP_STATS_CC); - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_BigCmdPacket); - - /* CC = LC_RESET_WP_STATS_CC, invalid WP (too big) */ - CFE_SB_InitMsg(&LC_ResetWPStats, LC_CMD_MID, sizeof(LC_ResetWPStats_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_ResetWPStats, LC_RESET_WP_STATS_CC); - LC_ResetWPStats.WPNumber = LC_MAX_WATCHPOINTS; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_ResetWPStats); - - /* CC = LC_RESET_WP_STATS_CC, success (all AP's) */ - CFE_SB_InitMsg(&LC_ResetWPStats, LC_CMD_MID, sizeof(LC_ResetWPStats_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_ResetWPStats, LC_RESET_WP_STATS_CC); - LC_ResetWPStats.WPNumber = LC_ALL_WATCHPOINTS; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_ResetWPStats); - - /* CC = LC_RESET_WP_STATS_CC, success (one AP) */ - CFE_SB_InitMsg(&LC_ResetWPStats, LC_CMD_MID, sizeof(LC_ResetWPStats_t), TRUE); - CFE_SB_SetCmdCode((CFE_SB_Msg_t *) &LC_ResetWPStats, LC_RESET_WP_STATS_CC); - LC_ResetWPStats.WPNumber = LC_MAX_WATCHPOINTS - 1; - LC_AppPipe((CFE_SB_MsgPtr_t) &LC_ResetWPStats); - - /* Invoke reset AP & WP results functions with caller not a command handler */ - LC_ResetResultsAP(0, 0, FALSE); - LC_ResetResultsWP(0, 0, FALSE); - - UTF_put_text("\n"); - - return; - -} /* end Test_CmdHandlers */ - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Miscellaneous cleanup to complete coverage */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void Test_Coverage (void) -{ - LC_MultiType_t WPMultiType; - uint32 Test_Arg32; - - /* LC_SampleAPs() - Actionpoint isn't currently operational */ - LC_OperData.ARTPtr[0].CurrentState = LC_ACTION_NOT_USED; - LC_SampleAPs(0, 0); - LC_OperData.ARTPtr[0].CurrentState = LC_APSTATE_PERMOFF; - LC_SampleAPs(0, 0); - - /* LC_SampleSingleAP() - Send only a limited number of Pass to Fail events */ - LC_OperData.ARTPtr[0].CurrentState = LC_APSTATE_ACTIVE; - LC_OperData.ARTPtr[0].ActionResult = LC_ACTION_PASS; - LC_OperData.ARTPtr[0].ConsecutiveFailCount = 0; - LC_OperData.ARTPtr[0].CumulativeFailCount = 0; - LC_OperData.ARTPtr[0].PassToFailCount = 0; - LC_OperData.ADTPtr[0].MaxPassFailEvents = 1; - LC_OperData.ADTPtr[0].MaxFailsBeforeRTS = 5; - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_AND; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_TRUE; - LC_SampleSingleAP(0); - - /* LC_SampleSingleAP() - Send only a limited number of AP is Passive events */ - LC_OperData.ARTPtr[0].CurrentState = LC_APSTATE_PASSIVE; - LC_OperData.ARTPtr[0].ActionResult = LC_ACTION_PASS; - LC_OperData.ARTPtr[0].ConsecutiveFailCount = 0; - LC_OperData.ARTPtr[0].CumulativeFailCount = 0; - LC_OperData.ARTPtr[0].PassToFailCount = 0; - LC_OperData.ADTPtr[0].MaxPassFailEvents = 1; - LC_OperData.ADTPtr[0].MaxFailsBeforeRTS = 1; - LC_OperData.ARTPtr[0].PassiveAPCount = 0; - LC_OperData.ADTPtr[0].MaxPassiveEvents = 1; - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_AND; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_TRUE; - LC_SampleSingleAP(0); - - /* LC_SampleSingleAP() - Send only a limited number of Fail to Pass events */ - LC_OperData.ARTPtr[0].CurrentState = LC_APSTATE_ACTIVE; - LC_OperData.ARTPtr[0].ActionResult = LC_ACTION_FAIL; - LC_OperData.ARTPtr[0].ConsecutiveFailCount = 0; - LC_OperData.ARTPtr[0].CumulativeFailCount = 0; - LC_OperData.ARTPtr[0].FailToPassCount = 0; - LC_OperData.ADTPtr[0].MaxFailPassEvents = 1; - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_AND; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_FALSE; - LC_SampleSingleAP(0); - - /* LC_EvaluateRPN() - LC_RPN_AND: if either operand = LC_WATCH_ERROR */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_AND; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_ERROR; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_TRUE; - LC_EvaluateRPN(0); - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_AND; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_ERROR; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - LC_RPN_AND: if either operand = LC_WATCH_STALE */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_AND; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_TRUE; - LC_EvaluateRPN(0); - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_AND; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_STALE; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - LC_RPN_AND: else both operands = LC_WATCH_TRUE */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_AND; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_TRUE; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - LC_RPN_OR: if either operand = LC_WATCH_ERROR */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_OR; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_ERROR; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_FALSE; - LC_EvaluateRPN(0); - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_OR; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_FALSE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_ERROR; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - LC_RPN_OR: if either operand = LC_WATCH_STALE */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_OR; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_FALSE; - LC_EvaluateRPN(0); - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_OR; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_FALSE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_STALE; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - LC_RPN_OR: else both operands = LC_WATCH_FALSE */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_OR; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_FALSE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_FALSE; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - LC_RPN_XOR: if either operand = LC_WATCH_ERROR */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_XOR; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_ERROR; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_TRUE; - LC_EvaluateRPN(0); - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_XOR; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_ERROR; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - LC_RPN_XOR: if either operand = LC_WATCH_STALE */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_XOR; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_STALE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_TRUE; - LC_EvaluateRPN(0); - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = 1; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_XOR; - LC_OperData.ADTPtr[0].RPNEquation[3] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_TRUE; - LC_OperData.WRTPtr[1].WatchResult = LC_WATCH_STALE; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - LC_RPN_NOT: if operand = LC_WATCH_ERROR */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = LC_RPN_NOT; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_ERROR; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - LC_RPN_NOT: if operand = LC_WATCH_STALE */ - LC_OperData.ADTPtr[0].RPNEquation[0] = 0; - LC_OperData.ADTPtr[0].RPNEquation[1] = LC_RPN_NOT; - LC_OperData.ADTPtr[0].RPNEquation[2] = LC_RPN_EQUAL; - LC_OperData.WRTPtr[0].WatchResult = LC_WATCH_STALE; - LC_EvaluateRPN(0); - - /* LC_EvaluateRPN() - default: if RPNData >= LC_MAX_WATCHPOINTS */ - LC_OperData.ADTPtr[0].RPNEquation[0] = LC_MAX_WATCHPOINTS; - LC_EvaluateRPN(0); - - LC_OperData.ADTPtr = LC_UnitTestADT; - LC_OperData.WDTPtr = LC_UnitTestWDT; - - /* LC_OperatorCompare() - default: WP has invalid data type */ - LC_OperData.WDTPtr[0].DataType = 99; - LC_OperatorCompare(0, 0); - LC_OperData.WDTPtr[0].DataType = LC_WATCH_NOT_USED; - - /* LC_FloatCompare() - WPMultiType is NAN (not a number) */ - WPMultiType.Unsigned32 = 0x7F800001; - LC_FloatCompare(0, WPMultiType, WPMultiType); - - UTF_TBL_set_function_hook(CFE_TBL_MANAGE_HOOK, NULL); - UTF_TBL_set_function_hook(CFE_TBL_GETADDRESS_HOOK, NULL); - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_RELEASEADDRESS_PROC, CFE_SUCCESS); - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_MANAGE_PROC, CFE_SUCCESS); - - /* LC_ManageTables() - CFE_TBL_GetAddress = CFE_TBL_INFO_UPDATED */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_GETADDRESS_PROC, CFE_TBL_INFO_UPDATED); - LC_ManageTables(); - - /* LC_ManageTables() - CFE_TBL_GetAddress = CFE_SUCCESS */ - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_GETADDRESS_PROC, CFE_SUCCESS); - LC_ManageTables(); - - /* LC_ManageTables() - CFE_TBL_GetAddress (2nd call) = CFE_TBL_ERR_INVALID_HANDLE */ - UTF_TBL_set_function_hook(CFE_TBL_GETADDRESS_HOOK, CFE_TBL_GetAddress_FailOnN); - CFE_TBL_GetAddressCallCount = 0; - CFE_TBL_GetAddressFailCount = 1; - LC_ManageTables(); - - /* LC_HousekeepingReq() - LC_ManageTables = CFE_SUCCESS */ - UTF_TBL_set_function_hook(CFE_TBL_GETADDRESS_HOOK, NULL); - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_GETADDRESS_PROC, CFE_SUCCESS); - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_RELEASEADDRESS_PROC, CFE_SUCCESS); - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_MANAGE_PROC, CFE_SUCCESS); - CFE_SB_InitMsg(&LC_NoArgsCmd, LC_SEND_HK_MID, sizeof(LC_NoArgsCmd_t), TRUE); - LC_HousekeepingReq((CFE_SB_MsgPtr_t) &LC_NoArgsCmd); - - /* LC_AddWatchpoint() - CFE_SB_Subscribe = CFE_SB_BAD_ARGUMENT */ - UTF_SB_set_function_hook(CFE_SB_SUBSCRIBE_HOOK, NULL); - UTF_CFE_SB_Set_Api_Return_Code(CFE_SB_SUBSCRIBE_PROC, CFE_SB_BAD_ARGUMENT); - /* called from LC_CreateHashTable() - see next test element */ - - /* LC_CreateHashTable() - CFE_SB_Unsubscribe = CFE_SB_NO_SUBSCRIBERS */ - UTF_CFE_SB_Set_Api_Return_Code(CFE_SB_UNSUBSCRIBE_PROC, CFE_SB_NO_SUBSCRIBERS); - LC_CreateHashTable(); - - /* LC_GetSizedWPData() - default: WP has invalid data type */ - LC_OperData.WDTPtr[0].DataType = 99; - LC_GetSizedWPData(0, (uint8 *) &Test_Arg32, &Test_Arg32); - - - UTF_TBL_set_function_hook(CFE_TBL_LOAD_HOOK, CFE_TBL_Load_FailOnN); - UTF_TBL_set_function_hook(CFE_TBL_GETADDRESS_HOOK, CFE_TBL_GetAddress_FailOnN); - UTF_TBL_set_function_hook(CFE_TBL_REGISTER_HOOK, CFE_TBL_Register_FailOnN); - - /* LC_LoadDefaultTables() - CFE_TBL_Load (WDT) = CFE_TBL_ERR_INVALID_HANDLE */ - CFE_TBL_LoadCallCount = 1; - CFE_TBL_LoadFailCount = 1; - LC_LoadDefaultTables(); - - /* LC_LoadDefaultTables() - CFE_TBL_GetAddress (WDT) = CFE_TBL_ERR_INVALID_HANDLE */ - CFE_TBL_LoadCallCount = 0; - CFE_TBL_LoadFailCount = 1; - CFE_TBL_GetAddressCallCount = 1; - CFE_TBL_GetAddressFailCount = 1; - LC_LoadDefaultTables(); - - /* LC_LoadDefaultTables() - CFE_TBL_Load (ADT) = CFE_TBL_ERR_INVALID_HANDLE */ - CFE_TBL_LoadCallCount = 0; - CFE_TBL_LoadFailCount = 1; - CFE_TBL_GetAddressCallCount = 0; - CFE_TBL_GetAddressFailCount = 1; - LC_LoadDefaultTables(); - - /* LC_LoadDefaultTables() - CFE_TBL_GetAddress (ADT) = CFE_TBL_ERR_INVALID_HANDLE */ - CFE_TBL_LoadCallCount = 0; - CFE_TBL_LoadFailCount = 2; - CFE_TBL_GetAddressCallCount = 0; - CFE_TBL_GetAddressFailCount = 1; - LC_LoadDefaultTables(); - - /* LC_LoadDefaultTables() - CFE_TBL_GetAddress (ADT) = CFE_TBL_ERR_INVALID_HANDLE */ - CFE_TBL_LoadCallCount = 0; - CFE_TBL_LoadFailCount = 2; - CFE_TBL_GetAddressCallCount = 0; - CFE_TBL_GetAddressFailCount = 2; - LC_LoadDefaultTables(); - - /* LC_CreateDefinitionTables() - CFE_TBL_Register (WDT) = CFE_TBL_ERR_INVALID_SIZE */ - LC_OperData.HaveActiveCDS = TRUE; - CFE_TBL_RegisterCallCount = 1; - CFE_TBL_RegisterFailCount = 1; - LC_CreateDefinitionTables(); - - /* LC_CreateDefinitionTables() - CFE_TBL_Register (WDT) = CFE_TBL_ERR_INVALID_SIZE */ - LC_OperData.HaveActiveCDS = FALSE; - CFE_TBL_RegisterCallCount = 1; - CFE_TBL_RegisterFailCount = 1; - LC_CreateDefinitionTables(); - - /* LC_CreateDefinitionTables() - CFE_TBL_GetAddress (WDT) = CFE_TBL_ERR_INVALID_HANDLE */ - LC_OperData.HaveActiveCDS = TRUE; - CFE_TBL_RegisterCallCount = 0; - CFE_TBL_RegisterFailCount = 2; - LC_CreateDefinitionTables(); - - /* LC_CreateDefinitionTables() - CFE_TBL_GetAddress (WDT) = CFE_TBL_ERR_INVALID_HANDLE */ - LC_OperData.HaveActiveCDS = FALSE; - CFE_TBL_RegisterCallCount = 0; - CFE_TBL_RegisterFailCount = 1; - LC_CreateDefinitionTables(); - - /* LC_CreateResultTables() - CFE_TBL_Register (ART) = CFE_TBL_ERR_INVALID_SIZE */ - CFE_TBL_RegisterCallCount = 0; - CFE_TBL_RegisterFailCount = 1; - CFE_TBL_GetAddressCallCount = 0; - CFE_TBL_GetAddressFailCount = 1; - LC_CreateResultTables(); - - /* LC_CreateResultTables() - CFE_TBL_GetAddress (ART) = CFE_TBL_ERR_INVALID_HANDLE */ - CFE_TBL_RegisterCallCount = 0; - CFE_TBL_RegisterFailCount = 2; - CFE_TBL_GetAddressCallCount = 0; - CFE_TBL_GetAddressFailCount = 1; - LC_CreateResultTables(); - - /* LC_CreateResultTables() - Result = CFE_SUCCESS */ - CFE_TBL_RegisterCallCount = 0; - CFE_TBL_RegisterFailCount = 2; - CFE_TBL_GetAddressCallCount = 0; - CFE_TBL_GetAddressFailCount = 2; - LC_CreateResultTables(); - - /* LC_TableInit() - LC_CreateDefinitionTables != CFE_SUCCESS */ - LC_OperData.HaveActiveCDS = FALSE; - CFE_TBL_RegisterCallCount = 0; - CFE_TBL_RegisterFailCount = 2; - CFE_TBL_GetAddressCallCount = 0; - CFE_TBL_GetAddressFailCount = 2; - LC_TableInit(); - - UTF_TBL_set_function_hook(CFE_TBL_LOAD_HOOK, NULL); - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_LOAD_PROC, CFE_SUCCESS); - UTF_TBL_set_function_hook(CFE_TBL_REGISTER_HOOK, NULL); - UTF_CFE_TBL_Set_Api_Return_Code(CFE_TBL_REGISTER_PROC, CFE_SUCCESS); - UTF_TBL_set_function_hook(CFE_TBL_GETADDRESS_HOOK, CFE_TBL_GetAddress_Hook); - - UTF_SB_set_function_hook(CFE_SB_SUBSCRIBE_HOOK, NULL); - UTF_CFE_SB_Set_Api_Return_Code(CFE_SB_SUBSCRIBE_PROC, CFE_SUCCESS); - UTF_CFE_SB_Set_Api_Return_Code(CFE_SB_UNSUBSCRIBE_PROC, CFE_SUCCESS); - - /* LC_TableInit() - CFE_TBL_GetAddress (ADT) = CFE_TBL_ERR_INVALID_HANDLE */ - LC_OperData.HaveActiveCDS = FALSE; - LC_TableInit(); - - /* LC_AppInit() - Result = CFE_SUCCESS */ - LC_AppInit(); - - return; - -} /* end Test_Coverage */ - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Prints out the current values in the LC housekeeping packet */ -/* data structure */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void PrintHKPacket (void) -{ - int i; - - /* Output the LC housekeeping data */ - UTF_put_text("\nLC HOUSEKEEPING DATA:\n"); - - UTF_put_text(" Command Count = %d\n", LC_OperData.HkPacket.CmdCount); - UTF_put_text(" Command Error Count = %d\n", LC_OperData.HkPacket.CmdErrCount); - UTF_put_text(" Actionpoint Sample Count = %d\n", LC_OperData.HkPacket.APSampleCount); - UTF_put_text(" Monitored Message Count = %d\n", LC_OperData.HkPacket.MonitoredMsgCount); - UTF_put_text(" RTS Exec Count = %d\n", LC_OperData.HkPacket.RTSExecCount); - UTF_put_text(" Passive RTS Exec Count = %d\n", LC_OperData.HkPacket.PassiveRTSExecCount); - UTF_put_text(" Watchpoints In Use = %d\n", LC_OperData.HkPacket.WPsInUse); - UTF_put_text(" Active Actionpoints = %d\n", LC_OperData.HkPacket.ActiveAPs); - - /* - ** Handle the current state enumerated type - */ - switch(LC_OperData.HkPacket.CurrentLCState) - { - case LC_STATE_ACTIVE: - UTF_put_text(" Current LC State = LC_STATE_ACTIVE\n"); - break; - - case LC_STATE_PASSIVE: - UTF_put_text(" Current LC State = LC_STATE_PASSIVE\n"); - break; - - case LC_STATE_DISABLED: - UTF_put_text(" Current LC State = LC_STATE_DISABLED\n"); - break; - - default: - UTF_put_text(" Current LC State = %d\n", LC_OperData.HkPacket.CurrentLCState); - break; - } - - /* - ** Handle the watchpoint results array - */ - UTF_put_text("\nWatchpoint Results:\n"); - for (i = 1; i <= LC_HKWR_NUM_BYTES; i++) - { - UTF_put_text("0x%02X ", LC_OperData.HkPacket.WPResults[i - 1]); - - if (i % 10 == 0) /* Do 10 per line */ - { - UTF_put_text("\n"); - } - } - UTF_put_text("\n"); - - /* - ** Handle the actionpoint results array - */ - UTF_put_text("\nActionpoint Results:\n"); - for (i = 1; i <= LC_HKAR_NUM_BYTES; i++) - { - UTF_put_text("0x%02X ", LC_OperData.HkPacket.APResults[i - 1]); - - if (i % 10 == 0) /* Do 10 per line */ - { - UTF_put_text("\n"); - } - } - UTF_put_text("\n"); - -} /* end PrintHKPacket */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Prints out the current values for a single Watchpoint Results */ -/* Table (WRT) entry */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void PrintWRTEntry (uint16 WatchIndex) -{ - - UTF_put_text("\nLC WRT DATA FOR ENTRY #%d:\n", WatchIndex); - - switch(LC_OperData.WRTPtr[WatchIndex].WatchResult) - { - case LC_WATCH_STALE: - UTF_put_text(" Watch Result = LC_WATCH_STALE\n"); - break; - - case LC_WATCH_FALSE: - UTF_put_text(" Watch Result = LC_WATCH_FALSE\n"); - break; - - case LC_WATCH_TRUE: - UTF_put_text(" Watch Result = LC_WATCH_TRUE\n"); - break; - - case LC_WATCH_ERROR: - UTF_put_text(" Watch Result = LC_WATCH_ERROR\n"); - break; - - default: - UTF_put_text(" Watch Result = %d\n", LC_OperData.WRTPtr[WatchIndex].WatchResult); - break; - } - - UTF_put_text(" Evaluation Count = %d\n", LC_OperData.WRTPtr[WatchIndex].EvaluationCount); - UTF_put_text(" False To True Count = %d\n", LC_OperData.WRTPtr[WatchIndex].FalseToTrueCount); - UTF_put_text(" Consecutive True Count = %d\n", LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount); - UTF_put_text(" Cumulative True Count = %d\n", LC_OperData.WRTPtr[WatchIndex].CumulativeTrueCount); - UTF_put_text("\n"); - UTF_put_text(" Last False To True (Value) = %d\n", LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Value); - UTF_put_text(" Last False To True (Secs) = %d\n", LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Seconds); - UTF_put_text(" Last False To True (SubSecs) = %d\n", LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Subseconds); - UTF_put_text("\n"); - UTF_put_text(" Last True To False (Value) = %d\n", LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Value); - UTF_put_text(" Last True To False (Secs) = %d\n", LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Seconds); - UTF_put_text(" Last True To False (SubSecs) = %d\n", LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Subseconds); - UTF_put_text("\n"); - -} /* end PrintWRTEntry */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Prints out the current values for a single Actionpoint Results */ -/* Table (ART) entry */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -void PrintARTEntry (uint16 ActionIndex) -{ - - UTF_put_text("\nLC ART DATA FOR ENTRY #%d:\n", ActionIndex); - - switch(LC_OperData.ARTPtr[ActionIndex].ActionResult) - { - case LC_ACTION_STALE: - UTF_put_text(" Action Result = LC_ACTION_STALE\n"); - break; - - case LC_ACTION_PASS: - UTF_put_text(" Action Result = LC_ACTION_PASS\n"); - break; - - case LC_ACTION_FAIL: - UTF_put_text(" Action Result = LC_ACTION_FAIL\n"); - break; - - case LC_ACTION_ERROR: - UTF_put_text(" Action Result = LC_ACTION_ERROR\n"); - break; - - default: - UTF_put_text(" Action Result = %d\n", LC_OperData.ARTPtr[ActionIndex].ActionResult); - break; - } - - switch(LC_OperData.ARTPtr[ActionIndex].CurrentState) - { - case LC_ACTION_NOT_USED: - UTF_put_text(" Current State = LC_ACTION_NOT_USED\n"); - break; - - case LC_APSTATE_ACTIVE: - UTF_put_text(" Current State = LC_APSTATE_ACTIVE\n"); - break; - - case LC_APSTATE_PASSIVE: - UTF_put_text(" Current State = LC_APSTATE_PASSIVE\n"); - break; - - case LC_APSTATE_DISABLED: - UTF_put_text(" Current State = LC_APSTATE_DISABLED\n"); - break; - - case LC_APSTATE_PERMOFF: - UTF_put_text(" Current State = LC_APSTATE_PERMOFF\n"); - break; - - default: - UTF_put_text(" Current State = %d\n", LC_OperData.ARTPtr[ActionIndex].CurrentState); - break; - } - - UTF_put_text(" Fail To Pass Count = %d\n", LC_OperData.ARTPtr[ActionIndex].FailToPassCount); - UTF_put_text(" Pass To Fail Count = %d\n", LC_OperData.ARTPtr[ActionIndex].PassToFailCount); - UTF_put_text(" Consecutive Fail Count = %d\n", LC_OperData.ARTPtr[ActionIndex].ConsecutiveFailCount); - UTF_put_text(" Cumulative Fail Count = %d\n", LC_OperData.ARTPtr[ActionIndex].CumulativeFailCount); - UTF_put_text(" Cumulative RTS Exec Count = %d\n", LC_OperData.ARTPtr[ActionIndex].CumulativeRTSExecCount); - UTF_put_text("\n"); - -} /* end PrintARTEntry */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Hook function for CFE_SB_Subscribe that will return an error */ -/* when called a certain number of times (set by global variable) */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_SB_Subscribe_FailOnN (CFE_SB_MsgId_t MsgId, - CFE_SB_PipeId_t PipeId) -{ - int32 Status; - - /* - ** Since this function hook's argument list has to match - ** CFE_SB_Subscribe, we use two global variables that are set - ** by the calling routine to control when we return an error - */ - if (CFE_SB_SubscribeCallCount == CFE_SB_SubscribeFailCount) - { - Status = CFE_SB_MAX_MSGS_MET; - } - else - { - /* - ** Note: we can't call CFE_SB_Subscribe here or we'll recurse - ** back into this routine infinitely. - */ - Status = CFE_SUCCESS; - CFE_SB_SubscribeCallCount++; - } - - return(Status); - -} /* end CFE_SB_Subscribe_FailOnN */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Hook function for CFE_TBL_Register that will return an error */ -/* when called a certain number of times (set by global variable) */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_TBL_Register_FailOnN (CFE_TBL_Handle_t *TblHandlePtr, - const char *Name, - uint32 Size, - uint16 TblOptionFlags, - CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr) -{ - int32 Status; - - /* - ** Since this function hook's argument list has to match - ** CFE_TBL_Register, we use two global variables that are set - ** by the calling routine to control when we return an error - */ - if (CFE_TBL_RegisterCallCount == CFE_TBL_RegisterFailCount) - { - Status = CFE_TBL_ERR_INVALID_SIZE; - } - else - { - /* - ** Note: we can't call CFE_TBL_Register here or we'll recurse - ** back into this routine infinitely. - */ - Status = CFE_SUCCESS; - CFE_TBL_RegisterCallCount++; - } - - return(Status); - -} /* end CFE_TBL_Register_FailOnN */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Hook function for CFE_TBL_Register that will return */ -/* CFE_TBL_INFO_RECOVERED_TBL on the first two times that it's */ -/* called then return CFE_SUCCESS after */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_TBL_Register_Upd2 (CFE_TBL_Handle_t *TblHandlePtr, - const char *Name, - uint32 Size, - uint16 TblOptionFlags, - CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr) -{ - int32 Status; - - /* - ** Since this function hook's argument list has to match - ** CFE_TBL_Register, we use a global variable that is set - ** by the calling routine to control when we return different - ** status codes - */ - if (CFE_TBL_RegisterCallCount <= 2) - { - Status = CFE_TBL_INFO_RECOVERED_TBL; - CFE_TBL_RegisterCallCount++; - } - else - { - /* - ** Note: we can't call CFE_TBL_Register here or we'll recurse - ** back into this routine infinitely. - */ - Status = CFE_SUCCESS; - CFE_TBL_RegisterCallCount++; - } - - return(Status); - -} /* end CFE_TBL_Register_Upd2 */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Hook function for CFE_TBL_Load that will return an error */ -/* when called a certain number of times (set by global variable) */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_TBL_Load_FailOnN (CFE_TBL_Handle_t TblHandle, - CFE_TBL_SrcEnum_t SrcType, - const void *SrcDataPtr) -{ - int32 Status; - - /* - ** Since this function hook's argument list has to match - ** CFE_TBL_Load, we use two global variables that are set - ** by the calling routine to control when we return an error - */ - if (CFE_TBL_LoadCallCount == CFE_TBL_LoadFailCount) - { - Status = CFE_TBL_ERR_INVALID_HANDLE; - } - else - { - /* - ** Note: we can't call CFE_TBL_Load here or we'll recurse - ** back into this routine infinitely. - */ - Status = CFE_SUCCESS; - CFE_TBL_LoadCallCount++; - } - - return(Status); - -} /* end CFE_TBL_Load_FailOnN */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Hook function for CFE_TBL_GetAddress that will return an error */ -/* when called a certain number of times (set by global variable) */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_TBL_GetAddress_FailOnN (void **TblPtr, - CFE_TBL_Handle_t TblHandle) -{ - int32 Status; - - /* - ** Since this function hook's argument list has to match - ** CFE_TBL_GetAddress, we use two global variables that are set - ** by the calling routine to control when we return an error - */ - if (CFE_TBL_GetAddressCallCount == CFE_TBL_GetAddressFailCount) - { - Status = CFE_TBL_ERR_INVALID_HANDLE; - } - else - { - /* - ** Update all the apps table pointers to our local test - ** buffers just to be sure they're all set right - */ - LC_OperData.WRTPtr = LC_UnitTestWRT; - LC_OperData.ARTPtr = LC_UnitTestART; - LC_OperData.WDTPtr = LC_UnitTestWDT; - LC_OperData.ADTPtr = LC_UnitTestADT; - - Status = CFE_SUCCESS; - CFE_TBL_GetAddressCallCount++; - } - - return(Status); - -} /* end CFE_TBL_GetAddress_FailOnN */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Hook function for CFE_TBL_GetAddress that will return table */ -/* updated when called a certain number of times (set by global */ -/* variable) */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_TBL_GetAddress_UpdateOnN (void **TblPtr, - CFE_TBL_Handle_t TblHandle) -{ - int32 Status; - - /* - ** Since this function hook's argument list has to match - ** CFE_TBL_GetAddress, we use two global variables that are set - ** by the calling routine to control when we return an error - */ - if (CFE_TBL_GetAddressCallCount == CFE_TBL_GetAddressUpdateCount) - { - /* - ** Update all the apps table pointers to our local test - ** buffers just to be sure they're all set right - */ - LC_OperData.WRTPtr = LC_UnitTestWRT; - LC_OperData.ARTPtr = LC_UnitTestART; - LC_OperData.WDTPtr = LC_UnitTestWDT; - LC_OperData.ADTPtr = LC_UnitTestADT; - - Status = CFE_TBL_INFO_UPDATED; - } - else - { - /* - ** Update all the apps table pointers to our local test - ** buffers just to be sure they're all set right - */ - LC_OperData.WRTPtr = LC_UnitTestWRT; - LC_OperData.ARTPtr = LC_UnitTestART; - LC_OperData.WDTPtr = LC_UnitTestWDT; - LC_OperData.ADTPtr = LC_UnitTestADT; - - Status = CFE_SUCCESS; - CFE_TBL_GetAddressCallCount++; - } - - return(Status); - -} /* end CFE_TBL_GetAddress_UpdateOnN */ - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* */ -/* Hook function for CFE_TBL_GetAddress that will set our table */ -/* pointers to our local test buffers */ -/* */ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 CFE_TBL_GetAddress_Hook (void **TblPtr, - CFE_TBL_Handle_t TblHandle) -{ - /* - ** Update all the apps table pointers to our local test - ** buffers - */ - LC_OperData.WRTPtr = LC_UnitTestWRT; - LC_OperData.ARTPtr = LC_UnitTestART; - LC_OperData.WDTPtr = LC_UnitTestWDT; - LC_OperData.ADTPtr = LC_UnitTestADT; - - return(CFE_SUCCESS); - -} /* end CFE_TBL_GetAddress_Hook */ - diff --git a/fsw/unit_test/lc_utest.in b/fsw/unit_test/lc_utest.in deleted file mode 100644 index fb8fbda..0000000 --- a/fsw/unit_test/lc_utest.in +++ /dev/null @@ -1,215 +0,0 @@ -; -; File: -; $Id: lc_utest.in 1.1 2012/07/31 16:53:43EDT nschweis Exp $ -; -; Purpose: -; This is the command input file used to unit test the -; CFS Limit Checker (LC) Application. -; -; This file is used in conjunction with the lc_utest.c -; unit test driver and handles high level testing of command -; processing through the LC application's software bus pipe. -; -; These tests assume the following Message and Command ID -; settings in the LC code: -; -; LC_CMD_MID = 0x18A4 -; LC_SEND_HK_MID = 0x18A5 -; LC_SAMPLE_AP_MID = 0x18A6 -; -; $Log: lc_utest.in $ -; Revision 1.1 2012/07/31 16:53:43EDT nschweis -; Initial revision -; Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/project.pj -; Revision 1.1 2009/01/15 15:24:31EST dahardis -; Initial revision -; Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/project.pj -* -* ***START LC SB COMMAND TESTING*** -* --------------------------------- -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* NOOP Command Test -* ----------------- -18A4 C000 0001 0000 ; NOOP Command -18A4 C000 0001 0000 ; NOOP Command -18A4 C000 0001 0000 ; NOOP Command -18A4 C000 0001 0000 ; NOOP Command -18A4 C000 0001 0000 ; NOOP Command -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* NOOP Command With Invalid Length Test -* ------------------------------------- -18A4 C000 0007 0000 1234 FFFF 7FFF ; Bad NOOP Command -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Housekeeping Request With Invalid Length Test -* --------------------------------------------- -18A5 C000 0007 0000 1234 FFFF 7FFF ; Bad Housekeeping Request -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Reset Counters Command Test -* --------------------------- -18A4 C000 0001 0100 ; Reset Counters Command -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Reset Counters Command With Invalid Length Test -* ----------------------------------------------- -18A4 C000 0007 0100 1234 FFFF 7FFF ; Bad Reset Counters Command -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Set LC Application State Command With Invalid Length Test -* --------------------------------------------------------- -18A4 C000 0001 0200 ; Bad Set LC Application State -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Set LC Application State To LC_STATE_PASSIVE Command Test -* --------------------------------------------------------- -18A4 C000 0005 0200 0002 0000 ; Set LC Application State To LC_STATE_PASSIVE -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Set LC Application State Command With Invalid State Test -* -------------------------------------------------------- -18A4 C000 0005 0200 00FF 0000 ; Bad Set LC Application State State Argument -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Set LC Application State To LC_STATE_DISABLED Command Test -* --------------------------------------------------------- -18A4 C000 0005 0200 0003 0000 ; Set LC Application State To LC_STATE_DISABLED -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Set AP State Command With Invalid Length Test -* --------------------------------------------- -18A4 C000 0001 0300 ; Bad Set AP State -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Set AP Permanently Off Command With Invalid Length Test -* ------------------------------------------------------- -18A4 C000 0001 0400 ; Bad Set AP Permanently Off -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Sample Actionpoints Request With Invalid Length Test -* ---------------------------------------------------- -18A6 C000 0001 0000 ; Bad Sample Actionpoints Request -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Reset AP Statistics for AP 0 Command Test -* ----------------------------------------- -18A4 C000 0005 0500 0000 0000 ; Reset AP Statistics for AP 0 -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Reset WP Statistics for WP 0 Command Test -* ----------------------------------------- -18A4 C000 0005 0600 0000 0000 ; Reset WP Statistics for WP 0 -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Reset AP Statistics for all APs Command Test -* -------------------------------------------- -18A4 C000 0005 0500 FFFF 0000 ; Reset AP Statistics for all APs -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Reset WP Statistics for all WPs Command Test -* -------------------------------------------- -18A4 C000 0005 0600 FFFF 0000 ; Reset WP Statistics for all WPs -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Reset AP Statistics With Invalid AP Number Command Test -* ------------------------------------------------------- -18A4 C000 0005 0500 0FFF 0000 ; Reset AP Statistics With Invalid AP Number -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Reset WP Statistics With Invalid WP Number Command Test -* ------------------------------------------------------- -18A4 C000 0005 0600 0FFF 0000 ; Reset WP Statistics With Invalid WP Number -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Invalid Command ID Tests -* ------------------------ -18A4 C000 0001 0A00 ; Bad Command ID -18A4 C000 0001 0B00 ; Bad Command ID -18A4 C000 0001 0C00 ; Bad Command ID -18A4 C000 0001 0D00 ; Bad Command ID -18A4 C000 0001 0E00 ; Bad Command ID -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -* -* Invalid Message ID (while LC is disabled) Test -* ---------------------------------------------- -00FF C000 0001 0100 ; Bad Message ID -* -* Housekeeping Request -* -------------------- -18A5 C000 0001 0000 ; Housekeeping Request -; -; Force CFE_SB_RcvMsg to return CFE_SB_PIPE_RD_ERR -; that will exit app (SHOULD BE LAST IN SCRIPT) -: -; Note: Need to issue a command after setting the return -; value to make the return happen -* -* SB error\app exit test -* ----------------------------------------- -@ SET_SB_RETURN_CODE 5 0xca000006 -18A4 C000 0001 0000 ; NOOP Command -* -* ***END LC SB COMMAND TESTING*** -*------------------------------- diff --git a/fsw/unit_test/lc_utest_adt.c b/fsw/unit_test/lc_utest_adt.c deleted file mode 100644 index 759a4c0..0000000 --- a/fsw/unit_test/lc_utest_adt.c +++ /dev/null @@ -1,2522 +0,0 @@ -/************************************************************************* -** File: -** $Id: lc_utest_adt.c 1.2 2015/03/04 16:09:54EST sstrege Exp $ -** -** Copyright © 2007-2014 United States Government as represented by the -** Administrator of the National Aeronautics and Space Administration. -** All Other Rights Reserved. -** -** This software was created at NASA's Goddard Space Flight Center. -** This software is governed by the NASA Open Source Agreement and may be -** used, distributed and modified only pursuant to the terms of that -** agreement. -** -** Purpose: -** Limit Checker (LC) unit test actionpoint definition table (ADT) -** -** Notes: -** This file provides an ADT for unit testing that simply sets all -** actionpoint entries to "not used". It is a modified version of -** the lc_def_adt.c file supplied with LC -** -** Compiler Note -** ------------- -** This file may generate the following warning when compiling -** with gcc if you are using the flags "-ansi -pedantic": -** -** "warning: ISO C90 forbids specifying subobject to initialize" -** -** Removing "-pedantic" should eliminate the warning. An alternate -** solution is to replace "-ansi" with "-std=c99" and leave the -** "-pedantic" flag in place -** -** $Log: lc_utest_adt.c $ -** Revision 1.2 2015/03/04 16:09:54EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:44EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/project.pj -** Revision 1.1 2009/01/15 15:24:58EST dahardis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/project.pj -** -*************************************************************************/ - -/************************************************************************* -** Includes -*************************************************************************/ -#include "lc_msg.h" -#include "lc_tbl.h" - -/************************************************************************* -** Exported Data -*************************************************************************/ -LC_ADTEntry_t LC_UnitTestADT[LC_MAX_ACTIONPOINTS] = -{ - /* #0 (unused) */ - { .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #1 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #2 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #3 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #4 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #5 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #6 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #7 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #8 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #9 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #10 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #11 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #12 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #13 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #14 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #15 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #16 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #17 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #18 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #19 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #20 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #21 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #22 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #23 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #24 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #25 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #26 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #27 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #28 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #29 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #30 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #31 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #32 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #33 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #34 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #35 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #36 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #37 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #38 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #39 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #40 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #41 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #42 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #43 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #44 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #45 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #46 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #47 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #48 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #49 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #50 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #51 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #52 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #53 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #54 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #55 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #56 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #57 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #58 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #59 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #60 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #61 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #62 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #63 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #64 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #65 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #66 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #67 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #68 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #69 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #70 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #71 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #72 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #73 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #74 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #75 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #76 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #77 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #78 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #79 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #80 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #81 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #82 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #83 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #84 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #85 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #86 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #87 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #88 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #89 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #90 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #91 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #92 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #93 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #94 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #95 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #96 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #97 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #98 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #99 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #100 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #101 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #102 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #103 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #104 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #105 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #106 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #107 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #108 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #109 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #110 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #111 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #112 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #113 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #114 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #115 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #116 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #117 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #118 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #119 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #120 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #121 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #122 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #123 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #124 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #125 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #126 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #127 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #128 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #129 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #130 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #131 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #132 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #133 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #134 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #135 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #136 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #137 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #138 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #139 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #140 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #141 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #142 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #143 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #144 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #145 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #146 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #147 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #148 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #149 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #150 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #151 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #152 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #153 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #154 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #155 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #156 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #157 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #158 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #159 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #160 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #161 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #162 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #163 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #164 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #165 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #166 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #167 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #168 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #169 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #170 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #171 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #172 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #173 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #174 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - }, - - /* #175 (unused) */ - { - .DefaultState = LC_ACTION_NOT_USED, - .RTSId = 0, - .MaxFailsBeforeRTS = 0, - .EventType = CFE_EVS_INFORMATION, - .EventID = 0, - .EventText = { " " }, - .RPNEquation = { /* (WP_0) */ - 0, - LC_RPN_EQUAL - } - } -}; /* end LC_UnitTestADT */ - -/************************/ -/* End of File Comment */ -/************************/ diff --git a/fsw/unit_test/lc_utest_wdt.c b/fsw/unit_test/lc_utest_wdt.c deleted file mode 100644 index 77bca52..0000000 --- a/fsw/unit_test/lc_utest_wdt.c +++ /dev/null @@ -1,1995 +0,0 @@ -/************************************************************************* -** File: -** $Id: lc_utest_wdt.c 1.2 2015/03/04 16:09:50EST sstrege Exp $ -** -** Copyright © 2007-2014 United States Government as represented by the -** Administrator of the National Aeronautics and Space Administration. -** All Other Rights Reserved. -** -** This software was created at NASA's Goddard Space Flight Center. -** This software is governed by the NASA Open Source Agreement and may be -** used, distributed and modified only pursuant to the terms of that -** agreement. -** -** Purpose: -** Limit Checker (LC) unit test watchpoint definition table (WDT) -** -** Notes: -** This file provides a WDT for unit testing that simply sets all -** watchpoint entries to "not used". It is a modified version of -** the lc_def_wdt.c file supplied with LC -** -** Compiler Note -** ------------- -** This file may generate the following warning when compiling -** with gcc if you are using the flags "-ansi -pedantic": -** -** "warning: ISO C90 forbids specifying subobject to initialize" -** -** Removing "-pedantic" should eliminate the warning. An alternate -** solution is to replace "-ansi" with "-std=c99" and leave the -** "-pedantic" flag in place -** -** $Log: lc_utest_wdt.c $ -** Revision 1.2 2015/03/04 16:09:50EST sstrege -** Added copyright information -** Revision 1.1 2012/07/31 16:53:44EDT nschweis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/project.pj -** Revision 1.1 2009/01/15 15:25:15EST dahardis -** Initial revision -** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/project.pj -** -*************************************************************************/ - -/************************************************************************* -** Includes -*************************************************************************/ -#include "lc_msg.h" -#include "lc_tbl.h" - -/************************************************************************* -** Exported Data -*************************************************************************/ -LC_WDTEntry_t LC_UnitTestWDT[LC_MAX_WATCHPOINTS] = -{ - /* #0 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #1 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #2 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #3 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #4 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #5 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #6 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #7 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #8 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #9 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #10 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #11 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #12 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #13 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #14 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #15 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #16 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #17 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #18 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #19 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #20 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #21 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #22 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #23 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #24 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #25 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #26 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #27 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #28 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #29 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #30 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #31 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #32 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #33 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #34 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #35 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #36 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #37 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #38 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #39 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #40 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #41 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #42 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #43 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #44 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #45 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #46 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #47 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #48 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #49 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #50 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #51 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #52 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #53 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #54 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #55 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #56 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #57 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #58 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #59 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #60 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #61 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #62 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #63 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #64 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #65 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #66 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #67 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #68 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #69 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #70 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #71 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #72 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #73 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #74 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #75 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #76 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #77 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #78 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #79 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #80 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #81 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #82 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #83 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #84 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #85 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #86 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #87 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #88 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #89 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #90 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #91 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #92 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #93 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #94 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #95 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #96 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #97 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #98 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #99 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #100 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #101 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #102 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #103 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #104 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #105 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #106 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #107 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #108 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #109 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #110 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #111 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #112 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #113 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #114 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #115 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #116 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #117 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #118 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #119 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #120 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #121 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #122 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #123 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #124 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #125 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #126 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #127 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #128 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #129 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #130 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #131 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #132 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #133 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #134 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #135 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #136 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #137 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #138 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #139 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #140 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #141 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #142 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #143 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #144 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #145 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #146 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #147 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #148 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #149 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #150 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #151 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #152 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #153 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #154 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #155 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #156 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #157 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #158 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #159 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #160 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #161 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #162 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #163 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #164 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #165 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #166 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #167 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #168 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #169 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #170 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #171 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #172 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #173 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #174 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - }, - - /* #175 (unused) */ - { - .DataType = LC_WATCH_NOT_USED, - .OperatorID = LC_NO_OPER, - .MessageID = 0, - .WatchpointOffset = 0, - .BitMask = LC_NO_BITMASK, - .CustomFuncArgument = 0, - .ComparisonValue.Unsigned32 = 0, - } -}; /* end LC_UnitTestWDT */ - -/************************/ -/* End of File Comment */ -/************************/ diff --git a/fsw/unit_test/lc_watch.c.gcov b/fsw/unit_test/lc_watch.c.gcov new file mode 100644 index 0000000..27b2e48 --- /dev/null +++ b/fsw/unit_test/lc_watch.c.gcov @@ -0,0 +1,1242 @@ + -: 0:Source:../src/lc_watch.c + -: 0:Programs:5 + -: 1:/************************************************************************* + -: 2:** File: + -: 3:** $Id: lc_watch.c.gcov 1.4 2017/01/12 12:47:11EST czogby Exp $ + -: 4:** + -: 5:** Copyright © 2007-2014 United States Government as represented by the + -: 6:** Administrator of the National Aeronautics and Space Administration. + -: 7:** All Other Rights Reserved. + -: 8:** + -: 9:** This software was created at NASA's Goddard Space Flight Center. + -: 10:** This software is governed by the NASA Open Source Agreement and may be + -: 11:** used, distributed and modified only pursuant to the terms of that + -: 12:** agreement. + -: 13:** + -: 14:** Purpose: + -: 15:** Functions used for CFS Limit Checker watchpoint processing + -: 16:** + -: 17:** $Log: lc_watch.c.gcov $ + -: 17:** Revision 1.4 2017/01/12 12:47:11EST czogby + -: 17:** Move function prototypes from .c to .h, and fix comments + -: 18:** Revision 1.4 2016/11/21 13:18:00EST mdeschu + -: 19:** Cleaned up CFE_EVS_SendEvent format warnings by using C-Style casts + -: 20:** Revision 1.3 2016/10/06 07:27:33EDT mdeschu + -: 21:** Integrate Babelfish ticket + -: 22:** Trac #5: Make LC application endian-neutral + -: 23:** + -: 24:** Remove dependencies on STRUCT_HIGH_BIT_FIRST or STRUCT_LOW_BIT_FIRST + -: 25:** and replace with code that will work equally well on any architecture. + -: 26:** Revision 1.2 2015/11/16 14:26:18EST wmoleski + -: 27:** Most of the files were missing the Copyright comments. + -: 28:** Revision 1.5 2015/03/04 16:09:52EST sstrege + -: 29:** Added copyright information + -: 30:** Revision 1.4 2012/08/22 17:19:06EDT lwalling + -: 31:** Modified true to false transition monitor to also accept stale to false + -: 32:** Revision 1.3 2012/08/01 12:42:12PDT lwalling + -: 33:** Add STALE counters to watchpoint definition and result tables + -: 34:** Revision 1.2 2012/08/01 11:19:54PDT lwalling + -: 35:** Change NOT_MEASURED to STALE + -: 36:** Revision 1.1 2012/07/31 13:53:40PDT nschweis + -: 37:** Initial revision + -: 38:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj + -: 39:** Revision 1.7 2011/06/08 16:17:16EDT lwalling + -: 40:** Added hash table functions, modified LC_CheckMsgForWPs() to use hash table functions + -: 41:** Revision 1.6 2011/01/19 12:43:11EST jmdagost + -: 42:** Added lc_watch.h to include list. + -: 43:** Revision 1.5 2011/01/19 11:38:40EST jmdagost + -: 44:** Initialize local variables per IV&V. + -: 45:** Revision 1.4 2009/02/26 11:01:01EST dahardis + -: 46:** Modified so a watchponit transition from Not Measured to True + -: 47:** will get treated the same as a transition from False to True (DCR #7097) + -: 48:** Revision 1.3 2009/01/15 15:36:17EST dahardis + -: 49:** Unit test fixes + -: 50:** Revision 1.2 2008/12/03 13:59:46EST dahardis + -: 51:** Corrections from peer code review + -: 52:** Revision 1.1 2008/10/29 14:19:52EDT dahardison + -: 53:** Initial revision + -: 54:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj + -: 55:** + -: 56:*************************************************************************/ + -: 57: + -: 58:/************************************************************************* + -: 59:** Includes + -: 60:*************************************************************************/ + -: 61:#include "lc_app.h" + -: 62:#include "lc_watch.h" + -: 63:#include "lc_events.h" + -: 64:#include "lc_custom.h" + -: 65:#include "lc_perfids.h" + -: 66: + -: 67:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 68:/* */ + -: 69:/* LC_GetHashTableIndex() - convert messageID to hash table index */ + -: 70:/* */ + -: 71:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 72: + 22: 73:uint32 LC_GetHashTableIndex(CFE_SB_MsgId_t MessageID) + -: 74:{ + -: 75: /* + -: 76: ** The purpose of a hash function is to take the input value + -: 77: ** and convert it to an index into the hash table. Assume that + -: 78: ** the range of input values is much different (larger) than + -: 79: ** the number of entries in the hash table. Then multiple input + -: 80: ** values must resolve to the same output table index. This is ok + -: 81: ** because each entry in the hash table is a linked list of all + -: 82: ** the inputs with the same hash function result. + -: 83: ** + -: 84: ** This particular hash function takes advantage of knowledge + -: 85: ** regarding the format of the input values (cFE MessageID). By + -: 86: ** ignoring the bits that define version number, packet type and + -: 87: ** secondary header (high 5 bits of 16) we are left with the bits + -: 88: ** (mask = 0x7FF) that can identify 2048 unique input telemetry + -: 89: ** packets. Also, by using a fixed hash table size of 256 entries + -: 90: ** and using only the lower 8 bits of the bitmask as the result + -: 91: ** of the hash function, no single hash table entry will have more + -: 92: ** than 8 elements in its linked list. + -: 93: */ + 22: 94: return((uint32) (MessageID & LC_HASH_TABLE_MASK)); + -: 95: + -: 96:} /* End of LC_GetHashTableIndex() */ + -: 97: + -: 98: + -: 99:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 100:/* */ + -: 101:/* LC_CreateHashTable() - create watchpoint hash table */ + -: 102:/* */ + -: 103:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 104: + 7: 105:void LC_CreateHashTable(void) + -: 106:{ + -: 107: LC_WatchPtList_t *WatchPtLink; + -: 108: CFE_SB_MsgId_t LastMessageID; + -: 109: CFE_SB_MsgId_t MessageID; + -: 110: int32 MessageLinkIndex; + -: 111: int32 WatchPtTblIndex; + -: 112: int32 Result; + -: 113: + -: 114: + -: 115: /* Un-subscribe to any MessageID's referenced in previous Watchpoint Definition Table */ + 9: 116: for (MessageLinkIndex = 0; MessageLinkIndex < LC_OperData.MessageIDsCount; MessageLinkIndex++) + -: 117: { + 2: 118: MessageID = LC_OperData.MessageLinks[MessageLinkIndex].MessageID; + -: 119: + 2: 120: if ((Result = CFE_SB_Unsubscribe(MessageID, LC_OperData.CmdPipe)) != CFE_SUCCESS) + -: 121: { + 1: 122: CFE_EVS_SendEvent(LC_UNSUB_WP_ERR_EID, CFE_EVS_ERROR, + -: 123: "Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X", + -: 124: MessageID, (unsigned int)Result); + -: 125: } + -: 126: } + -: 127: + -: 128: /* Initialize hash table structures */ + 7: 129: CFE_PSP_MemSet(LC_OperData.HashTable, 0, (LC_HASH_TABLE_ENTRIES * sizeof(LC_MessageList_t *))); + 7: 130: CFE_PSP_MemSet(LC_OperData.MessageLinks, 0, (LC_MAX_WATCHPOINTS * sizeof(LC_MessageList_t))); + 7: 131: CFE_PSP_MemSet(LC_OperData.WatchPtLinks, 0, (LC_MAX_WATCHPOINTS * sizeof(LC_WatchPtList_t))); + -: 132: + 7: 133: LC_OperData.MessageIDsCount = 0; + 7: 134: LC_OperData.WatchpointCount = 0; + -: 135: + 7: 136: LastMessageID = 0xFFFF; + 7: 137: WatchPtLink = (LC_WatchPtList_t *) NULL; + -: 138: + -: 139: /* Process each entry in the Watchpoint Definition Table */ + 1239: 140: for (WatchPtTblIndex = 0; WatchPtTblIndex < LC_MAX_WATCHPOINTS; WatchPtTblIndex++) + -: 141: { + -: 142: /* Skip unused watchpoint table entries */ + 1232: 143: if (LC_OperData.WDTPtr[WatchPtTblIndex].DataType != LC_WATCH_NOT_USED) + -: 144: { + 1232: 145: MessageID = LC_OperData.WDTPtr[WatchPtTblIndex].MessageID; + -: 146: + -: 147: /* Use optimized code path if same MessageID as last watchpoint */ + 2457: 148: if ((LastMessageID == MessageID) && (WatchPtLink != (LC_WatchPtList_t *) NULL)) + -: 149: { + -: 150: /* WatchPtLink points to last link in list for this Message ID */ + 1225: 151: WatchPtLink->Next = &LC_OperData.WatchPtLinks[LC_OperData.WatchpointCount++]; + -: 152: + -: 153: /* Add new link to end of list, point to new last link */ + 1225: 154: WatchPtLink = WatchPtLink->Next; + -: 155: } + -: 156: else + -: 157: { + -: 158: /* May add message list link and subscribe to MessageID */ + 7: 159: WatchPtLink = LC_AddWatchpoint(MessageID); + -: 160: } + -: 161: + -: 162: /* Set watchpoint table index for this entry in list */ + 1232: 163: WatchPtLink->WatchIndex = WatchPtTblIndex; + -: 164: + 1232: 165: LastMessageID = MessageID; + -: 166: } + -: 167: } + -: 168: + 7: 169: return; + -: 170: + -: 171:} /* End of LC_CreateHashTable() */ + -: 172: + -: 173: + -: 174:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 175:/* */ + -: 176:/* LC_AddWatchpoint() - add one watchpoint entry to hash table */ + -: 177:/* */ + -: 178:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 179: + 10: 180:LC_WatchPtList_t *LC_AddWatchpoint(CFE_SB_MsgId_t MessageID) + -: 181:{ + -: 182: LC_MessageList_t *MessageLink; + -: 183: LC_WatchPtList_t *WatchPtLink; + -: 184: boolean NeedSubscription; + -: 185: int32 HashTableIndex; + -: 186: int32 Result; + -: 187: + -: 188: /* Hash function converts MessageID into hash table index */ + 10: 189: HashTableIndex = LC_GetHashTableIndex(MessageID); + -: 190: + -: 191: /* Subscribe only for first reference to each MessageID */ + 10: 192: NeedSubscription = FALSE; + -: 193: + -: 194: /* Each hash table entry is a linked list of MessageID's with same hash result */ + 10: 195: if (LC_OperData.HashTable[HashTableIndex] == (LC_MessageList_t *) NULL) + -: 196: { + -: 197: /* Get next unused MessageID linked list entry */ + 9: 198: MessageLink = &LC_OperData.MessageLinks[LC_OperData.MessageIDsCount++]; + -: 199: + -: 200: /* Set first (and only) link in this hash table entry linked list */ + 9: 201: LC_OperData.HashTable[HashTableIndex] = MessageLink; + -: 202: + -: 203: /* Set the MessageID for this link */ + 9: 204: MessageLink->MessageID = MessageID; + -: 205: + -: 206: /* Subscribe to first link in list */ + 9: 207: NeedSubscription = TRUE; + -: 208: } + -: 209: else + -: 210: { + -: 211: /* Get start of linked list (all MID's with same hash result) */ + 1: 212: MessageLink = LC_OperData.HashTable[HashTableIndex]; + -: 213: + -: 214: /* Find the link for this MessageID */ + 3: 215: while (MessageLink->MessageID != MessageID) + -: 216: { + 1: 217: if (MessageLink->Next == (LC_MessageList_t *) NULL) + -: 218: { + -: 219: /* Reached end of list without finding MessageID */ + 1: 220: MessageLink->Next = &LC_OperData.MessageLinks[LC_OperData.MessageIDsCount++]; + 1: 221: MessageLink = MessageLink->Next; + -: 222: + -: 223: /* Add link with this MessageID (will exit loop) */ + 1: 224: MessageLink->MessageID = MessageID; + -: 225: + -: 226: /* Subscribe to new link in list */ + 1: 227: NeedSubscription = TRUE; + -: 228: } + -: 229: else + -: 230: { + -: 231: /* Try the next link in the list */ + #####: 232: MessageLink = MessageLink->Next; + -: 233: } + -: 234: } + -: 235: } + -: 236: + -: 237: /* Subscribe only once to each MessageID */ + 10: 238: if (NeedSubscription) + -: 239: { + 10: 240: if ((Result = CFE_SB_Subscribe(MessageID, LC_OperData.CmdPipe)) != CFE_SUCCESS) + -: 241: { + -: 242: /* Signal the error, but continue */ + 1: 243: CFE_EVS_SendEvent(LC_SUB_WP_ERR_EID, CFE_EVS_ERROR, + -: 244: "Error subscribing watchpoint: MID=0x%04X, RC=0x%08X", + -: 245: MessageID, (unsigned int)Result); + -: 246: } + -: 247: } + -: 248: + -: 249: /* MessageLink points to the link for this MessageID */ + 10: 250: if (MessageLink->WatchPtList == (LC_WatchPtList_t *) NULL) + -: 251: { + -: 252: /* Get next unused watchpoint linked list entry */ + 9: 253: WatchPtLink = &LC_OperData.WatchPtLinks[LC_OperData.WatchpointCount++]; + -: 254: + -: 255: /* Set the start (and only) link in the watchpoint link list */ + 9: 256: MessageLink->WatchPtList = WatchPtLink; + -: 257: } + -: 258: else + -: 259: { + -: 260: /* Find the end of the watchpoint linked list */ + 1: 261: WatchPtLink = MessageLink->WatchPtList; + -: 262: + 4: 263: while (WatchPtLink->Next != (LC_WatchPtList_t *) NULL) + -: 264: { + 2: 265: WatchPtLink = WatchPtLink->Next; + -: 266: } + -: 267: + -: 268: /* Add the new watchpoint link to the end of the list */ + 1: 269: WatchPtLink->Next = &LC_OperData.WatchPtLinks[LC_OperData.WatchpointCount++]; + 1: 270: WatchPtLink = WatchPtLink->Next; + -: 271: } + -: 272: + -: 273: /* Return pointer to last link in watchpoint linked list */ + 10: 274: return(WatchPtLink); + -: 275: + -: 276:} /* End of LC_AddWatchpoint() */ + -: 277: + -: 278: + -: 279:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 280:/* */ + -: 281:/* Handle a message with possible watchpoints */ + -: 282:/* */ + -: 283:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 4: 284:void LC_CheckMsgForWPs(CFE_SB_MsgId_t MessageID, CFE_SB_MsgPtr_t MessagePtr) + -: 285:{ + -: 286: CFE_TIME_SysTime_t Timestamp; + -: 287: LC_MessageList_t *MessageList; + -: 288: LC_WatchPtList_t *WatchPtList; + 4: 289: boolean WatchPtFound = FALSE; + -: 290: + -: 291: /* Do nothing if disabled at the application level */ + 4: 292: if (LC_AppData.CurrentLCState != LC_STATE_DISABLED) + -: 293: { + -: 294: /* Use message timestamp - if none, use current time */ + 3: 295: Timestamp = CFE_SB_GetMsgTime(MessagePtr); + -: 296: + 3: 297: if ((Timestamp.Seconds == 0) && (Timestamp.Subseconds == 0)) + -: 298: { + 3: 299: Timestamp = CFE_TIME_GetTime(); + -: 300: } + -: 301: + -: 302: /* Performance Log (start time counter) */ + 3: 303: CFE_ES_PerfLogEntry(LC_WDT_SEARCH_PERF_ID); + -: 304: + -: 305: /* Get start of linked list (all MID's with same hash result) */ + 3: 306: MessageList = LC_OperData.HashTable[LC_GetHashTableIndex(MessageID)]; + -: 307: + -: 308: /* NULL when list is empty or end of list */ + 8: 309: while (MessageList != (LC_MessageList_t *) NULL) + -: 310: { + -: 311: /* Compare this linked list entry for matching MessageID */ + 3: 312: if (MessageList->MessageID == MessageID) + -: 313: { + -: 314: /* Stop the search - we found it */ + 1: 315: break; + -: 316: } + -: 317: + -: 318: /* Max of 8 links per design */ + 2: 319: MessageList = MessageList->Next; + -: 320: } + -: 321: + -: 322: /* Should be true - else wouldn't subscribe to MessageID */ + 3: 323: if (MessageList != (LC_MessageList_t *) NULL) + -: 324: { + -: 325: /* Get linked list of WP's that reference MessageID */ + 1: 326: WatchPtList = MessageList->WatchPtList; + -: 327: + -: 328: /* NULL when list is empty or end of list */ + 3: 329: while (WatchPtList != (LC_WatchPtList_t *) NULL) + -: 330: { + 1: 331: WatchPtFound = TRUE; + -: 332: + -: 333: /* Verify that WP packet offset is within actual packet */ + 1: 334: if (LC_WPOffsetValid(WatchPtList->WatchIndex, MessagePtr) == TRUE) + -: 335: { + 1: 336: LC_ProcessWP(WatchPtList->WatchIndex, MessagePtr, Timestamp); + -: 337: } + -: 338: + -: 339: /* No limit to how many WP's can reference one MessageID */ + 1: 340: WatchPtList = WatchPtList->Next; + -: 341: } + -: 342: } + -: 343: + -: 344: /* Performance Log (stop time counter) */ + 3: 345: CFE_ES_PerfLogExit(LC_WDT_SEARCH_PERF_ID); + -: 346: + 3: 347: if (WatchPtFound == TRUE) + -: 348: { + 1: 349: LC_AppData.MonitoredMsgCount++; + -: 350: } + -: 351: else + -: 352: { + -: 353: /* MessageID with no defined watchpoints */ + 2: 354: CFE_EVS_SendEvent(LC_MID_INF_EID, CFE_EVS_INFORMATION, + -: 355: "Msg with unreferenced message ID rcvd: ID = 0x%04X", MessageID); + -: 356: } + -: 357: } + -: 358: + 4: 359: return; + -: 360: + -: 361:} /* end LC_CheckMsgForWPs */ + -: 362: + -: 363: + -: 364:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 365:/* */ + -: 366:/* Process a single watchpoint */ + -: 367:/* */ + -: 368:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 5: 369:void LC_ProcessWP(uint16 WatchIndex, + -: 370: CFE_SB_MsgPtr_t MessagePtr, + -: 371: CFE_TIME_SysTime_t Timestamp) + -: 372:{ + -: 373: uint8 *WPDataPtr; + -: 374: uint8 PreviousResult; + -: 375: uint8 WPEvalResult; + -: 376: uint32 SizedWPData; + -: 377: uint32 MaskedWPData; + -: 378: uint32 StaleCounter; + -: 379: boolean SizedDataValid; + -: 380: + -: 381: /* + -: 382: ** Setup the pointer and get the massaged data + -: 383: */ + 10: 384: WPDataPtr = ((uint8 *)MessagePtr) + + 5: 385: LC_OperData.WDTPtr[WatchIndex].WatchpointOffset; + -: 386: + 5: 387: SizedDataValid = LC_GetSizedWPData(WatchIndex, + -: 388: WPDataPtr, + -: 389: &SizedWPData); + 5: 390: if (SizedDataValid == TRUE) + -: 391: { + -: 392: /* + -: 393: ** Get the last evalution result for this watchpoint + -: 394: */ + 5: 395: PreviousResult = LC_OperData.WRTPtr[WatchIndex].WatchResult; + -: 396: + -: 397: /* + -: 398: ** Apply the defined bitmask for this watchpoint and then + -: 399: ** call the mission defined custom function or do our own + -: 400: ** relational comparison. + -: 401: */ + 5: 402: MaskedWPData = SizedWPData & LC_OperData.WDTPtr[WatchIndex].BitMask; + -: 403: + 5: 404: if (LC_OperData.WDTPtr[WatchIndex].OperatorID == LC_OPER_CUSTOM) + -: 405: { + 2: 406: WPEvalResult = LC_CustomFunction(WatchIndex, + -: 407: MaskedWPData, + -: 408: MessagePtr, + 2: 409: LC_OperData.WDTPtr[WatchIndex].CustomFuncArgument); + -: 410: } + -: 411: else + -: 412: { + 3: 413: WPEvalResult = LC_OperatorCompare(WatchIndex, MaskedWPData); + -: 414: } + -: 415: + -: 416: /* + -: 417: ** Update the watch result + -: 418: */ + 5: 419: LC_OperData.WRTPtr[WatchIndex].WatchResult = WPEvalResult; + -: 420: + -: 421: /* + -: 422: ** Update the watchpoint statistics based on the evaluation + -: 423: ** result + -: 424: */ + 5: 425: LC_OperData.WRTPtr[WatchIndex].EvaluationCount++; + -: 426: + 5: 427: if (WPEvalResult == LC_WATCH_TRUE) + -: 428: { + 1: 429: LC_OperData.WRTPtr[WatchIndex].CumulativeTrueCount++; + 1: 430: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount++; + 1: 431: StaleCounter = LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale; + 1: 432: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = StaleCounter; + -: 433: + 1: 434: if ((PreviousResult == LC_WATCH_FALSE) || + -: 435: (PreviousResult == LC_WATCH_STALE)) + -: 436: { + 1: 437: LC_OperData.WRTPtr[WatchIndex].FalseToTrueCount++; + -: 438: + 1: 439: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue + -: 440: .Value = MaskedWPData; + -: 441: + 2: 442: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue + 1: 443: .Timestamp.Seconds = Timestamp.Seconds; + -: 444: + 2: 445: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue + 1: 446: .Timestamp.Subseconds = Timestamp.Subseconds; + -: 447: } + -: 448: } + 4: 449: else if (WPEvalResult == LC_WATCH_FALSE) + -: 450: { + 3: 451: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount = 0; + 3: 452: StaleCounter = LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale; + 3: 453: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = StaleCounter; + -: 454: + 3: 455: if ((PreviousResult == LC_WATCH_TRUE) || + -: 456: (PreviousResult == LC_WATCH_STALE)) + -: 457: { + 1: 458: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse + -: 459: .Value = MaskedWPData; + -: 460: + 2: 461: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse + 1: 462: .Timestamp.Seconds = Timestamp.Seconds; + -: 463: + 2: 464: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse + 1: 465: .Timestamp.Subseconds = Timestamp.Subseconds; + -: 466: } + -: 467: } + -: 468: else + -: 469: { + -: 470: /* + -: 471: ** WPEvalResult is STALE or ERROR + -: 472: */ + 1: 473: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0; + -: 474: } + -: 475: + -: 476: } /* end SizedDataValid if */ + -: 477: + 5: 478: return; + -: 479: + -: 480:} /* end LC_ProcessWP */ + -: 481: + -: 482:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 483:/* */ + -: 484:/* Perform a watchpoint relational comparison */ + -: 485:/* */ + -: 486:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 11: 487:uint8 LC_OperatorCompare(uint16 WatchIndex, + -: 488: uint32 ProcessedWPData) + -: 489:{ + -: 490: uint8 EvalResult; + -: 491: LC_MultiType_t WatchpointValue; + -: 492: LC_MultiType_t ComparisonValue; + -: 493: + -: 494: /* + -: 495: * The "ProcessedWPData" has been already normalized to be + -: 496: * 32 bits wide and in the native CPU byte order. For actual + -: 497: * comparison, it needs to be truncated back down to the same + -: 498: * size as the reference value. + -: 499: */ + 11: 500: switch (LC_OperData.WDTPtr[WatchIndex].DataType) + -: 501: { + -: 502: case LC_DATA_UBYTE: + -: 503: case LC_DATA_BYTE: + 5: 504: WatchpointValue.Unsigned8 = ProcessedWPData & 0xFF; + 5: 505: break; + -: 506: + -: 507: case LC_DATA_WORD_BE: + -: 508: case LC_DATA_WORD_LE: + -: 509: case LC_DATA_UWORD_BE: + -: 510: case LC_DATA_UWORD_LE: + 2: 511: WatchpointValue.Unsigned16 = ProcessedWPData & 0xFFFF; + 2: 512: break; + -: 513: + -: 514: case LC_DATA_DWORD_BE: + -: 515: case LC_DATA_DWORD_LE: + -: 516: case LC_DATA_UDWORD_BE: + -: 517: case LC_DATA_UDWORD_LE: + -: 518: case LC_DATA_FLOAT_BE: + -: 519: case LC_DATA_FLOAT_LE: + -: 520: default: + 4: 521: WatchpointValue.Unsigned32 = ProcessedWPData; + -: 522: break; + -: 523: } + 11: 524: ComparisonValue = LC_OperData.WDTPtr[WatchIndex].ComparisonValue; + -: 525: + -: 526: /* + -: 527: ** Handle the comparison appropriately depending on the data type + -: 528: ** Any endian difference was handled when the watchpoint + -: 529: ** data was extracted from the SB message + -: 530: */ + 11: 531: switch (LC_OperData.WDTPtr[WatchIndex].DataType) + -: 532: { + -: 533: /* + -: 534: ** Signed integer types will get sign extended + -: 535: */ + -: 536: case LC_DATA_BYTE: + 8: 537: EvalResult = LC_SignedCompare(WatchIndex, + 4: 538: WatchpointValue.Signed8, + 4: 539: ComparisonValue.Signed8); + 4: 540: break; + -: 541: + -: 542: case LC_DATA_WORD_BE: + -: 543: case LC_DATA_WORD_LE: + 2: 544: EvalResult = LC_SignedCompare(WatchIndex, + 1: 545: WatchpointValue.Signed16, + 1: 546: ComparisonValue.Signed16); + 1: 547: break; + -: 548: + -: 549: case LC_DATA_DWORD_BE: + -: 550: case LC_DATA_DWORD_LE: + 1: 551: EvalResult = LC_SignedCompare(WatchIndex, + -: 552: WatchpointValue.Signed32, + -: 553: ComparisonValue.Signed32); + 1: 554: break; + -: 555: + -: 556: /* + -: 557: ** Unsigned integer types will get zero extended + -: 558: */ + -: 559: case LC_DATA_UBYTE: + 2: 560: EvalResult = LC_UnsignedCompare(WatchIndex, + 1: 561: WatchpointValue.Unsigned8, + 1: 562: ComparisonValue.Unsigned8); + 1: 563: break; + -: 564: + -: 565: case LC_DATA_UWORD_BE: + -: 566: case LC_DATA_UWORD_LE: + 2: 567: EvalResult = LC_UnsignedCompare(WatchIndex, + 1: 568: WatchpointValue.Unsigned16, + 1: 569: ComparisonValue.Unsigned16); + 1: 570: break; + -: 571: + -: 572: case LC_DATA_UDWORD_BE: + -: 573: case LC_DATA_UDWORD_LE: + 1: 574: EvalResult = LC_UnsignedCompare(WatchIndex, + -: 575: WatchpointValue.Unsigned32, + -: 576: ComparisonValue.Unsigned32); + 1: 577: break; + -: 578: + -: 579: /* + -: 580: ** Floating point values are handled separately + -: 581: */ + -: 582: case LC_DATA_FLOAT_BE: + -: 583: case LC_DATA_FLOAT_LE: + 1: 584: EvalResult = LC_FloatCompare(WatchIndex, + -: 585: WatchpointValue, + -: 586: ComparisonValue); + 1: 587: break; + -: 588: + -: 589: default: + -: 590: /* + -: 591: ** This should have been caught before now, but we'll + -: 592: ** handle it just in case we ever get here. + -: 593: */ + 1: 594: CFE_EVS_SendEvent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, + -: 595: "WP has undefined data type: WP = %d, DataType = %d", + 1: 596: WatchIndex, LC_OperData.WDTPtr[WatchIndex].DataType); + -: 597: + 1: 598: EvalResult = LC_WATCH_ERROR; + -: 599: break; + -: 600: } + -: 601: + 11: 602: return (EvalResult); + -: 603: + -: 604:} /* end LC_OperatorCompare */ + -: 605: + -: 606: + -: 607:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 608:/* */ + -: 609:/* Perform a watchpoint signed integer comparison */ + -: 610:/* */ + -: 611:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 13: 612:uint8 LC_SignedCompare(uint16 WatchIndex, + -: 613: int32 WPValue, + -: 614: int32 CompareValue) + -: 615:{ + -: 616: uint8 EvalResult; + -: 617: uint8 OperatorID; + -: 618: + 13: 619: OperatorID = LC_OperData.WDTPtr[WatchIndex].OperatorID; + -: 620: + 13: 621: switch (OperatorID) + -: 622: { + -: 623: case LC_OPER_LE: + 5: 624: EvalResult = (WPValue <= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 5: 625: break; + -: 626: + -: 627: case LC_OPER_LT: + 1: 628: EvalResult = (WPValue < CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 629: break; + -: 630: + -: 631: case LC_OPER_EQ: + 1: 632: EvalResult = (WPValue == CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 633: break; + -: 634: + -: 635: case LC_OPER_NE: + 1: 636: EvalResult = (WPValue != CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 637: break; + -: 638: + -: 639: case LC_OPER_GT: + 1: 640: EvalResult = (WPValue > CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 641: break; + -: 642: + -: 643: case LC_OPER_GE: + 2: 644: EvalResult = (WPValue >= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 2: 645: break; + -: 646: + -: 647: default: + -: 648: /* + -: 649: ** This should have been caught before now, but we'll + -: 650: ** handle it just in case we ever get here. + -: 651: */ + 2: 652: CFE_EVS_SendEvent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, + -: 653: "WP has invalid operator ID: WP = %d, OperID = %d", + -: 654: WatchIndex, OperatorID); + -: 655: + 2: 656: EvalResult = LC_WATCH_ERROR; + -: 657: break; + -: 658: } + -: 659: + 13: 660: return (EvalResult); + -: 661: + -: 662:} /* end LC_SignedCompare */ + -: 663: + -: 664:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 665:/* */ + -: 666:/* Perform a watchpoint unsigned integer comparison */ + -: 667:/* */ + -: 668:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 10: 669:uint8 LC_UnsignedCompare(uint16 WatchIndex, + -: 670: uint32 WPValue, + -: 671: uint32 CompareValue) + -: 672:{ + -: 673: uint8 EvalResult; + -: 674: uint8 OperatorID; + -: 675: + 10: 676: OperatorID = LC_OperData.WDTPtr[WatchIndex].OperatorID; + -: 677: + 10: 678: switch (OperatorID) + -: 679: { + -: 680: case LC_OPER_LE: + 4: 681: EvalResult = (WPValue <= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 4: 682: break; + -: 683: + -: 684: case LC_OPER_LT: + 1: 685: EvalResult = (WPValue < CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 686: break; + -: 687: + -: 688: case LC_OPER_EQ: + 1: 689: EvalResult = (WPValue == CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 690: break; + -: 691: + -: 692: case LC_OPER_NE: + 1: 693: EvalResult = (WPValue != CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 694: break; + -: 695: + -: 696: case LC_OPER_GT: + 1: 697: EvalResult = (WPValue > CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 698: break; + -: 699: + -: 700: case LC_OPER_GE: + 1: 701: EvalResult = (WPValue >= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 702: break; + -: 703: + -: 704: default: + -: 705: /* + -: 706: ** This should have been caught before now, but we'll + -: 707: ** handle it just in case we ever get here. + -: 708: */ + 1: 709: CFE_EVS_SendEvent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, + -: 710: "WP has invalid operator ID: WP = %d, OperID = %d", + -: 711: WatchIndex, OperatorID); + -: 712: + 1: 713: EvalResult = LC_WATCH_ERROR; + -: 714: break; + -: 715: } + -: 716: + 10: 717: return (EvalResult); + -: 718: + -: 719:} /* end LC_UnsignedCompare */ + -: 720: + -: 721:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 722:/* */ + -: 723:/* Perform a floating point number comparison */ + -: 724:/* */ + -: 725:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 9: 726:uint8 LC_FloatCompare(uint16 WatchIndex, + -: 727: LC_MultiType_t WPMultiType, + -: 728: LC_MultiType_t CompareMultiType) + -: 729:{ + -: 730: uint8 EvalResult; + -: 731: uint8 OperatorID; + -: 732: float WPFloat; + -: 733: float CompareFloat; + -: 734: float Diff; + -: 735: + 9: 736: OperatorID = LC_OperData.WDTPtr[WatchIndex].OperatorID; + -: 737: + -: 738: /* + -: 739: ** Before we do any comparison, check the watchpoint value for + -: 740: ** a floating point NAN (not-a-number). NAN comparisons don't + -: 741: ** work and can generate floating point exceptions. By contrast + -: 742: ** comparisons with infinite numbers will behave as they should + -: 743: ** so we don't try to catch those (we would rather they generate + -: 744: ** watchpoint violations). + -: 745: ** + -: 746: ** The comparison (threshold) value comes from the Watchpoint + -: 747: ** Definition Table (WDT) and any weird values should get nailed + -: 748: ** during table validation. + -: 749: */ + 9: 750: if (LC_Uint32IsNAN(WPMultiType.Unsigned32) == FALSE) + -: 751: { + 8: 752: WPFloat = WPMultiType.Float32; + 8: 753: CompareFloat = CompareMultiType.Float32; + -: 754: + 8: 755: switch (OperatorID) + -: 756: { + -: 757: case LC_OPER_LE: + 2: 758: EvalResult = (WPFloat <= CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 2: 759: break; + -: 760: + -: 761: case LC_OPER_LT: + 1: 762: EvalResult = (WPFloat < CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 763: break; + -: 764: + -: 765: case LC_OPER_EQ: + 1: 766: Diff = (WPFloat > CompareFloat) ? (WPFloat - CompareFloat) : (CompareFloat - WPFloat); + 1: 767: EvalResult = (Diff <= (float) LC_FLOAT_TOLERANCE) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 768: break; + -: 769: + -: 770: case LC_OPER_NE: + 1: 771: Diff = (WPFloat > CompareFloat) ? (WPFloat - CompareFloat) : (CompareFloat - WPFloat); + 1: 772: EvalResult = (Diff > (float) LC_FLOAT_TOLERANCE) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 773: break; + -: 774: + -: 775: case LC_OPER_GT: + 1: 776: EvalResult = (WPFloat > CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 777: break; + -: 778: + -: 779: case LC_OPER_GE: + 1: 780: EvalResult = (WPFloat >= CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; + 1: 781: break; + -: 782: + -: 783: default: + -: 784: /* + -: 785: ** This should have been caught before now, but we'll + -: 786: ** handle it just in case we ever get here. + -: 787: */ + 1: 788: CFE_EVS_SendEvent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, + -: 789: "WP has invalid operator ID: WP = %d, OperID = %d", + -: 790: WatchIndex, OperatorID); + -: 791: + 1: 792: EvalResult = LC_WATCH_ERROR; + -: 793: break; + -: 794: + -: 795: } /* end of switch */ + -: 796: + -: 797: } /* end LC_WPIsNAN if */ + -: 798: else + -: 799: { + 1: 800: CFE_EVS_SendEvent(LC_WP_NAN_ERR_EID, CFE_EVS_ERROR, + -: 801: "WP data value is a float NAN: WP = %d, Value = 0x%08X", + -: 802: WatchIndex, (unsigned int)WPMultiType.Unsigned32); + -: 803: + 1: 804: EvalResult = LC_WATCH_ERROR; + -: 805: } + -: 806: + 9: 807: return (EvalResult); + -: 808: + -: 809:} /* end LC_FloatCompare */ + -: 810: + -: 811:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 812:/* */ + -: 813:/* Checks if a defined watchpoint offset will send us past the */ + -: 814:/* end of the received message */ + -: 815:/* */ + -: 816:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 7: 817:boolean LC_WPOffsetValid(uint16 WatchIndex, + -: 818: CFE_SB_MsgPtr_t MessagePtr) + -: 819:{ + -: 820: uint16 MsgLength; + -: 821: uint32 Offset; + 7: 822: uint32 NumOfDataBytes = 0; + 7: 823: boolean OffsetValid = TRUE; + 7: 824: CFE_SB_MsgId_t MessageID = 0; + -: 825: + -: 826: /* + -: 827: ** Check the message length against the watchpoint + -: 828: ** offset and data type to make sure we won't + -: 829: ** try to read past it. + -: 830: */ + 7: 831: switch (LC_OperData.WDTPtr[WatchIndex].DataType) + -: 832: { + -: 833: case LC_DATA_BYTE: + -: 834: case LC_DATA_UBYTE: + 3: 835: NumOfDataBytes = sizeof (uint8); + 3: 836: break; + -: 837: + -: 838: case LC_DATA_WORD_BE: + -: 839: case LC_DATA_WORD_LE: + -: 840: case LC_DATA_UWORD_BE: + -: 841: case LC_DATA_UWORD_LE: + 1: 842: NumOfDataBytes = sizeof (uint16); + 1: 843: break; + -: 844: + -: 845: case LC_DATA_DWORD_BE: + -: 846: case LC_DATA_DWORD_LE: + -: 847: case LC_DATA_UDWORD_BE: + -: 848: case LC_DATA_UDWORD_LE: + 1: 849: NumOfDataBytes = sizeof (uint32); + 1: 850: break; + -: 851: + -: 852: case LC_DATA_FLOAT_BE: + -: 853: case LC_DATA_FLOAT_LE: + 1: 854: NumOfDataBytes = sizeof (float); + 1: 855: break; + -: 856: + -: 857: default: + -: 858: /* + -: 859: ** This should have been caught before now, but we'll + -: 860: ** handle it just in case we ever get here. + -: 861: */ + 1: 862: CFE_EVS_SendEvent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, + -: 863: "WP has undefined data type: WP = %d, DataType = %d", + 1: 864: WatchIndex, LC_OperData.WDTPtr[WatchIndex].DataType); + -: 865: + 1: 866: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; + 1: 867: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0; + -: 868: + 1: 869: return (FALSE); + -: 870: break; + -: 871: + -: 872: } /* end switch */ + -: 873: + 6: 874: MsgLength = CFE_SB_GetTotalMsgLength(MessagePtr); + -: 875: + 6: 876: Offset = LC_OperData.WDTPtr[WatchIndex].WatchpointOffset; + -: 877: + 6: 878: if ((Offset + NumOfDataBytes) > MsgLength) + -: 879: { + 1: 880: OffsetValid = FALSE; + -: 881: + 1: 882: MessageID = CFE_SB_GetMsgId(MessagePtr); + -: 883: + 1: 884: CFE_EVS_SendEvent(LC_WP_OFFSET_ERR_EID, CFE_EVS_ERROR, + -: 885: "WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d", + -: 886: MessageID, WatchIndex, (int)Offset, (int)NumOfDataBytes, MsgLength); + -: 887: + 1: 888: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; + 1: 889: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0; + -: 890: } + -: 891: + 6: 892: return (OffsetValid); + -: 893: + -: 894:} /* end LC_WPOffsetValid */ + -: 895: + -: 896:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 897:/* */ + -: 898:/* Copy a single watchpoint datum and simultaneously byteswap it */ + -: 899:/* */ + -: 900:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 6: 901:void LC_CopyBytesWithSwap(LC_MultiType_t *DestBuffer, const uint8 *SrcPtr, + -: 902: const LC_MultiType_t SwapMap, uint32 NumBytes) + -: 903:{ + 28: 904: while (NumBytes > 0) + -: 905: { + 16: 906: --NumBytes; + 16: 907: DestBuffer->RawByte[NumBytes] = SrcPtr[SwapMap.RawByte[NumBytes] & 0x3]; + -: 908: } + 6: 909:} + -: 910: + -: 911:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 912:/* */ + -: 913:/* Get sized watchpoint data */ + -: 914:/* */ + -: 915:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 14: 916:boolean LC_GetSizedWPData(uint16 WatchIndex, + -: 917: uint8 *WPDataPtr, + -: 918: uint32 *SizedDataPtr) + -: 919:{ + 14: 920: boolean Success = TRUE; + -: 921: LC_MultiType_t ConvBuffer; + -: 922: LC_MultiType_t TempBuffer; + -: 923: + 14: 924: ConvBuffer.Unsigned32 = 0; + 14: 925: TempBuffer.Unsigned32 = 0; + -: 926: + -: 927: /* + -: 928: ** Get the watchpoint data value (which may be on a misaligned + -: 929: ** address boundary) and put it into an unsigned 32 properly + -: 930: ** handling endian and sign extension issues + -: 931: */ + 14: 932: switch (LC_OperData.WDTPtr[WatchIndex].DataType) + -: 933: { + -: 934: case LC_DATA_BYTE: + 6: 935: TempBuffer.Unsigned8 = *WPDataPtr; + 6: 936: ConvBuffer.Signed32 = TempBuffer.Signed8; /* Extend signed 8 bit value to 32 bits */ + 6: 937: break; + -: 938: + -: 939: case LC_DATA_UBYTE: + 1: 940: ConvBuffer.Unsigned32 = *WPDataPtr; /* Extend unsigned 8 bit value to 32 bits */ + 1: 941: break; + -: 942: + -: 943: case LC_DATA_WORD_BE: + 1: 944: ConvBuffer.Unsigned16 = 0x0001; + 1: 945: LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(int16)); + 1: 946: ConvBuffer.Signed32 = TempBuffer.Signed16; /* Extend signed 16 bit value to 32 bits */ + 1: 947: break; + -: 948: + -: 949: case LC_DATA_WORD_LE: + 1: 950: ConvBuffer.Unsigned16 = 0x0100; + 1: 951: LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(int16)); + 1: 952: ConvBuffer.Signed32 = TempBuffer.Signed16; /* Extend signed 16 bit value to 32 bits */ + 1: 953: break; + -: 954: + -: 955: case LC_DATA_UWORD_BE: + 1: 956: ConvBuffer.Unsigned16 = 0x0001; + 1: 957: LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(uint16)); + 1: 958: ConvBuffer.Unsigned32 = TempBuffer.Unsigned16; /* Extend unsigned 16 bit value to 32 bits */ + 1: 959: break; + -: 960: + -: 961: case LC_DATA_UWORD_LE: + 1: 962: ConvBuffer.Unsigned16 = 0x0100; + 1: 963: LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(uint16)); + 1: 964: ConvBuffer.Unsigned32 = TempBuffer.Unsigned16; /* Extend unsigned 16 bit value to 32 bits */ + 1: 965: break; + -: 966: + -: 967: case LC_DATA_DWORD_BE: + -: 968: case LC_DATA_UDWORD_BE: + -: 969: case LC_DATA_FLOAT_BE: + 1: 970: ConvBuffer.Unsigned32 = 0x00010203; + 1: 971: LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(uint32)); + 1: 972: ConvBuffer.Unsigned32 = TempBuffer.Unsigned32; /* Straight copy - no extension (signed or unsigned) */ + 1: 973: break; + -: 974: + -: 975: case LC_DATA_DWORD_LE: + -: 976: case LC_DATA_UDWORD_LE: + -: 977: case LC_DATA_FLOAT_LE: + 1: 978: ConvBuffer.Unsigned32 = 0x03020100; + 1: 979: LC_CopyBytesWithSwap(&TempBuffer,WPDataPtr,ConvBuffer,sizeof(uint32)); + 1: 980: ConvBuffer.Unsigned32 = TempBuffer.Unsigned32; /* Straight copy - no extension (signed or unsigned) */ + 1: 981: break; + -: 982: + -: 983: default: + -: 984: /* + -: 985: ** This should have been caught before now, but we'll + -: 986: ** handle it just in case we ever get here. + -: 987: */ + 1: 988: CFE_EVS_SendEvent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, + -: 989: "WP has undefined data type: WP = %d, DataType = %d", + 1: 990: WatchIndex, LC_OperData.WDTPtr[WatchIndex].DataType); + -: 991: + 1: 992: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; + 1: 993: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0; + -: 994: + 1: 995: Success = FALSE; + -: 996: break; + -: 997: + -: 998: } /* end switch */ + -: 999: + -: 1000: /* + -: 1001: ** Set result value + -: 1002: */ + 14: 1003: *SizedDataPtr = ConvBuffer.Unsigned32; + -: 1004: + -: 1005: /* + -: 1006: ** Return success flag + -: 1007: */ + 14: 1008: return (Success); + -: 1009: + -: 1010:} /* end LC_GetSizedWPData */ + -: 1011: + -: 1012:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 1013:/* */ + -: 1014:/* Validate the watchpoint definition table (WDT) */ + -: 1015:/* */ + -: 1016:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 8: 1017:int32 LC_ValidateWDT(void *TableData) + -: 1018:{ + 8: 1019: LC_WDTEntry_t *TableArray = (LC_WDTEntry_t *) TableData; + -: 1020: + 8: 1021: int32 EntryResult = LC_WDTVAL_NO_ERR; + 8: 1022: int32 TableResult = CFE_SUCCESS; + -: 1023: int32 TableIndex; + -: 1024: + -: 1025: uint8 DataType; + -: 1026: uint8 OperatorID; + -: 1027: uint16 MessageID; + -: 1028: uint32 CompareValue; + -: 1029: + 8: 1030: int32 GoodCount = 0; + 8: 1031: int32 BadCount = 0; + 8: 1032: int32 UnusedCount = 0; + -: 1033: + -: 1034: /* + -: 1035: ** Verify each entry in the pending watchpoint definition table + -: 1036: */ + 1416: 1037: for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) + -: 1038: { + 1408: 1039: DataType = TableArray[TableIndex].DataType; + 1408: 1040: OperatorID = TableArray[TableIndex].OperatorID; + 1408: 1041: MessageID = TableArray[TableIndex].MessageID; + 1408: 1042: CompareValue = TableArray[TableIndex].ComparisonValue.Unsigned32; + -: 1043: + 1408: 1044: if (DataType == LC_WATCH_NOT_USED) + -: 1045: { + -: 1046: /* + -: 1047: ** Unused table entry + -: 1048: */ + 176: 1049: UnusedCount++; + -: 1050: } + 1408: 1051: else if ((DataType != LC_DATA_BYTE) && + -: 1052: (DataType != LC_DATA_UBYTE) && + -: 1053: (DataType != LC_DATA_BYTE) && + -: 1054: (DataType != LC_DATA_UBYTE) && + -: 1055: (DataType != LC_DATA_WORD_BE) && + -: 1056: (DataType != LC_DATA_WORD_LE) && + -: 1057: (DataType != LC_DATA_UWORD_BE) && + -: 1058: (DataType != LC_DATA_UWORD_LE) && + -: 1059: (DataType != LC_DATA_DWORD_BE) && + -: 1060: (DataType != LC_DATA_DWORD_LE) && + -: 1061: (DataType != LC_DATA_UDWORD_BE) && + -: 1062: (DataType != LC_DATA_UDWORD_LE) && + -: 1063: (DataType != LC_DATA_FLOAT_BE) && + -: 1064: (DataType != LC_DATA_FLOAT_LE)) + -: 1065: { + -: 1066: /* + -: 1067: ** Invalid data type + -: 1068: */ + 176: 1069: BadCount++; + 176: 1070: EntryResult = LC_WDTVAL_ERR_DATATYPE; + -: 1071: } + 1232: 1072: else if ((OperatorID != LC_OPER_LT) && + -: 1073: (OperatorID != LC_OPER_LT) && + -: 1074: (OperatorID != LC_OPER_LE) && + -: 1075: (OperatorID != LC_OPER_NE) && + -: 1076: (OperatorID != LC_OPER_EQ) && + -: 1077: (OperatorID != LC_OPER_GE) && + -: 1078: (OperatorID != LC_OPER_GT) && + -: 1079: (OperatorID != LC_OPER_CUSTOM)) + -: 1080: { + -: 1081: /* + -: 1082: ** Invalid operator + -: 1083: */ + 176: 1084: BadCount++; + 176: 1085: EntryResult = LC_WDTVAL_ERR_OPER; + -: 1086: } + 880: 1087: else if (MessageID > CFE_SB_HIGHEST_VALID_MSGID) + -: 1088: { + -: 1089: /* + -: 1090: ** Bad message ID (limit set by configuration parameter, + -: 1091: ** see cfe_platform_cfg.h) + -: 1092: */ + 176: 1093: BadCount++; + 176: 1094: EntryResult = LC_WDTVAL_ERR_MID; + -: 1095: } + 1232: 1096: else if ((DataType == LC_DATA_FLOAT_BE) || + -: 1097: (DataType == LC_DATA_FLOAT_LE)) + -: 1098: { + -: 1099: /* + -: 1100: ** Check the floating point comparison value for + -: 1101: ** NAN (not-a-number) or infinite values + -: 1102: */ + 528: 1103: if (LC_Uint32IsNAN(CompareValue) == TRUE) + -: 1104: { + 176: 1105: BadCount++; + 176: 1106: EntryResult = LC_WDTVAL_ERR_FPNAN; + -: 1107: } + 352: 1108: else if (LC_Uint32IsInfinite(CompareValue) == TRUE) + -: 1109: { + 176: 1110: BadCount++; + 176: 1111: EntryResult = LC_WDTVAL_ERR_FPINF; + -: 1112: } + -: 1113: else + -: 1114: { + -: 1115: /* + -: 1116: ** We passed all checks for this floating point entry + -: 1117: */ + 176: 1118: GoodCount++; + -: 1119: } + -: 1120: } + -: 1121: else + -: 1122: { + -: 1123: /* + -: 1124: ** We passed all checks for this non-floating point entry + -: 1125: */ + 176: 1126: GoodCount++; + -: 1127: } + -: 1128: + -: 1129: /* + -: 1130: ** Generate detailed event for "first" error + -: 1131: */ + 1408: 1132: if ((EntryResult != LC_WDTVAL_NO_ERR) && (TableResult == CFE_SUCCESS)) + -: 1133: { + 7: 1134: if ((EntryResult == LC_WDTVAL_ERR_FPNAN) || + -: 1135: (EntryResult == LC_WDTVAL_ERR_FPINF)) + -: 1136: { + 2: 1137: CFE_EVS_SendEvent(LC_WDTVAL_FPERR_EID, CFE_EVS_ERROR, + -: 1138: "WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X", + -: 1139: (int)TableIndex, (int)EntryResult, (unsigned int)CompareValue); + -: 1140: } + -: 1141: else + -: 1142: { + 3: 1143: CFE_EVS_SendEvent(LC_WDTVAL_ERR_EID, CFE_EVS_ERROR, + -: 1144: "WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d", + -: 1145: (int)TableIndex, (int)EntryResult, DataType, OperatorID, MessageID); + -: 1146: } + -: 1147: + 5: 1148: TableResult = EntryResult; + -: 1149: } + -: 1150: + -: 1151: } /* end TableIndex for */ + -: 1152: + -: 1153: /* + -: 1154: ** Generate informational event with error totals + -: 1155: */ + 8: 1156: CFE_EVS_SendEvent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, + -: 1157: "WDT verify results: good = %d, bad = %d, unused = %d", + -: 1158: (int)GoodCount, (int)BadCount, (int)UnusedCount); + -: 1159: + 8: 1160: return(TableResult); + -: 1161: + -: 1162:} /* end LC_ValidateWDT */ + -: 1163: + -: 1164:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 1165:/* */ + -: 1166:/* Test if a 32 bit integer's value would be a floating point */ + -: 1167:/* NAN (not-a-number). Assumes IEEE-754 floating point format */ + -: 1168:/* */ + -: 1169:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 539: 1170:boolean LC_Uint32IsNAN(uint32 Data) + -: 1171:{ + 539: 1172: boolean Result = FALSE; + -: 1173: uint32 Exponent; + -: 1174: uint32 Fraction; + -: 1175: + -: 1176: /* + -: 1177: ** Check if the exponent field is all 1's + -: 1178: */ + 539: 1179: Exponent = Data & 0x7F800000; + -: 1180: + 539: 1181: if (Exponent == 0x7F800000) + -: 1182: { + -: 1183: /* + -: 1184: ** If the fraction field is also non-zero, + -: 1185: ** it's a NAN + -: 1186: */ + 354: 1187: Fraction = Data & 0x007FFFFF; + -: 1188: + 354: 1189: if (Fraction > 0) + -: 1190: { + 178: 1191: Result = TRUE; + -: 1192: } + -: 1193: } + -: 1194: + 539: 1195: return (Result); + -: 1196: + -: 1197:} /* end LC_Uint32IsNAN */ + -: 1198: + -: 1199:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + -: 1200:/* */ + -: 1201:/* Test if a 32 bit integer's value would be an infinite */ + -: 1202:/* (positive or negative) floating point number. Assumes */ + -: 1203:/* IEEE-754 floating point format */ + -: 1204:/* */ + -: 1205:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + 354: 1206:boolean LC_Uint32IsInfinite(uint32 Data) + -: 1207:{ + 354: 1208: boolean Result = FALSE; + -: 1209: uint32 Exponent; + -: 1210: uint32 Fraction; + -: 1211: + -: 1212: /* + -: 1213: ** Check if the exponent field is all 1's + -: 1214: */ + 354: 1215: Exponent = Data & 0x7F800000; + -: 1216: + 354: 1217: if (Exponent == 0x7F800000) + -: 1218: { + -: 1219: /* + -: 1220: ** If the fraction field is also zero, + -: 1221: ** it's infinite + -: 1222: */ + 177: 1223: Fraction = Data & 0x007FFFFF; + -: 1224: + 177: 1225: if (Fraction == 0) + -: 1226: { + 177: 1227: Result = TRUE; + -: 1228: } + -: 1229: } + -: 1230: + 354: 1231: return (Result); + -: 1232: + -: 1233:} /* end LC_Uint32IsInfinite */ + -: 1234: + -: 1235: + -: 1236:/************************/ + -: 1237:/* End of File Comment */ + -: 1238:/************************/ diff --git a/fsw/unit_test/lc_watch_test.c b/fsw/unit_test/lc_watch_test.c new file mode 100644 index 0000000..724fb5e --- /dev/null +++ b/fsw/unit_test/lc_watch_test.c @@ -0,0 +1,1760 @@ + /************************************************************************* + ** File: + ** $Id: lc_watch_test.c 1.5 2017/01/22 17:24:55EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains unit test cases for the functions contained in the file lc_watch.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "lc_watch_test.h" +#include "lc_watch.h" +#include "lc_app.h" +#include "lc_msg.h" +#include "lc_msgdefs.h" +#include "lc_msgids.h" +#include "lc_events.h" +#include "lc_version.h" +#include "lc_test_utils.h" +#include "ut_osapi_stubs.h" +#include "ut_cfe_sb_stubs.h" +#include "ut_cfe_es_stubs.h" +#include "ut_cfe_es_hooks.h" +#include "ut_cfe_evs_stubs.h" +#include "ut_cfe_evs_hooks.h" +#include "ut_cfe_time_stubs.h" +#include "ut_cfe_psp_memutils_stubs.h" +#include "ut_cfe_psp_watchdog_stubs.h" +#include "ut_cfe_psp_timer_stubs.h" +#include "ut_cfe_tbl_stubs.h" +#include "ut_cfe_fs_stubs.h" +#include "ut_cfe_time_stubs.h" +#include +#include +#include + +/* + * Function Definitions + */ + +void LC_CreateHashTable_Test_UnsubscribeError(void) +{ + LC_OperData.MessageIDsCount = 1; + LC_OperData.MessageLinks[0].MessageID = 1; + + /* Set to generate error message LC_UNSUB_WP_ERR_EID */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_UNSUBSCRIBE_INDEX, -1, 1); + + /* Execute the function being tested */ + LC_CreateHashTable(); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_UNSUB_WP_ERR_EID, CFE_EVS_ERROR, "Error unsubscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF"), + "Error unsubscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CreateHashTable_Test_UnsubscribeError */ + +void LC_CreateHashTable_Test_NominalAllSameMID(void) +{ + int32 WatchPtTblIndex; + + LC_OperData.MessageIDsCount = 1; + LC_OperData.WatchpointCount = 1; + + for (WatchPtTblIndex = 0; WatchPtTblIndex < LC_MAX_WATCHPOINTS; WatchPtTblIndex++) + { + LC_OperData.WDTPtr[WatchPtTblIndex].DataType = 99; + LC_OperData.MessageLinks[WatchPtTblIndex].MessageID = 1; + } + + /* Execute the function being tested */ + LC_CreateHashTable(); + + /* Verify results */ + /* Nothing to verify for LC_OperData.WatchPtLinks, because it depends on LC_AddWatchpoint, which we're not testing here */ + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_CreateHashTable_Test_NominalAllSameMID */ + +void LC_AddWatchpoint_Test_HashTableAndWatchPtListNullPointersNominal(void) +{ + LC_WatchPtList_t *Result; + int32 HashTableIndex = 1; + CFE_SB_MsgId_t MessageID = 1; + + LC_OperData.HashTable[HashTableIndex] = 0; + LC_OperData.MessageLinks[0].WatchPtList = 0; + + /* Execute the function being tested */ + Result = (LC_WatchPtList_t *)LC_AddWatchpoint(MessageID); + + /* Verify results */ + UtAssert_True (LC_OperData.HashTable[HashTableIndex] == &LC_OperData.MessageLinks[0], "LC_OperData.HashTable[HashTableIndex] == &LC_OperData.MessageLinks[0]"); + UtAssert_True (LC_OperData.MessageLinks[0].MessageID == 1, "LC_OperData.MessageLinks[0].MessageID == 1"); + UtAssert_True (LC_OperData.MessageLinks[0].WatchPtList == &LC_OperData.WatchPtLinks[0], "LC_OperData.MessageLinks[0].WatchPtList == &LC_OperData.WatchPtLinks[0]"); + UtAssert_True (Result == &LC_OperData.WatchPtLinks[0], "Result == &LC_OperData.WatchPtLinks[0]"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_AddWatchpoint_Test_HashTableAndWatchPtListNullPointersNominal */ + +void LC_AddWatchpoint_Test_HashTableAndWatchPtListNotNullPointerTwoMsgLinksMIDFound(void) +{ + LC_WatchPtList_t *Result; + int32 HashTableIndex = 0; + CFE_SB_MsgId_t MessageID = 5; + + LC_OperData.MessageLinks[0].MessageID = 5; + LC_OperData.MessageLinks[1].MessageID = 0; + + LC_OperData.MessageLinks[0].WatchPtList->Next = &LC_OperData.WatchPtLinks[1]; + LC_OperData.HashTable[HashTableIndex]->Next = &LC_OperData.MessageLinks[1]; + + LC_OperData.MessageLinks[1].WatchPtList->Next = &LC_OperData.WatchPtLinks[2]; + + /* Execute the function being tested */ + Result = (LC_WatchPtList_t *)LC_AddWatchpoint(MessageID); + + /* Verify results */ + UtAssert_True (Result == &LC_OperData.WatchPtLinks[0], "Result == &LC_OperData.WatchPtLinks[0]"); + /* Not verifying line "WatchPtLink->Next = &LC_OperData.WatchPtLinks[LC_OperData.WatchpointCount++]" */ + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_AddWatchpoint_Test_HashTableAndWatchPtListNotNullPointerTwoMsgLinksMIDFound */ + +void LC_AddWatchpoint_Test_NullPointersErrorSubscribingWatchpoint(void) +{ + LC_WatchPtList_t *Result; + int32 HashTableIndex = 1; + CFE_SB_MsgId_t MessageID = 1; + + LC_OperData.HashTable[HashTableIndex] = 0; + LC_OperData.MessageLinks[0].WatchPtList = 0; + + /* Set to generate error message LC_SUB_WP_ERR_EID */ + Ut_CFE_SB_SetReturnCode(UT_CFE_SB_SUBSCRIBE_INDEX, -1, 1); + + /* Execute the function being tested */ + Result = (LC_WatchPtList_t *)LC_AddWatchpoint(MessageID); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_SUB_WP_ERR_EID, CFE_EVS_ERROR, "Error subscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF"), + "Error subscribing watchpoint: MID=0x0001, RC=0xFFFFFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_AddWatchpoint_Test_NullPointersErrorSubscribingWatchpoint */ + +void LC_CheckMsgForWPs_Test_Nominal(void) +{ + LC_NoArgsCmd_t CmdPacket; + uint16 WatchIndex = 0; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_AppData.CurrentLCState = 99; + LC_OperData.HashTable[LC_GetHashTableIndex(1)]->MessageID = 99; + LC_OperData.HashTable[LC_GetHashTableIndex(1)]->Next = LC_OperData.HashTable[LC_GetHashTableIndex(2)]; + LC_OperData.HashTable[LC_GetHashTableIndex(1)]->Next->MessageID = 1; + + LC_OperData.HashTable[LC_GetHashTableIndex(1)]->Next->WatchPtList->WatchIndex = WatchIndex; + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_BYTE; + LC_OperData.WDTPtr[WatchIndex].WatchpointOffset = -1; + + LC_OperData.HashTable[LC_GetHashTableIndex(1)]->Next->Next = LC_OperData.HashTable[LC_GetHashTableIndex(3)]; + LC_OperData.HashTable[LC_GetHashTableIndex(1)]->Next->Next->WatchPtList->WatchIndex = 99; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_CUSTOM; + + /* Execute the function being tested */ + LC_CheckMsgForWPs(1, (CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (LC_AppData.MonitoredMsgCount == 1, "LC_AppData.MonitoredMsgCount == 1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_CheckMsgForWPs_Test_Nominal */ + +void LC_CheckMsgForWPs_Test_UnreferencedMessageID(void) +{ + LC_NoArgsCmd_t CmdPacket; + + LC_OperData.HashTable[LC_GetHashTableIndex(1)] = (LC_MessageList_t *) NULL; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + /* Execute the function being tested */ + LC_CheckMsgForWPs(1, (CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_MID_INF_EID, CFE_EVS_INFORMATION, "Msg with unreferenced message ID rcvd: ID = 0x0001"), + "Msg with unreferenced message ID rcvd: ID = 0x0001"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_CheckMsgForWPs_Test_UnreferencedMessageID */ + +void LC_ProcessWP_Test_CustomFunctionWatchFalse(void) +{ + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + CFE_TIME_SysTime_t Timestamp; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_BYTE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_CUSTOM; + LC_OperData.WDTPtr[WatchIndex].CustomFuncArgument = 0; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + + /* Execute the function being tested */ + LC_ProcessWP(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket), Timestamp); + + /* Verify results */ + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 0, "LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1, "LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1"); + + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_FALSE, "LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_FALSE"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1, "LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1"); + + /* Note: this event message is generated in a subfunction, but is tested anyway to verify that the correct code path has been reached */ + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_CFCALL_ERR_EID, CFE_EVS_ERROR, "Unexpected LC_CustomFunction call: WP = 0"), + "Unexpected LC_CustomFunction call: WP = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ProcessWP_Test_CustomFunctionWatchFalse */ + +void LC_ProcessWP_Test_OperatorCompareError(void) +{ + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + CFE_TIME_SysTime_t Timestamp; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_BYTE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = 99; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + LC_ProcessWP(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket), Timestamp); + + /* Verify results */ + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR, "LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1, "LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0, "LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + /* Generates 1 event message we don't care about in this test */ + +} /* end LC_ProcessWP_Test_OperatorCompareError */ + +void LC_ProcessWP_Test_OperatorCompareWatchTruePreviousStale(void) +{ + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + CFE_TIME_SysTime_t Timestamp; + + Timestamp.Seconds = 3; + Timestamp.Subseconds = 5; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_BYTE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Signed8 = 1; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + LC_ProcessWP(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket), Timestamp); + + /* Verify results */ + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_TRUE, "LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_TRUE"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1, "LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1"); + + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].CumulativeTrueCount == 1, "LC_OperData.WRTPtr[WatchIndex].CumulativeTrueCount == 1"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 1, "LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 1"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1, "LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1"); + + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].FalseToTrueCount == 1, "LC_OperData.WRTPtr[WatchIndex].FalseToTrueCount == 1"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Value == 0, "LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Value == 0"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Seconds == 3, "LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Seconds == 3"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Subseconds == 5, "LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue.Timestamp.Subseconds == 5"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ProcessWP_Test_OperatorCompareWatchTruePreviousStale */ + +void LC_ProcessWP_Test_OperatorCompareWatchFalsePreviousStale(void) +{ + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + CFE_TIME_SysTime_t Timestamp; + + Timestamp.Seconds = 3; + Timestamp.Subseconds = 5; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_BYTE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_GE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Signed8 = 1; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + LC_ProcessWP(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket), Timestamp); + + /* Verify results */ + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_FALSE, "LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_FALSE"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1, "LC_OperData.WRTPtr[WatchIndex].EvaluationCount == 1"); + + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 0, "LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount == 0"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1, "LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 1"); + + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Value == 0, "LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Value == 0"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Seconds == 3, "LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Seconds == 3"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Subseconds == 5, "LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse.Timestamp.Subseconds == 5"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_ProcessWP_Test_OperatorCompareWatchFalsePreviousStale */ + +void LC_OperatorCompare_Test_DataByte(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + uint32 ProcessedWPData = 0; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_BYTE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Signed8 = 1; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + Result = LC_OperatorCompare(WatchIndex, ProcessedWPData); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_OperatorCompare_Test_DataByte */ + +void LC_OperatorCompare_Test_DataWordLE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + uint32 ProcessedWPData = 0; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_WORD_LE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Signed16 = 1; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + Result = LC_OperatorCompare(WatchIndex, ProcessedWPData); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_OperatorCompare_Test_DataWordLE */ + +void LC_OperatorCompare_Test_DataDWordLE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + uint32 ProcessedWPData = 0; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_DWORD_LE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Signed32 = 1; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + Result = LC_OperatorCompare(WatchIndex, ProcessedWPData); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_OperatorCompare_Test_DataDWordLE */ + +void LC_OperatorCompare_Test_DataUByte(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + uint32 ProcessedWPData = 0; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UBYTE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Unsigned8 = 1; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + Result = LC_OperatorCompare(WatchIndex, ProcessedWPData); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_OperatorCompare_Test_DataUByte */ + +void LC_OperatorCompare_Test_DataUWordLE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + uint32 ProcessedWPData = 0; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UWORD_LE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Unsigned16 = 1; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + Result = LC_OperatorCompare(WatchIndex, ProcessedWPData); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_OperatorCompare_Test_DataUWordLE */ + +void LC_OperatorCompare_Test_DataUDWordLE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + uint32 ProcessedWPData = 0; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UDWORD_LE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Unsigned32 = 1; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + Result = LC_OperatorCompare(WatchIndex, ProcessedWPData); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_OperatorCompare_Test_DataUDWordLE */ + +void LC_OperatorCompare_Test_DataFloatLE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + uint32 ProcessedWPData = 0; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_FLOAT_LE; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Float32 = 1.0; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + Result = LC_OperatorCompare(WatchIndex, ProcessedWPData); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_OperatorCompare_Test_DataFloatLE */ + +void LC_OperatorCompare_Test_DataTypeError(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + uint32 ProcessedWPData = 0; + + LC_OperData.WDTPtr[WatchIndex].DataType = 99; + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; + LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale = 1; + LC_OperData.WDTPtr[WatchIndex].BitMask = 0; + LC_OperData.WDTPtr[WatchIndex].ComparisonValue.Float32 = 1.0; + LC_OperData.WRTPtr[WatchIndex].EvaluationCount = 0; + + /* Execute the function being tested */ + Result = LC_OperatorCompare(WatchIndex, ProcessedWPData); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_ERROR, "Result == LC_WATCH_ERROR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, "WP has undefined data type: WP = 0, DataType = 99"), + "WP has undefined data type: WP = 0, DataType = 99"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_OperatorCompare_Test_DataTypeError */ + +void LC_SignedCompare_Test_LE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 0; + int32 CompareValue = 1; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + + /* Execute the function being tested */ + Result = LC_SignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SignedCompare_Test_LE */ + +void LC_SignedCompare_Test_LT(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 0; + int32 CompareValue = 1; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LT; + + /* Execute the function being tested */ + Result = LC_SignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SignedCompare_Test_LT */ + +void LC_SignedCompare_Test_EQ(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 1; + int32 CompareValue = 1; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_EQ; + + /* Execute the function being tested */ + Result = LC_SignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SignedCompare_Test_EQ */ + +void LC_SignedCompare_Test_NE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 0; + int32 CompareValue = 1; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_NE; + + /* Execute the function being tested */ + Result = LC_SignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SignedCompare_Test_NE */ + +void LC_SignedCompare_Test_GT(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 1; + int32 CompareValue = 0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_GT; + + /* Execute the function being tested */ + Result = LC_SignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SignedCompare_Test_GT */ + +void LC_SignedCompare_Test_GE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 1; + int32 CompareValue = 0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_GE; + + /* Execute the function being tested */ + Result = LC_SignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_SignedCompare_Test_GE */ + +void LC_SignedCompare_Test_InvalidOperatorID(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 1; + int32 CompareValue = 0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = 99; + + /* Execute the function being tested */ + Result = LC_SignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_ERROR, "Result == LC_WATCH_ERROR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, "WP has invalid operator ID: WP = 0, OperID = 99"), + "WP has invalid operator ID: WP = 0, OperID = 99"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_SignedCompare_Test_InvalidOperatorID */ + +void LC_UnsignedCompare_Test_LE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 0; + int32 CompareValue = 1; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + + /* Execute the function being tested */ + Result = LC_UnsignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_UnsignedCompare_Test_LE */ + +void LC_UnsignedCompare_Test_LT(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 0; + int32 CompareValue = 1; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LT; + + /* Execute the function being tested */ + Result = LC_UnsignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_UnsignedCompare_Test_LT */ + +void LC_UnsignedCompare_Test_EQ(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 1; + int32 CompareValue = 1; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_EQ; + + /* Execute the function being tested */ + Result = LC_UnsignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_UnsignedCompare_Test_EQ */ + +void LC_UnsignedCompare_Test_NE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 0; + int32 CompareValue = 1; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_NE; + + /* Execute the function being tested */ + Result = LC_UnsignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_UnsignedCompare_Test_NE */ + +void LC_UnsignedCompare_Test_GT(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 1; + int32 CompareValue = 0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_GT; + + /* Execute the function being tested */ + Result = LC_UnsignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_UnsignedCompare_Test_GT */ + +void LC_UnsignedCompare_Test_GE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 1; + int32 CompareValue = 0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_GE; + + /* Execute the function being tested */ + Result = LC_UnsignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_UnsignedCompare_Test_GE */ + +void LC_UnsignedCompare_Test_InvalidOperatorID(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + int32 WPValue = 1; + int32 CompareValue = 0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = 99; + + /* Execute the function being tested */ + Result = LC_UnsignedCompare(WatchIndex, WPValue, CompareValue); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_ERROR, "Result == LC_WATCH_ERROR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, "WP has invalid operator ID: WP = 0, OperID = 99"), + "WP has invalid operator ID: WP = 0, OperID = 99"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_UnsignedCompare_Test_InvalidOperatorID */ + +void LC_FloatCompare_Test_LE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + LC_MultiType_t WPMultiType; + LC_MultiType_t CompareMultiType; + + WPMultiType.Float32 = 0.0; + CompareMultiType.Float32 = 1.0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LE; + + /* Execute the function being tested */ + Result = LC_FloatCompare(WatchIndex, WPMultiType, CompareMultiType); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_FloatCompare_Test_LE */ + +void LC_FloatCompare_Test_LT(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + LC_MultiType_t WPMultiType; + LC_MultiType_t CompareMultiType; + + WPMultiType.Float32 = 0.0; + CompareMultiType.Float32 = 1.0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_LT; + + /* Execute the function being tested */ + Result = LC_FloatCompare(WatchIndex, WPMultiType, CompareMultiType); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_FloatCompare_Test_LT */ + +void LC_FloatCompare_Test_EQ(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + LC_MultiType_t WPMultiType; + LC_MultiType_t CompareMultiType; + + WPMultiType.Float32 = 1.0; + CompareMultiType.Float32 = 1.0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_EQ; + + /* Execute the function being tested */ + Result = LC_FloatCompare(WatchIndex, WPMultiType, CompareMultiType); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_FloatCompare_Test_EQ */ + +void LC_FloatCompare_Test_NE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + LC_MultiType_t WPMultiType; + LC_MultiType_t CompareMultiType; + + WPMultiType.Float32 = 1.0; + CompareMultiType.Float32 = 0.0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_NE; + + /* Execute the function being tested */ + Result = LC_FloatCompare(WatchIndex, WPMultiType, CompareMultiType); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_FloatCompare_Test_NE */ + +void LC_FloatCompare_Test_GT(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + LC_MultiType_t WPMultiType; + LC_MultiType_t CompareMultiType; + + WPMultiType.Float32 = 1.0; + CompareMultiType.Float32 = 0.0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_GT; + + /* Execute the function being tested */ + Result = LC_FloatCompare(WatchIndex, WPMultiType, CompareMultiType); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_FloatCompare_Test_GT */ + +void LC_FloatCompare_Test_GE(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + LC_MultiType_t WPMultiType; + LC_MultiType_t CompareMultiType; + + WPMultiType.Float32 = 1.0; + CompareMultiType.Float32 = 0.0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = LC_OPER_GE; + + /* Execute the function being tested */ + Result = LC_FloatCompare(WatchIndex, WPMultiType, CompareMultiType); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_TRUE, "Result == LC_WATCH_TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_FloatCompare_Test_GE */ + +void LC_FloatCompare_Test_InvalidOperatorID(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + LC_MultiType_t WPMultiType; + LC_MultiType_t CompareMultiType; + + WPMultiType.Float32 = 1.0; + CompareMultiType.Float32 = 0.0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = 99; + + /* Execute the function being tested */ + Result = LC_FloatCompare(WatchIndex, WPMultiType, CompareMultiType); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_ERROR, "Result == LC_WATCH_ERROR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, "WP has invalid operator ID: WP = 0, OperID = 99"), + "WP has invalid operator ID: WP = 0, OperID = 99"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_FloatCompare_Test_InvalidOperatorID */ + +void LC_FloatCompare_Test_NaN(void) +{ + uint8 Result; + uint16 WatchIndex = 0; + LC_MultiType_t WPMultiType; + LC_MultiType_t CompareMultiType; + + WPMultiType.Float32 = 1.0; + WPMultiType.Unsigned32 = 0x7F8FFFFF; + CompareMultiType.Float32 = 0.0; + + LC_OperData.WDTPtr[WatchIndex].OperatorID = 99; + + /* Execute the function being tested */ + Result = LC_FloatCompare(WatchIndex, WPMultiType, CompareMultiType); + + /* Verify results */ + UtAssert_True (Result == LC_WATCH_ERROR, "Result == LC_WATCH_ERROR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WP_NAN_ERR_EID, CFE_EVS_ERROR, "WP data value is a float NAN: WP = 0, Value = 0x7F8FFFFF"), + "WP data value is a float NAN: WP = 0, Value = 0x7F8FFFFF"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_FloatCompare_Test_NaN */ + +void LC_WPOffsetValid_Test_DataUByte(void) +{ + boolean Result; + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UBYTE; + LC_OperData.WDTPtr[WatchIndex].WatchpointOffset = 0; + + /* Execute the function being tested */ + Result = LC_WPOffsetValid(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_WPOffsetValid_Test_DataUByte */ + +void LC_WPOffsetValid_Test_UWordLE(void) +{ + boolean Result; + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UWORD_LE; + LC_OperData.WDTPtr[WatchIndex].WatchpointOffset = 0; + + /* Execute the function being tested */ + Result = LC_WPOffsetValid(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_WPOffsetValid_Test_UWordLE */ + +void LC_WPOffsetValid_Test_UDWordLE(void) +{ + boolean Result; + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UDWORD_LE; + LC_OperData.WDTPtr[WatchIndex].WatchpointOffset = 0; + + /* Execute the function being tested */ + Result = LC_WPOffsetValid(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_WPOffsetValid_Test_UDWordLE */ + +void LC_WPOffsetValid_Test_FloatLE(void) +{ + boolean Result; + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_FLOAT_LE; + LC_OperData.WDTPtr[WatchIndex].WatchpointOffset = 0; + + /* Execute the function being tested */ + Result = LC_WPOffsetValid(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_WPOffsetValid_Test_FloatLE */ + +void LC_WPOffsetValid_Test_DataTypeError(void) +{ + boolean Result; + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = 99; + LC_OperData.WDTPtr[WatchIndex].WatchpointOffset = 0; + + /* Execute the function being tested */ + Result = LC_WPOffsetValid(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == FALSE, "Result == FALSE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, "WP has undefined data type: WP = 0, DataType = 99"), + "WP has undefined data type: WP = 0, DataType = 99"); + + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR, "LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0, "LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_WPOffsetValid_Test_DataTypeError */ + +void LC_WPOffsetValid_Test_OffsetError(void) +{ + boolean Result; + uint16 WatchIndex = 0; + LC_NoArgsCmd_t CmdPacket; + + CFE_SB_InitMsg ((CFE_SB_MsgPtr_t)(&CmdPacket), 1, sizeof(LC_NoArgsCmd_t), TRUE); + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UBYTE; + LC_OperData.WDTPtr[WatchIndex].WatchpointOffset = sizeof(LC_NoArgsCmd_t); + + /* Execute the function being tested */ + Result = LC_WPOffsetValid(WatchIndex, (CFE_SB_MsgPtr_t)(&CmdPacket)); + + /* Verify results */ + UtAssert_True (Result == FALSE, "Result == FALSE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WP_OFFSET_ERR_EID, CFE_EVS_ERROR, "WP offset error: MID = 1, WP = 0, Offset = 8, DataSize = 1, MsgLen = 8"), + "WP offset error: MID = 1, WP = 0, Offset = 8, DataSize = 1, MsgLen = 8"); + + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR, "LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0, "LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_WPOffsetValid_Test_OffsetError */ + +void LC_GetSizedWPData_Test_DataByte(void) +{ + boolean Result; + uint16 WatchIndex = 0; + uint8 WPData[4]; + uint32 SizedData; + + WPData[0] = 1; + WPData[1] = 2; + WPData[2] = 3; + WPData[3] = 4; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_BYTE; + + /* Execute the function being tested */ + Result = LC_GetSizedWPData(WatchIndex, WPData, &SizedData); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + UtAssert_True (SizedData == 1, "SizedData == 1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_GetSizedWPData_Test_DataByte */ + +void LC_GetSizedWPData_Test_DataUByte(void) +{ + boolean Result; + uint16 WatchIndex = 0; + uint8 WPData[4]; + uint32 SizedData; + + WPData[0] = 1; + WPData[1] = 2; + WPData[2] = 3; + WPData[3] = 4; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UBYTE; + + /* Execute the function being tested */ + Result = LC_GetSizedWPData(WatchIndex, WPData, &SizedData); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + UtAssert_True (SizedData == 1, "SizedData == 1"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_GetSizedWPData_Test_DataUByte */ + +void LC_GetSizedWPData_Test_DataWordBELittleEndian(void) +{ + boolean Result; + uint16 WatchIndex = 0; + uint8 WPData[4]; + uint32 SizedData; + + WPData[0] = 1; + WPData[1] = 2; + WPData[2] = 3; + WPData[3] = 4; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_WORD_BE; + + /* Execute the function being tested */ + Result = LC_GetSizedWPData(WatchIndex, WPData, &SizedData); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + UtAssert_True (SizedData == 0x0102, "SizedData == 0x0102"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_GetSizedWPData_Test_DataWordBELittleEndian */ + +void LC_GetSizedWPData_Test_DataWordLELittleEndian(void) +{ + boolean Result; + uint16 WatchIndex = 0; + uint8 WPData[4]; + uint32 SizedData; + + WPData[0] = 1; + WPData[1] = 2; + WPData[2] = 3; + WPData[3] = 4; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_WORD_LE; + + /* Execute the function being tested */ + Result = LC_GetSizedWPData(WatchIndex, WPData, &SizedData); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + UtAssert_True (SizedData == 0x0201, "SizedData == 0x0201"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_GetSizedWPData_Test_DataWordLELittleEndian */ + +void LC_GetSizedWPData_Test_DataUWordBELittleEndian(void) +{ + boolean Result; + uint16 WatchIndex = 0; + uint8 WPData[4]; + uint32 SizedData; + + WPData[0] = 1; + WPData[1] = 2; + WPData[2] = 3; + WPData[3] = 4; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UWORD_BE; + + /* Execute the function being tested */ + Result = LC_GetSizedWPData(WatchIndex, WPData, &SizedData); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + UtAssert_True (SizedData == 0x0102, "SizedData == 0x0102"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_GetSizedWPData_Test_DataUWordBELittleEndian */ + +void LC_GetSizedWPData_Test_DataUWordLELittleEndian(void) +{ + boolean Result; + uint16 WatchIndex = 0; + uint8 WPData[4]; + uint32 SizedData; + + WPData[0] = 1; + WPData[1] = 2; + WPData[2] = 3; + WPData[3] = 4; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_UWORD_LE; + + /* Execute the function being tested */ + Result = LC_GetSizedWPData(WatchIndex, WPData, &SizedData); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + UtAssert_True (SizedData == 0x0201, "SizedData == 0x0201"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_GetSizedWPData_Test_DataUWordLELittleEndian */ + +void LC_GetSizedWPData_Test_DataFloatBELittleEndian(void) +{ + boolean Result; + uint16 WatchIndex = 0; + uint8 WPData[4]; + uint32 SizedData; + + WPData[0] = 1; + WPData[1] = 2; + WPData[2] = 3; + WPData[3] = 4; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_FLOAT_BE; + + /* Execute the function being tested */ + Result = LC_GetSizedWPData(WatchIndex, WPData, &SizedData); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + UtAssert_True (SizedData == 0x01020304, "SizedData == 0x01020304"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_GetSizedWPData_Test_DataFloatBELittleEndian */ + +void LC_GetSizedWPData_Test_DataFloatLELittleEndian(void) +{ + boolean Result; + uint16 WatchIndex = 0; + uint8 WPData[4]; + uint32 SizedData; + + WPData[0] = 1; + WPData[1] = 2; + WPData[2] = 3; + WPData[3] = 4; + + LC_OperData.WDTPtr[WatchIndex].DataType = LC_DATA_FLOAT_LE; + + /* Execute the function being tested */ + Result = LC_GetSizedWPData(WatchIndex, WPData, &SizedData); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + UtAssert_True (SizedData == 0x04030201, "SizedData == 0x04030201"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_GetSizedWPData_Test_DataFloatLELittleEndian */ + +void LC_GetSizedWPData_Test_DataTypeError(void) +{ + boolean Result; + uint16 WatchIndex = 0; + uint8 WPData[4]; + uint32 SizedData; + + WPData[0] = 1; + WPData[1] = 2; + WPData[2] = 3; + WPData[3] = 4; + + LC_OperData.WDTPtr[WatchIndex].DataType = 99; + + /* Execute the function being tested */ + Result = LC_GetSizedWPData(WatchIndex, WPData, &SizedData); + + /* Verify results */ + UtAssert_True (Result == FALSE, "Result == FALSE"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR, "LC_OperData.WRTPtr[WatchIndex].WatchResult == LC_WATCH_ERROR"); + UtAssert_True (LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0, "LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, "WP has undefined data type: WP = 0, DataType = 99"), + "WP has undefined data type: WP = 0, DataType = 99"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_GetSizedWPData_Test_DataTypeError */ + +void LC_ValidateWDT_Test_UnusedTableEntry(void) +{ + int32 Result; + int32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) + { + LC_OperData.WDTPtr[TableIndex].DataType = LC_WATCH_NOT_USED; + } + + /* Execute the function being tested */ + Result = LC_ValidateWDT(LC_OperData.WDTPtr); + + /* Verify results */ + UtAssert_True (Result == CFE_SUCCESS, "Result == CFE_SUCCESS"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, "WDT verify results: good = 0, bad = 0, unused = 176"), + "WDT verify results: good = 0, bad = 0, unused = 176"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ValidateWDT_Test_UnusedTableEntry */ + +void LC_ValidateWDT_Test_InvalidDataType(void) +{ + int32 Result; + int32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) + { + LC_OperData.WDTPtr[TableIndex].DataType = 99; + LC_OperData.WDTPtr[TableIndex].OperatorID = 1; + LC_OperData.WDTPtr[TableIndex].MessageID = 2; + LC_OperData.WDTPtr[TableIndex].ComparisonValue.Unsigned32 = 3; + } + + /* Execute the function being tested */ + Result = LC_ValidateWDT(LC_OperData.WDTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_WDTVAL_ERR_DATATYPE, "Result == LC_WDTVAL_ERR_DATATYPE"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_ERR_EID, CFE_EVS_ERROR, "WDT verify err: WP = 0, Err = 1, DType = 99, Oper = 1, MID = 2"), + "WDT verify err: WP = 0, Err = 1, DType = 99, Oper = 1, MID = 2"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, "WDT verify results: good = 0, bad = 176, unused = 0"), + "WDT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateWDT_Test_InvalidDataType */ + +void LC_ValidateWDT_Test_InvalidOperator(void) +{ + int32 Result; + int32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) + { + LC_OperData.WDTPtr[TableIndex].DataType = LC_DATA_BYTE; + LC_OperData.WDTPtr[TableIndex].OperatorID = 99; + LC_OperData.WDTPtr[TableIndex].MessageID = 2; + LC_OperData.WDTPtr[TableIndex].ComparisonValue.Unsigned32 = 3; + } + + /* Execute the function being tested */ + Result = LC_ValidateWDT(LC_OperData.WDTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_WDTVAL_ERR_OPER, "Result == LC_WDTVAL_ERR_OPER"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_ERR_EID, CFE_EVS_ERROR, "WDT verify err: WP = 0, Err = 2, DType = 1, Oper = 99, MID = 2"), + "WDT verify err: WP = 0, Err = 2, DType = 1, Oper = 99, MID = 2"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, "WDT verify results: good = 0, bad = 176, unused = 0"), + "WDT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateWDT_Test_InvalidOperator */ + +void LC_ValidateWDT_Test_BadMessageID(void) +{ + int32 Result; + int32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) + { + LC_OperData.WDTPtr[TableIndex].DataType = LC_DATA_BYTE; + LC_OperData.WDTPtr[TableIndex].OperatorID = LC_OPER_LT; + LC_OperData.WDTPtr[TableIndex].MessageID = CFE_SB_HIGHEST_VALID_MSGID + 1; + LC_OperData.WDTPtr[TableIndex].ComparisonValue.Unsigned32 = 3; + } + + /* Execute the function being tested */ + Result = LC_ValidateWDT(LC_OperData.WDTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_WDTVAL_ERR_MID, "Result == LC_WDTVAL_ERR_MID"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_ERR_EID, CFE_EVS_ERROR, "WDT verify err: WP = 0, Err = 3, DType = 1, Oper = 1, MID = 8192"), + "WDT verify err: WP = 0, Err = 3, DType = 1, Oper = 1, MID = 8192"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, "WDT verify results: good = 0, bad = 176, unused = 0"), + "WDT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateWDT_Test_BadMessageID */ + +void LC_ValidateWDT_Test_NaN(void) +{ + int32 Result; + int32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) + { + LC_OperData.WDTPtr[TableIndex].DataType = LC_DATA_FLOAT_LE; + LC_OperData.WDTPtr[TableIndex].OperatorID = LC_OPER_LT; + LC_OperData.WDTPtr[TableIndex].MessageID = CFE_SB_HIGHEST_VALID_MSGID; + LC_OperData.WDTPtr[TableIndex].ComparisonValue.Unsigned32 = 0x7F8FFFFF; + } + + /* Execute the function being tested */ + Result = LC_ValidateWDT(LC_OperData.WDTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_WDTVAL_ERR_FPNAN, "Result == LC_WDTVAL_ERR_FPNAN"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_FPERR_EID, CFE_EVS_ERROR, "WDT verify float err: WP = 0, Err = 4, ComparisonValue = 0x7F8FFFFF"), + "WDT verify float err: WP = 0, Err = 4, ComparisonValue = 0x7F8FFFFF"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, "WDT verify results: good = 0, bad = 176, unused = 0"), + "WDT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateWDT_Test_NaN */ + +void LC_ValidateWDT_Test_Inf(void) +{ + int32 Result; + int32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) + { + LC_OperData.WDTPtr[TableIndex].DataType = LC_DATA_FLOAT_LE; + LC_OperData.WDTPtr[TableIndex].OperatorID = LC_OPER_LT; + LC_OperData.WDTPtr[TableIndex].MessageID = CFE_SB_HIGHEST_VALID_MSGID; + LC_OperData.WDTPtr[TableIndex].ComparisonValue.Unsigned32 = 0x7F800000; + } + + /* Execute the function being tested */ + Result = LC_ValidateWDT(LC_OperData.WDTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_WDTVAL_ERR_FPINF, "Result == LC_WDTVAL_ERR_FPINF"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_FPERR_EID, CFE_EVS_ERROR, "WDT verify float err: WP = 0, Err = 5, ComparisonValue = 0x7F800000"), + "WDT verify float err: WP = 0, Err = 5, ComparisonValue = 0x7F800000"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, "WDT verify results: good = 0, bad = 176, unused = 0"), + "WDT verify results: good = 0, bad = 176, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 2, "Ut_CFE_EVS_GetEventQueueDepth() == 2"); + +} /* end LC_ValidateWDT_Test_Inf */ + +void LC_ValidateWDT_Test_FloatingPointPassed(void) +{ + int32 Result; + int32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) + { + LC_OperData.WDTPtr[TableIndex].DataType = LC_DATA_FLOAT_LE; + LC_OperData.WDTPtr[TableIndex].OperatorID = LC_OPER_LT; + LC_OperData.WDTPtr[TableIndex].MessageID = CFE_SB_HIGHEST_VALID_MSGID; + LC_OperData.WDTPtr[TableIndex].ComparisonValue.Unsigned32 = 1; + } + + /* Execute the function being tested */ + Result = LC_ValidateWDT(LC_OperData.WDTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_WDTVAL_NO_ERR, "Result == LC_WDTVAL_NO_ERR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, "WDT verify results: good = 176, bad = 0, unused = 0"), + "WDT verify results: good = 176, bad = 0, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ValidateWDT_Test_FloatingPointPassed */ + +void LC_ValidateWDT_Test_NonFloatingPointPassed(void) +{ + int32 Result; + int32 TableIndex; + + for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) + { + LC_OperData.WDTPtr[TableIndex].DataType = LC_DATA_BYTE; + LC_OperData.WDTPtr[TableIndex].OperatorID = LC_OPER_LT; + LC_OperData.WDTPtr[TableIndex].MessageID = CFE_SB_HIGHEST_VALID_MSGID; + LC_OperData.WDTPtr[TableIndex].ComparisonValue.Unsigned32 = 1; + } + + /* Execute the function being tested */ + Result = LC_ValidateWDT(LC_OperData.WDTPtr); + + /* Verify results */ + UtAssert_True (Result == LC_WDTVAL_NO_ERR, "Result == LC_WDTVAL_NO_ERR"); + + UtAssert_True + (Ut_CFE_EVS_EventSent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, "WDT verify results: good = 176, bad = 0, unused = 0"), + "WDT verify results: good = 176, bad = 0, unused = 0"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 1, "Ut_CFE_EVS_GetEventQueueDepth() == 1"); + +} /* end LC_ValidateWDT_Test_NonFloatingPointPassed */ + +void LC_Uint32IsNAN_Test_True(void) +{ + boolean Result; + + /* Execute the function being tested */ + Result = LC_Uint32IsNAN(0x7F8FFFFF); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_Uint32IsNAN_Test_True */ + +void LC_Uint32IsNAN_Test_False(void) +{ + boolean Result; + + /* Execute the function being tested */ + Result = LC_Uint32IsNAN(0x10000000); + + /* Verify results */ + UtAssert_True (Result == FALSE, "Result == FALSE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_Uint32IsNAN_Test_False */ + +void LC_Uint32IsInfinite_Test_True(void) +{ + boolean Result; + + /* Execute the function being tested */ + Result = LC_Uint32IsInfinite(0x7F800000); + + /* Verify results */ + UtAssert_True (Result == TRUE, "Result == TRUE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_Uint32IsInfinite_Test_True */ + +void LC_Uint32IsInfinite_Test_False(void) +{ + boolean Result; + + /* Execute the function being tested */ + Result = LC_Uint32IsInfinite(0x10000000); + + /* Verify results */ + UtAssert_True (Result == FALSE, "Result == FALSE"); + + UtAssert_True (Ut_CFE_EVS_GetEventQueueDepth() == 0, "Ut_CFE_EVS_GetEventQueueDepth() == 0"); + +} /* end LC_Uint32IsInfinite_Test_False */ + +void LC_Watch_Test_AddTestCases(void) +{ + UtTest_Add(LC_CreateHashTable_Test_UnsubscribeError, LC_Test_Setup, LC_Test_TearDown, "LC_CreateHashTable_Test_UnsubscribeError"); + UtTest_Add(LC_CreateHashTable_Test_NominalAllSameMID, LC_Test_Setup, LC_Test_TearDown, "LC_CreateHashTable_Test_NominalAllSameMID"); + + UtTest_Add(LC_AddWatchpoint_Test_HashTableAndWatchPtListNullPointersNominal, LC_Test_Setup, LC_Test_TearDown, "LC_AddWatchpoint_Test_HashTableAndWatchPtListNullPointersNominal"); + UtTest_Add(LC_AddWatchpoint_Test_HashTableAndWatchPtListNotNullPointerTwoMsgLinksMIDFound, LC_Test_Setup, LC_Test_TearDown, "LC_AddWatchpoint_Test_HashTableAndWatchPtListNotNullPointerTwoMsgLinksMIDFound"); + UtTest_Add(LC_AddWatchpoint_Test_NullPointersErrorSubscribingWatchpoint, LC_Test_Setup, LC_Test_TearDown, "LC_AddWatchpoint_Test_NullPointersErrorSubscribingWatchpoint"); + + UtTest_Add(LC_CheckMsgForWPs_Test_Nominal, LC_Test_Setup, LC_Test_TearDown, "LC_CheckMsgForWPs_Test_Nominal"); + UtTest_Add(LC_CheckMsgForWPs_Test_UnreferencedMessageID, LC_Test_Setup, LC_Test_TearDown, "LC_CheckMsgForWPs_Test_UnreferencedMessageID"); + + UtTest_Add(LC_ProcessWP_Test_CustomFunctionWatchFalse, LC_Test_Setup, LC_Test_TearDown, "LC_ProcessWP_Test_CustomFunctionWatchFalse"); + UtTest_Add(LC_ProcessWP_Test_OperatorCompareError, LC_Test_Setup, LC_Test_TearDown, "LC_ProcessWP_Test_OperatorCompareError"); + UtTest_Add(LC_ProcessWP_Test_OperatorCompareWatchTruePreviousStale, LC_Test_Setup, LC_Test_TearDown, "LC_ProcessWP_Test_OperatorCompareWatchTruePreviousStale"); + UtTest_Add(LC_ProcessWP_Test_OperatorCompareWatchFalsePreviousStale, LC_Test_Setup, LC_Test_TearDown, "LC_ProcessWP_Test_OperatorCompareWatchFalsePreviousStale"); + + /* Note: Only testing little-ending (LE) cases. Not testing big-endian (BE) cases. */ + UtTest_Add(LC_OperatorCompare_Test_DataByte, LC_Test_Setup, LC_Test_TearDown, "LC_OperatorCompare_Test_DataByte"); + UtTest_Add(LC_OperatorCompare_Test_DataWordLE, LC_Test_Setup, LC_Test_TearDown, "LC_OperatorCompare_Test_DataWordLE"); + UtTest_Add(LC_OperatorCompare_Test_DataDWordLE, LC_Test_Setup, LC_Test_TearDown, "LC_OperatorCompare_Test_DataDWordLE"); + UtTest_Add(LC_OperatorCompare_Test_DataUByte, LC_Test_Setup, LC_Test_TearDown, "LC_OperatorCompare_Test_DataUByte"); + UtTest_Add(LC_OperatorCompare_Test_DataUWordLE, LC_Test_Setup, LC_Test_TearDown, "LC_OperatorCompare_Test_DataUWordLE"); + UtTest_Add(LC_OperatorCompare_Test_DataUDWordLE, LC_Test_Setup, LC_Test_TearDown, "LC_OperatorCompare_Test_DataUDWordLE"); + UtTest_Add(LC_OperatorCompare_Test_DataFloatLE, LC_Test_Setup, LC_Test_TearDown, "LC_OperatorCompare_Test_DataFloatLE"); + UtTest_Add(LC_OperatorCompare_Test_DataTypeError, LC_Test_Setup, LC_Test_TearDown, "LC_OperatorCompare_Test_DataTypeError"); + + UtTest_Add(LC_SignedCompare_Test_LE, LC_Test_Setup, LC_Test_TearDown, "LC_SignedCompare_Test_LE"); + UtTest_Add(LC_SignedCompare_Test_LT, LC_Test_Setup, LC_Test_TearDown, "LC_SignedCompare_Test_LT"); + UtTest_Add(LC_SignedCompare_Test_EQ, LC_Test_Setup, LC_Test_TearDown, "LC_SignedCompare_Test_EQ"); + UtTest_Add(LC_SignedCompare_Test_NE, LC_Test_Setup, LC_Test_TearDown, "LC_SignedCompare_Test_NE"); + UtTest_Add(LC_SignedCompare_Test_GT, LC_Test_Setup, LC_Test_TearDown, "LC_SignedCompare_Test_GT"); + UtTest_Add(LC_SignedCompare_Test_GE, LC_Test_Setup, LC_Test_TearDown, "LC_SignedCompare_Test_GE"); + UtTest_Add(LC_SignedCompare_Test_InvalidOperatorID, LC_Test_Setup, LC_Test_TearDown, "LC_SignedCompare_Test_InvalidOperatorID"); + + UtTest_Add(LC_UnsignedCompare_Test_LE, LC_Test_Setup, LC_Test_TearDown, "LC_UnsignedCompare_Test_LE"); + UtTest_Add(LC_UnsignedCompare_Test_LT, LC_Test_Setup, LC_Test_TearDown, "LC_UnsignedCompare_Test_LT"); + UtTest_Add(LC_UnsignedCompare_Test_EQ, LC_Test_Setup, LC_Test_TearDown, "LC_UnsignedCompare_Test_EQ"); + UtTest_Add(LC_UnsignedCompare_Test_NE, LC_Test_Setup, LC_Test_TearDown, "LC_UnsignedCompare_Test_NE"); + UtTest_Add(LC_UnsignedCompare_Test_GT, LC_Test_Setup, LC_Test_TearDown, "LC_UnsignedCompare_Test_GT"); + UtTest_Add(LC_UnsignedCompare_Test_GE, LC_Test_Setup, LC_Test_TearDown, "LC_UnsignedCompare_Test_GE"); + UtTest_Add(LC_UnsignedCompare_Test_InvalidOperatorID, LC_Test_Setup, LC_Test_TearDown, "LC_UnsignedCompare_Test_InvalidOperatorID"); + + UtTest_Add(LC_FloatCompare_Test_LE, LC_Test_Setup, LC_Test_TearDown, "LC_FloatCompare_Test_LE"); + UtTest_Add(LC_FloatCompare_Test_LT, LC_Test_Setup, LC_Test_TearDown, "LC_FloatCompare_Test_LT"); + UtTest_Add(LC_FloatCompare_Test_EQ, LC_Test_Setup, LC_Test_TearDown, "LC_FloatCompare_Test_EQ"); + UtTest_Add(LC_FloatCompare_Test_NE, LC_Test_Setup, LC_Test_TearDown, "LC_FloatCompare_Test_NE"); + UtTest_Add(LC_FloatCompare_Test_GT, LC_Test_Setup, LC_Test_TearDown, "LC_FloatCompare_Test_GT"); + UtTest_Add(LC_FloatCompare_Test_GE, LC_Test_Setup, LC_Test_TearDown, "LC_FloatCompare_Test_GE"); + UtTest_Add(LC_FloatCompare_Test_InvalidOperatorID, LC_Test_Setup, LC_Test_TearDown, "LC_FloatCompare_Test_InvalidOperatorID"); + UtTest_Add(LC_FloatCompare_Test_NaN, LC_Test_Setup, LC_Test_TearDown, "LC_FloatCompare_Test_NaN"); + + UtTest_Add(LC_WPOffsetValid_Test_DataUByte, LC_Test_Setup, LC_Test_TearDown, "LC_WPOffsetValid_Test_DataUByte"); + UtTest_Add(LC_WPOffsetValid_Test_UWordLE, LC_Test_Setup, LC_Test_TearDown, "LC_WPOffsetValid_Test_UWordLE"); + UtTest_Add(LC_WPOffsetValid_Test_UDWordLE, LC_Test_Setup, LC_Test_TearDown, "LC_WPOffsetValid_Test_UDWordLE"); + UtTest_Add(LC_WPOffsetValid_Test_FloatLE, LC_Test_Setup, LC_Test_TearDown, "LC_WPOffsetValid_Test_FloatLE"); + UtTest_Add(LC_WPOffsetValid_Test_DataTypeError, LC_Test_Setup, LC_Test_TearDown, "LC_WPOffsetValid_Test_DataTypeError"); + UtTest_Add(LC_WPOffsetValid_Test_OffsetError, LC_Test_Setup, LC_Test_TearDown, "LC_WPOffsetValid_Test_OffsetError"); + + UtTest_Add(LC_GetSizedWPData_Test_DataByte, LC_Test_Setup, LC_Test_TearDown, "LC_GetSizedWPData_Test_DataByte"); + UtTest_Add(LC_GetSizedWPData_Test_DataUByte, LC_Test_Setup, LC_Test_TearDown, "LC_GetSizedWPData_Test_DataUByte"); + UtTest_Add(LC_GetSizedWPData_Test_DataWordBELittleEndian, LC_Test_Setup, LC_Test_TearDown, "LC_GetSizedWPData_Test_DataWordBELittleEndian"); + UtTest_Add(LC_GetSizedWPData_Test_DataWordLELittleEndian, LC_Test_Setup, LC_Test_TearDown, "LC_GetSizedWPData_Test_DataWordLELittleEndian"); + UtTest_Add(LC_GetSizedWPData_Test_DataUWordBELittleEndian, LC_Test_Setup, LC_Test_TearDown, "LC_GetSizedWPData_Test_DataUWordBELittleEndian"); + UtTest_Add(LC_GetSizedWPData_Test_DataUWordLELittleEndian, LC_Test_Setup, LC_Test_TearDown, "LC_GetSizedWPData_Test_DataUWordLELittleEndian"); + UtTest_Add(LC_GetSizedWPData_Test_DataFloatBELittleEndian, LC_Test_Setup, LC_Test_TearDown, "LC_GetSizedWPData_Test_DataFloatBELittleEndian"); + UtTest_Add(LC_GetSizedWPData_Test_DataFloatLELittleEndian, LC_Test_Setup, LC_Test_TearDown, "LC_GetSizedWPData_Test_DataFloatLELittleEndian"); + UtTest_Add(LC_GetSizedWPData_Test_DataTypeError, LC_Test_Setup, LC_Test_TearDown, "LC_GetSizedWPData_Test_DataTypeError"); + + UtTest_Add(LC_ValidateWDT_Test_UnusedTableEntry, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateWDT_Test_UnusedTableEntry"); + UtTest_Add(LC_ValidateWDT_Test_InvalidDataType, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateWDT_Test_InvalidDataType"); + UtTest_Add(LC_ValidateWDT_Test_InvalidOperator, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateWDT_Test_InvalidOperator"); + UtTest_Add(LC_ValidateWDT_Test_BadMessageID, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateWDT_Test_BadMessageID"); + UtTest_Add(LC_ValidateWDT_Test_NaN, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateWDT_Test_NaN"); + UtTest_Add(LC_ValidateWDT_Test_Inf, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateWDT_Test_Inf"); + UtTest_Add(LC_ValidateWDT_Test_FloatingPointPassed, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateWDT_Test_FloatingPointPassed"); + UtTest_Add(LC_ValidateWDT_Test_NonFloatingPointPassed, LC_Test_Setup, LC_Test_TearDown, "LC_ValidateWDT_Test_NonFloatingPointPassed"); + + UtTest_Add(LC_Uint32IsNAN_Test_True, LC_Test_Setup, LC_Test_TearDown, "LC_Uint32IsNAN_Test_True"); + UtTest_Add(LC_Uint32IsNAN_Test_False, LC_Test_Setup, LC_Test_TearDown, "LC_Uint32IsNAN_Test_False"); + + UtTest_Add(LC_Uint32IsInfinite_Test_True, LC_Test_Setup, LC_Test_TearDown, "LC_Uint32IsInfinite_Test_True"); + UtTest_Add(LC_Uint32IsInfinite_Test_False, LC_Test_Setup, LC_Test_TearDown, "LC_Uint32IsInfinite_Test_False"); + +} /* end LC_Watch_Test_AddTestCases */ + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/lc_watch_test.h b/fsw/unit_test/lc_watch_test.h new file mode 100644 index 0000000..4f88385 --- /dev/null +++ b/fsw/unit_test/lc_watch_test.h @@ -0,0 +1,41 @@ + /************************************************************************* + ** File: + ** $Id: lc_watch_test.h 1.2 2017/01/22 17:24:50EST sstrege Exp $ + ** + ** Copyright (c) 2007-2014 United States Government as represented by the + ** Administrator of the National Aeronautics and Space Administration. + ** All Other Rights Reserved. + ** + ** This software was created at NASA's Goddard Space Flight Center. + ** This software is governed by the NASA Open Source Agreement and may be + ** used, distributed and modified only pursuant to the terms of that + ** agreement. + ** + ** Purpose: + ** This file contains the function prototypes for the unit test cases for lc_watch.c + ** + ** References: + ** Flight Software Branch C Coding Standard Version 1.2 + ** CFS Development Standards Document + ** + ** Notes: + ** + *************************************************************************/ + +/* + * Includes + */ + +#include "utassert.h" +#include "uttest.h" + +/* + * Function Prototypes + */ + +void LC_Watch_Test_AddTestCases(void); + + +/************************/ +/* End of File Comment */ +/************************/ diff --git a/fsw/unit_test/makefile b/fsw/unit_test/makefile new file mode 100644 index 0000000..a312d8c --- /dev/null +++ b/fsw/unit_test/makefile @@ -0,0 +1,169 @@ +############################################################################## +## File: +## $Id: makefile 1.2 2017/01/22 17:24:50EST sstrege Exp $ +## +## Copyright (c) 2007-2014 United States Government as represented by the +## Administrator of the National Aeronautics and Space Administration. +## All Other Rights Reserved. +## +## This software was created at NASA's Goddard Space Flight Center. +## This software is governed by the NASA Open Source Agreement and may be +## used, distributed and modified only pursuant to the terms of that +## agreement. +## +## Purpose: +## Makefile for building the CFS File Manager (LC) UT Assert unit tests +## +############################################################################## +## GNU Makefile for building UT unit tests + +# +# Supported MAKEFILE targets: +# clean - deletes object files, executables, output files, and gcov files +# all - makes lc_testrunner.exe +# run - runs lc_testrunner.exe +# gcov - prints a GCOV coverage report (make all, make run, make gcov) +# +# GCOV is disabled by default. If you are using the source level debugger you will want to +# disable GCOV. To enable GCOV you can override the ENABLE_GCOV variable on the command line +# by setting it to TRUE. For example "make ENABLE_GCOV=TRUE". +# + +# +# VPATH specifies the search paths for source files outside of the current directory. Note that +# all object files will be created in the current directory even if the source file is not in the +# current directory. +# +VPATH := . +VPATH += $(UT_ASSERT_SRC)/src +VPATH += $(CFS_MISSION)/apps/cfs_lib/fsw/src +VPATH += ../src +VPATH += ../for_build + +LC_PATH=../../ + +# +# INCLUDES specifies the search paths for include files outside of the current directory. +# Note that the -I is required. +# +INCLUDES := -I. +INCLUDES += -I$(UT_ASSERT_SRC)/inc +INCLUDES += -I$(CFS_MISSION)/build/pc-linux/inc +INCLUDES += -I$(APP_DIR)/cfs_lib/fsw/public_inc +INCLUDES += -I$(CFE_DIR)/fsw/cfe-core/os/inc +INCLUDES += -I$(CFE_DIR)/fsw/cfe-core/src/inc +INCLUDES += -I$(CFE_DIR)/fsw/cfe-core/src/time +INCLUDES += -I$(CFE_DIR)/fsw/cfe-core/src/sb +INCLUDES += -I$(CFE_DIR)/fsw/cfe-core/src/es +INCLUDES += -I$(CFE_DIR)/fsw/cfe-core/src/evs +INCLUDES += -I$(CFE_DIR)/fsw/cfe-core/src/fs +INCLUDES += -I$(CFE_DIR)/fsw/cfe-core/src/tbl +INCLUDES += -I$(CFE_DIR)/fsw/mission_inc +INCLUDES += -I$(CFE_DIR)/fsw/platform_inc/cpu1 +INCLUDES += -I$(OSAL_DIR)/src/os/inc +INCLUDES += -I$(OSAL_DIR)/build/inc +INCLUDES += -I$(PSP_DIR)/fsw/inc +INCLUDES += -I$(PSP_DIR)/fsw/pc-linux/inc +INCLUDES += -I$(PSP_DIR)/fsw/pc-linux/inc +INCLUDES += -I$(LC_PATH)/fsw/src +INCLUDES += -I$(LC_PATH)/fsw/mission_inc +INCLUDES += -I$(LC_PATH)/fsw/platform_inc + +# +# FLIGHT_OBJS specifies flight software object files. +# +FLIGHT_OBJS := lc_app.o lc_action.o lc_cmds.o lc_custom.o lc_watch.o + +# +# UT_OBJS specifies unit test object files. +# +UT_OBJS := ut_osapi_stubs.o +UT_OBJS += ut_osfileapi_stubs.o +UT_OBJS += ut_cfe_sb_stubs.o +UT_OBJS += ut_cfe_es_stubs.o +UT_OBJS += ut_cfe_evs_stubs.o +UT_OBJS += ut_cfe_time_stubs.o +UT_OBJS += ut_cfe_fs_stubs.o +UT_OBJS += ut_cfe_psp_memutils_stubs.o +UT_OBJS += ut_cfe_psp_eeprom_stubs.o +UT_OBJS += ut_cfe_psp_ram_stubs.o +UT_OBJS += ut_cfe_psp_memrange_stubs.o +UT_OBJS += ut_cfe_psp_watchdog_stubs.o +UT_OBJS += ut_cfe_psp_timer_stubs.o +UT_OBJS += ut_cfe_tbl_stubs.o +UT_OBJS += ut_cfe_sb_hooks.o +UT_OBJS += ut_cfe_es_hooks.o +UT_OBJS += ut_cfe_evs_hooks.o +UT_OBJS += ut_cfe_tbl_hooks.o +UT_OBJS += ut_cfe_time_hooks.o +UT_OBJS += utassert.o +UT_OBJS += utlist.o +UT_OBJS += uttest.o +UT_OBJS += uttools.o +UT_OBJS += lc_app_test.o +UT_OBJS += lc_action_test.o +UT_OBJS += lc_cmds_test.o +UT_OBJS += lc_custom_test.o +UT_OBJS += lc_watch_test.o +UT_OBJS += lc_testrunner.o +UT_OBJS += lc_test_utils.o +UT_OBJS += cfs_utils.o + +# +# UT_TEST_RUNNER specifies the name of the test runner. +# +UT_TEST_RUNNER = lc_testrunner.exe + +############################################################################### + +COMPILER=gcc +LINKER=gcc + +# +# Compiler and Linker Options +# +GCOV_COPT = -fprofile-arcs -ftest-coverage -pg -p +GCOV_LOPT = -pg -p -fprofile-arcs -ftest-coverage -lgcov -lm + +#WARNINGS = -Wall -W -ansi -Werror -Wstrict-prototypes -Wundef +WARNINGS = -Wall -Wstrict-prototypes -Wundef +DEBUGGER = -g + +COPT = $(WARNINGS) $(DEBUGGER) $(GCOV_COPT) -DSOFTWARE_LITTLE_BIT_ORDER -D_EL -D_ix86_ -DUT_VERBOSE -DOSAPI_NO_SPECIAL_ATTRIBS + +LOPT = $(GCOV_LOPT) + +############################################################################### +## Rule to make the specified TARGET +## +%.exe: %.o + $(LINKER) $(LOPT) $^ -o $*.exe + +############################################################################### +## "C" COMPILER RULE +## +%.o: %.c + $(COMPILER) -c $(COPT) $(INCLUDES) $< + +############################################################################## +## + +all:$(UT_TEST_RUNNER) + +$(UT_TEST_RUNNER): $(UT_OBJS) $(FLIGHT_OBJS) + +clean :: + rm -f *.o *.exe *.gcda *.gcno *.gcov gmon.out + +run :: + ./$(UT_TEST_RUNNER) + +gcov :: + @echo + @gcov $(FLIGHT_OBJS:.o=.gcda) | sed 'N;s/\n/ /' | \ + sed -n '/File/p' | sed '/ads/d' | sed -e '/\.h/d' | \ + sed 's/ Lines executed:/ /; s/File/gcov:/; s/of// ' + @rm -f *.gcda *.gcno + @echo + +# end of file diff --git a/fsw/unit_test/output_CDS/README_CDS.txt b/fsw/unit_test/output_CDS/README_CDS.txt deleted file mode 100644 index 1ca2934..0000000 --- a/fsw/unit_test/output_CDS/README_CDS.txt +++ /dev/null @@ -1,97 +0,0 @@ - -README for CFS Limit Checker (LC) unit tests run on 1/15/09 - -CDS Configuration Setting -------------------------- -#define LC_SAVE_TO_CDS not commented out in lc_platform_cfg.h -This readme is for unit test output WITH the CDS used during -application initialization. - -Platform --------- -Cygwin on Windows XP - -Supporting Software Used: -------------------------- -cFE v5.2/OSAL 2.12 with bundled UTF - -Coverage Summary ----------------- -$ gcov lc_action.c -File `../src/lc_action.c' -Lines executed:100.00% of 183 -../src/lc_action.c:creating `lc_action.c.gcov' - -$ gcov lc_app.c -File `../src/lc_app.c' -Lines executed:94.06% of 202 -../src/lc_app.c:creating `lc_app.c.gcov' - -$ gcov lc_cmds.c -File `../src/lc_cmds.c' -Lines executed:97.87% of 422 -../src/lc_cmds.c:creating `lc_cmds.c.gcov' - -$ gcov lc_custom.c -File `../src/lc_custom.c' -Lines executed:100.00% of 12 -../src/lc_custom.c:creating `lc_custom.c.gcov' - -$ gcov lc_watch.c -File `../src/lc_watch.c' -Lines executed:94.65% of 318 -../src/lc_watch.c:creating `lc_watch.c.gcov' - -Comments On Code Not Covered ----------------------------- -In the function LC_InitFromCDS in file lc_app.c.gcov - - Lines: 659, 661, 675, 678 - In the current version of the UTF, the function CFE_ES_RegisterCDS - does not support function hooks. This is the only way that these - two error events could be forced since we needed error returns on - only the second or third calls to these functions, but success - on others. - - Lines: 753, 759, 795, 801 - In the current version of the UTF, the function CFE_ES_RestoreFromCDS - does not support function hooks. This is the only way that these - two error events could be forced since we needed error returns on - only the second or third calls to these functions, but success - on others. - -In the function LC_ExitApp in file lc_app.c.gcov - - Lines: 1107, 1113, 1143, 1149 - In the current version of the UTF, the function CFE_ES_CopyToCDS - does not support function hooks. This is the only way that these - two error events could be forced since we needed error returns on - only the second or third calls to these functions, but success - on others. - -In the function LC_AcquirePointers in file lc_cmds.c.gcov - - Lines: 1302, 1307, 1309, 1313 - Lines: 1342, 1347, 1349, 1353 - In the current version of the UTF, the function CFE_TBL_DumpToBuffer - does not support function hooks or preset return codes and allowing this - function to be called during unit testing resulted in a core dump. - This was most likely because the unit tests do not actually use UTF - table services but work with local data structures to simulate table - data. - - Line: 1366 - In the current version of the UTF, the function CFE_TBL_GetStatus - does not support function hooks so there was no way to force an error - return on only the second call (and not the first) to this function. - -In the function LC_GetSizedWPData in file lc_watch.c.gcov - - Lines: 941, 942, 962, 963, 973, 974, 993, 994 - Lines: 1005 to 1008, 1032 to 1037 - These tests were run on an x86 machine which is Little Endian. To - execute these lines would require execution on a big endian machine - (such as a PowerPC) that would have resulted in an alternate - set of unexecuted lines. Since we already have two sets of unit - test output based upon CDS use, it didn't seem worthwhile to add - additional ones just for these cases. diff --git a/fsw/unit_test/output_CDS/lc_action.c.gcov b/fsw/unit_test/output_CDS/lc_action.c.gcov deleted file mode 100644 index 6fcb508..0000000 --- a/fsw/unit_test/output_CDS/lc_action.c.gcov +++ /dev/null @@ -1,756 +0,0 @@ - -: 0:Source:../src/lc_action.c - -: 0:Graph:lc_action.gcno - -: 0:Data:lc_action.gcda - -: 0:Runs:1 - -: 0:Programs:1 - -: 1:/************************************************************************* - -: 2:** File: - -: 3:** $Id: lc_action.c.gcov 1.1 2012/07/31 16:53:45EDT nschweis Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** Functions used for CFS Limit Checker actionpoint processing - -: 7:** - -: 8:** $Log: lc_action.c.gcov $ - -: 8:** Revision 1.1 2012/07/31 16:53:45EDT nschweis - -: 8:** Initial revision - -: 8:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/output_CDS/project.pj - -: 8:** Revision 1.1 2009/01/15 15:25:59EST dahardis - -: 8:** Initial revision - -: 8:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/output_CDS/project.pj - -: 9:** Revision 1.2 2008/12/03 13:59:46EST dahardis - -: 10:** Corrections from peer code review - -: 11:** Revision 1.1 2008/10/29 14:18:36EDT dahardison - -: 12:** Initial revision - -: 13:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 14:** - -: 15:*************************************************************************/ - -: 16: - -: 17:/************************************************************************* - -: 18:** Includes - -: 19:*************************************************************************/ - -: 20:#include "lc_app.h" - -: 21:#include "lc_action.h" - -: 22:#include "lc_events.h" - -: 23:#include "lc_custom.h" - -: 24: - -: 25:#include - -: 26: - -: 27:/************************************************************************* - -: 28:** Local Function Prototypes - -: 29:*************************************************************************/ - -: 30:/************************************************************************/ - -: 31:/** \brief Sample single actionpoint - -: 32:** - -: 33:** \par Description - -: 34:** Support function for actionpoint processing that will sample - -: 35:** a single actionpoint and handle the result as needed - -: 36:** - -: 37:** \par Assumptions, External Events, and Notes: - -: 38:** None - -: 39:** - -: 40:** \param [in] APNumber The actionpoint number to sample (zero - -: 41:** based actionpoint definition table index) - -: 42:** - -: 43:*************************************************************************/ - -: 44:void LC_SampleSingleAP(uint16 APNumber); - -: 45: - -: 46:/************************************************************************/ - -: 47:/** \brief Evaluate RPN - -: 48:** - -: 49:** \par Description - -: 50:** Support function for actionpoint processing that evaluates - -: 51:** the reverse polish notation (RPN) equation for the specified - -: 52:** actionpoint and returns the result - -: 53:** - -: 54:** \par Assumptions, External Events, and Notes: - -: 55:** None - -: 56:** - -: 57:** \param [in] APNumber The actionpoint number to evaluate (zero - -: 58:** based actionpoint definition table index) - -: 59:** - -: 60:** \returns - -: 61:** \retcode #LC_ACTION_PASS \retdesc \copydoc LC_ACTION_PASS \endcode - -: 62:** \retcode #LC_ACTION_FAIL \retdesc \copydoc LC_ACTION_FAIL \endcode - -: 63:** \retcode #LC_ACTION_NOT_MEASURED \retdesc \copydoc LC_ACTION_NOT_MEASURED \endcode - -: 64:** \retcode #LC_ACTION_ERROR \retdesc \copydoc LC_ACTION_ERROR \endcode - -: 65:** \endreturns - -: 66:** - -: 67:*************************************************************************/ - -: 68:uint8 LC_EvaluateRPN(uint16 APNumber); - -: 69: - -: 70:/************************************************************************/ - -: 71:/** \brief Validate RPN expression - -: 72:** - -: 73:** \par Description - -: 74:** Support function for actionpoint definition table validation - -: 75:** that checks a reverse polish notation (RPN) equation for - -: 76:** possible errors. - -: 77:** - -: 78:** \par Assumptions, External Events, and Notes: - -: 79:** None - -: 80:** - -: 81:** \param [in] RPNPtr Pointer to the RPN equation - -: 82:** - -: 83:** \param [in] IndexValue A pointer where to store the equation - -: 84:** index value if an error is detected - -: 85:** - -: 86:** \param [in] StackDepthValue A pointer where to store the equation - -: 87:** stack depth value if an error is detected - -: 88:** - -: 89:** \param [out] *IndexValue Equation index value where error was - -: 90:** found. Not modified if return code is - -: 91:** #LC_ADTVAL_NO_ERR - -: 92:** - -: 93:** \param [out] *StackDepthValue Equation stack depth value where error - -: 94:** found. Not modified if return code is - -: 95:** #LC_ADTVAL_NO_ERR - -: 96:** - -: 97:** \returns - -: 98:** \retcode #LC_ADTVAL_NO_ERR \retdesc \copydoc LC_ADTVAL_NO_ERR \endcode - -: 99:** \retcode #LC_ADTVAL_ERR_RPN \retdesc \copydoc LC_ADTVAL_ERR_RPN \endcode - -: 100:** \endreturns - -: 101:** - -: 102:** \sa #LC_ValidateADT - -: 103:** - -: 104:*************************************************************************/ - -: 105:int32 LC_ValidateRPN(uint16 *RPNPtr, - -: 106: int32 *IndexValue, - -: 107: int32 *StackDepthValue); - -: 108: - -: 109:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 110:/* */ - -: 111:/* Sample one or all actionpoints */ - -: 112:/* */ - -: 113:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 114:void LC_SampleAPs(uint16 APNumber) -function LC_SampleAPs called 14 returned 100% blocks executed 100% - 14: 115:{ - 14: 116: uint16 TableIndex; - 14: 117: uint8 CurrentAPState; - -: 118: - -: 119: /* - -: 120: ** If we're specifying a single actionpoint, make sure it's - -: 121: ** current state is valid for a sample request - -: 122: */ - 14: 123: if (APNumber != LC_ALL_ACTIONPOINTS) - -: 124: { - 13: 125: CurrentAPState = LC_OperData.ARTPtr[APNumber].CurrentState; - -: 126: - 13: 127: if ((CurrentAPState != LC_ACTION_NOT_USED) && - -: 128: (CurrentAPState != LC_APSTATE_PERMOFF)) - -: 129: { - -: 130: /* - -: 131: ** Sample the specified actionpoint - -: 132: */ - 12: 133: LC_SampleSingleAP(APNumber); - -: 134: } - -: 135: else - -: 136: { - -: 137: /* - -: 138: ** Actionpoint isn't currently operational - -: 139: */ - 1: 140: CFE_EVS_SendEvent(LC_APSAMPLE_CURR_ERR_EID, CFE_EVS_ERROR, - -: 141: "Sample AP error, invalid current AP state: AP = %d, State = %d", - -: 142: APNumber, CurrentAPState); - -: 143: } - -: 144: } - -: 145: else - -: 146: { - -: 147: /* - -: 148: ** Sample ALL actionpoints - -: 149: */ - 177: 150: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) - -: 151: { - 176: 152: LC_SampleSingleAP(TableIndex); - -: 153: } - -: 154: - -: 155: } - -: 156: - 14: 157: return; - -: 158: - -: 159:} /* end LC_SampleAP */ - -: 160: - -: 161:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 162:/* */ - -: 163:/* Sample a single actionpoint */ - -: 164:/* */ - -: 165:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 166:void LC_SampleSingleAP(uint16 APNumber) -function LC_SampleSingleAP called 188 returned 100% blocks executed 100% - 188: 167:{ - 188: 168: uint8 CurrentAPState; - 188: 169: uint8 PreviousResult; - 188: 170: uint8 CurrentResult; - 188: 171: char EventText[CFE_EVS_MAX_MESSAGE_LENGTH]; - -: 172: - -: 173: /* - -: 174: ** We only do the sample if the actionpoint is active - -: 175: ** or passive. Other states are ignored since this - -: 176: ** routine is called in a loop to process ALL actionpoints. - -: 177: */ - 188: 178: CurrentAPState = LC_OperData.ARTPtr[APNumber].CurrentState; - -: 179: - 188: 180: if ((CurrentAPState == LC_APSTATE_ACTIVE) || - -: 181: (CurrentAPState == LC_APSTATE_PASSIVE)) - -: 182: { - -: 183: /* - -: 184: ** Evaluate the actionpoint and update the results - -: 185: ** as needed - -: 186: */ - 12: 187: LC_AppData.APSampleCount++; - -: 188: - 12: 189: PreviousResult = LC_OperData.ARTPtr[APNumber].ActionResult; - -: 190: - 12: 191: CurrentResult = LC_EvaluateRPN(APNumber); - -: 192: - 12: 193: LC_OperData.ARTPtr[APNumber].ActionResult = CurrentResult; - -: 194: - -: 195: /***************************************** - -: 196: ** If actionpoint fails current evaluation - -: 197: ******************************************/ - 12: 198: if (CurrentResult == LC_ACTION_FAIL) - -: 199: { - 3: 200: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount++; - 3: 201: LC_OperData.ARTPtr[APNumber].CumulativeFailCount++; - -: 202: - 3: 203: if (PreviousResult == LC_ACTION_PASS) - -: 204: { - -: 205: /* - -: 206: ** We failed this time, but we passed last time - -: 207: */ - 3: 208: LC_OperData.ARTPtr[APNumber].PassToFailCount++; - -: 209: - 3: 210: CFE_EVS_SendEvent(LC_AP_PASSTOFAIL_DBG_EID, CFE_EVS_DEBUG, - -: 211: "AP state change from PASS to FAIL: AP = %d", - -: 212: APNumber); - -: 213: } - -: 214: - 3: 215: if (LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount >= - -: 216: LC_OperData.ADTPtr[APNumber].MaxFailsBeforeRTS) - -: 217: { - -: 218: /* - -: 219: ** We have failed enough times to request the RTS - -: 220: */ - 3: 221: if (CurrentAPState == LC_APSTATE_ACTIVE) - -: 222: { - -: 223: /* - -: 224: ** Actions go to passive after they've failed - -: 225: */ - 2: 226: LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_PASSIVE; - -: 227: - 2: 228: if (LC_AppData.CurrentLCState == LC_STATE_ACTIVE) - -: 229: { - -: 230: /* - -: 231: ** If the LC application state is active, request the - -: 232: ** specified RTS be executed - -: 233: */ - 1: 234: LC_ExecuteRTS(LC_OperData.ADTPtr[APNumber].RTSId); - -: 235: - 1: 236: LC_OperData.ARTPtr[APNumber].CumulativeRTSExecCount++; - -: 237: - 1: 238: LC_AppData.RTSExecCount++; - -: 239: - -: 240: /* - -: 241: ** Copy event text specific to this action - -: 242: ** making sure to NUL terminate in case the event - -: 243: ** text is too long since strncpy won't - -: 244: */ - 1: 245: strncpy(EventText, - -: 246: LC_OperData.ADTPtr[APNumber].EventText, - -: 247: LC_MAX_ACTION_TEXT); - 1: 248: EventText[LC_MAX_ACTION_TEXT - 1] = '\0'; - -: 249: - -: 250: /* - -: 251: ** Add our trailer with AP specific info making - -: 252: ** sure we won't exceed our character buffer. - -: 253: ** strncat will always NUL terminate so we have - -: 254: ** to subtract 1 from the max to leave room for it. - -: 255: */ - 1: 256: strncat(EventText, - -: 257: LC_AP_EVENT_TAIL_STR, - -: 258: (CFE_EVS_MAX_MESSAGE_LENGTH - LC_MAX_ACTION_TEXT) - 1); - -: 259: - 1: 260: CFE_EVS_SendEvent( - -: 261: LC_OperData.ADTPtr[APNumber].EventID, - -: 262: LC_OperData.ADTPtr[APNumber].EventType, - -: 263: EventText, APNumber, - -: 264: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, - -: 265: LC_OperData.ADTPtr[APNumber].RTSId); - -: 266: } - -: 267: else - -: 268: { - -: 269: /* - -: 270: ** The LC application state is passive so we don't - -: 271: ** do the RTS request. We bump the passive RTS execution - -: 272: ** counter and send out a generic event message - -: 273: */ - 1: 274: LC_AppData.PassiveRTSExecCount++; - -: 275: - 1: 276: CFE_EVS_SendEvent(LC_PASSIVE_FAIL_DBG_EID, CFE_EVS_DEBUG, - -: 277: "AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d", - -: 278: APNumber, - -: 279: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, - -: 280: LC_OperData.ADTPtr[APNumber].RTSId); - -: 281: } - -: 282: - -: 283: } - -: 284: else - -: 285: { - -: 286: /* - -: 287: ** The actionpoint failed while the actionpoint state is passive - -: 288: */ - 1: 289: LC_AppData.PassiveRTSExecCount++; - -: 290: - 1: 291: CFE_EVS_SendEvent(LC_AP_PASSIVE_FAIL_DBG_EID, CFE_EVS_DEBUG, - -: 292: "AP failed while passive: AP = %d, FailCount = %d, RTS = %d", - -: 293: APNumber, - -: 294: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, - -: 295: LC_OperData.ADTPtr[APNumber].RTSId); - -: 296: } - -: 297: - -: 298: } /* end (ConsecutiveFailCount >= MaxFailsBeforeRTS) if */ - -: 299: - -: 300: } /* end (CurrentResult == LC_ACTION_FAIL) if */ - -: 301: - -: 302: /****************************************** - -: 303: ** If actionpoint passes current evaluation - -: 304: *******************************************/ - 9: 305: else if (CurrentResult == LC_ACTION_PASS) - -: 306: { - 1: 307: if (PreviousResult == LC_ACTION_FAIL) - -: 308: { - -: 309: /* - -: 310: ** We passed this time, but we failed last time - -: 311: */ - 1: 312: LC_OperData.ARTPtr[APNumber].FailToPassCount++; - -: 313: - 1: 314: CFE_EVS_SendEvent(LC_AP_FAILTOPASS_INF_EID, CFE_EVS_INFORMATION, - -: 315: "AP state change from FAIL to PASS: AP = %d", - -: 316: APNumber); - -: 317: } - -: 318: /* - -: 319: ** Clear consecutive failure counter for this AP - -: 320: */ - 1: 321: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount = 0; - -: 322: } - -: 323: - -: 324: /******************************** - -: 325: ** If actionpoint is not measured - -: 326: *********************************/ - 8: 327: else if (CurrentResult == LC_ACTION_NOT_MEASURED) - -: 328: { - -: 329: /* - -: 330: ** An actionpoint will evaluate to "not measured" if any of - -: 331: ** the watchpoints it depends on are "not measured", in - -: 332: ** this case make sure the consecutive fail count is zeroed - -: 333: */ - 1: 334: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount = 0; - -: 335: } - -: 336: else - -: 337: { - -: 338: /* - -: 339: ** We got back a LC_ACTION_ERROR result, send event - -: 340: */ - 7: 341: CFE_EVS_SendEvent(LC_ACTION_ERROR_ERR_EID, CFE_EVS_ERROR, - -: 342: "AP evaluated to error: AP = %d, Result = %d", - -: 343: APNumber, CurrentResult); - -: 344: } - -: 345: - -: 346: } /* end CurrentAPState if */ - -: 347: - 188: 348: return; - -: 349: - -: 350:} /* end LC_SampleSingleAP */ - -: 351: - -: 352:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 353:/* */ - -: 354:/* Evaluate the Reverse Polish Notation (RPN) equation for an */ - -: 355:/* actionpoint */ - -: 356:/* */ - -: 357:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 358:#define POP_RPN_DATA ((StackPtr <= 0) \ - -: 359: ? (IllegalRPN = TRUE) \ - -: 360: : (RPNStack [--StackPtr])) - -: 361: - -: 362:#define PUSH_RPN_DATA(x) ((StackPtr >= LC_MAX_RPN_EQU_SIZE) \ - -: 363: ? (IllegalRPN = TRUE) \ - -: 364: : (RPNStack [StackPtr++] = x)) - -: 365:uint8 LC_EvaluateRPN(uint16 APNumber) -function LC_EvaluateRPN called 12 returned 100% blocks executed 81% - 12: 366:{ - 12: 367: boolean Done; - 12: 368: boolean IllegalRPN; - 12: 369: boolean IllegalOperand; - 12: 370: uint16 Operand; - 12: 371: uint8 EvalResult = LC_ACTION_ERROR; - 12: 372: int32 RPNEquationPtr; - 12: 373: int32 StackPtr; - 12: 374: uint16 RPNData; - 12: 375: uint16 RPNStack [LC_MAX_RPN_EQU_SIZE]; - 12: 376: uint16 Operand1; - 12: 377: uint16 Operand2; - -: 378: - 12: 379: StackPtr = 0; - 12: 380: RPNEquationPtr = 0; - 12: 381: IllegalRPN = FALSE; - 12: 382: IllegalOperand = FALSE; - 12: 383: Done = FALSE; - -: 384: - -: 385: /* - -: 386: ** Keep going till we're done or till we get an error - -: 387: */ - 52: 388: while ((Done == FALSE) && - -: 389: (IllegalRPN == FALSE) && - -: 390: (IllegalOperand == FALSE)) - -: 391: { - -: 392: /* - -: 393: ** Pick off each piece of the RPN equation and handle - -: 394: ** one at a time - -: 395: */ - 40: 396: RPNData = LC_OperData.ADTPtr[APNumber].RPNEquation[RPNEquationPtr++]; - -: 397: - 40: 398: switch (RPNData) - -: 399: { - -: 400: case LC_RPN_AND: - 1: 401: Operand2 = POP_RPN_DATA; - 1: 402: Operand1 = POP_RPN_DATA; - 1: 403: PUSH_RPN_DATA (Operand1 & Operand2); - 1: 404: break; - -: 405: - -: 406: case LC_RPN_OR: - 1: 407: Operand2 = POP_RPN_DATA; - 1: 408: Operand1 = POP_RPN_DATA; - 1: 409: PUSH_RPN_DATA (Operand1 | Operand2); - 1: 410: break; - -: 411: - -: 412: case LC_RPN_XOR: - 1: 413: Operand2 = POP_RPN_DATA; - 1: 414: Operand1 = POP_RPN_DATA; - 1: 415: PUSH_RPN_DATA (Operand1 ^ Operand2); - 1: 416: break; - -: 417: - -: 418: case LC_RPN_NOT: - 1: 419: Operand1 = POP_RPN_DATA; - 1: 420: EvalResult = (Operand1 == LC_WATCH_FALSE) ? LC_WATCH_TRUE - -: 421: : LC_WATCH_FALSE; - 1: 422: PUSH_RPN_DATA (EvalResult); - 1: 423: break; - -: 424: - -: 425: case LC_RPN_EQUAL: - 5: 426: EvalResult = POP_RPN_DATA; - 5: 427: if (StackPtr == 0) - -: 428: { - 4: 429: Done = TRUE; - -: 430: } - -: 431: else - -: 432: { - 1: 433: IllegalRPN = TRUE; - -: 434: } - 1: 435: break; - -: 436: - -: 437: default: - -: 438: /* - -: 439: ** This operand is the current value of a watch result - -: 440: */ - 31: 441: Operand = LC_OperData.WRTPtr[RPNData].WatchResult; - -: 442: - 31: 443: if ((Operand == LC_WATCH_FALSE) || (Operand == LC_WATCH_TRUE)) - -: 444: { - 29: 445: PUSH_RPN_DATA (Operand); - -: 446: } - -: 447: else - -: 448: { - 2: 449: IllegalOperand = TRUE; - -: 450: - 2: 451: if (Operand == LC_WATCH_NOT_MEASURED) - -: 452: { - 1: 453: EvalResult = LC_ACTION_NOT_MEASURED; - -: 454: } - 2: 455: if (Operand == LC_WATCH_ERROR) - -: 456: { - 1: 457: EvalResult = LC_ACTION_ERROR; - -: 458: } - -: 459: } - 40: 460: break; - -: 461: - -: 462: } /* end switch */ - -: 463: - -: 464: /* - -: 465: ** If still not done and have no errors - check for the end of the buffer - -: 466: */ - 40: 467: if ((Done == FALSE) && - -: 468: (IllegalRPN == FALSE) && - -: 469: (IllegalOperand == FALSE)) - -: 470: { - 29: 471: if (RPNEquationPtr >= LC_MAX_RPN_EQU_SIZE) - -: 472: { - 1: 473: IllegalRPN = TRUE; - -: 474: } - -: 475: } - -: 476: - -: 477: } /* end while */ - -: 478: - 12: 479: if (IllegalRPN == TRUE) - -: 480: { - 6: 481: CFE_EVS_SendEvent(LC_INVALID_RPN_ERR_EID, CFE_EVS_ERROR, - -: 482: "AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d", - -: 483: APNumber, (RPNEquationPtr - 1), StackPtr); - -: 484: - 6: 485: EvalResult = LC_ACTION_ERROR; - -: 486: } - 6: 487: else if (EvalResult == LC_WATCH_FALSE) - -: 488: { - 1: 489: EvalResult = LC_ACTION_PASS; - -: 490: } - 5: 491: else if (EvalResult == LC_WATCH_TRUE) - -: 492: { - 3: 493: EvalResult = LC_ACTION_FAIL; - -: 494: } - -: 495: - 12: 496: return (EvalResult); - -: 497: - -: 498:} /* end LC_EvaluateRPN */ - -: 499: - -: 500:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 501:/* */ - -: 502:/* Validate the actionpoint definition table (ADT) */ - -: 503:/* */ - -: 504:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 505:int32 LC_ValidateADT(void *TableData) -function LC_ValidateADT called 8 returned 100% blocks executed 100% - 8: 506:{ - 8: 507: LC_ADTEntry_t *TableArray = (LC_ADTEntry_t *) TableData; - -: 508: - 8: 509: int32 EntryResult = LC_ADTVAL_NO_ERR; - 8: 510: int32 TableResult = CFE_SUCCESS; - 8: 511: int32 TableIndex; - -: 512: - 8: 513: uint8 DefaultState; - 8: 514: uint16 RTSId; - 8: 515: uint16 MaxFailsBeforeRTS; - 8: 516: uint16 EventType; - -: 517: - 8: 518: uint16 *RPNPtr; - 8: 519: int32 RPNIndex; - 8: 520: int32 RPNStackDepth; - -: 521: - 8: 522: int32 GoodCount = 0; - 8: 523: int32 BadCount = 0; - 8: 524: int32 UnusedCount = 0; - -: 525: - -: 526: /* - -: 527: ** Verify each entry in the pending actionpoint definition table - -: 528: */ - 1416: 529: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) - -: 530: { - 1408: 531: DefaultState = TableArray[TableIndex].DefaultState; - 1408: 532: RTSId = TableArray[TableIndex].RTSId; - 1408: 533: MaxFailsBeforeRTS = TableArray[TableIndex].MaxFailsBeforeRTS; - 1408: 534: RPNPtr = TableArray[TableIndex].RPNEquation; - 1408: 535: EventType = TableArray[TableIndex].EventType; - -: 536: - 1408: 537: if (DefaultState == LC_ACTION_NOT_USED) - -: 538: { - -: 539: /* - -: 540: ** Unused table entry - -: 541: */ - 1400: 542: UnusedCount++; - -: 543: } - 8: 544: else if ((DefaultState != LC_APSTATE_ACTIVE) && - -: 545: (DefaultState != LC_APSTATE_PASSIVE) && - -: 546: (DefaultState != LC_APSTATE_DISABLED) && - -: 547: (DefaultState != LC_APSTATE_PERMOFF)) - -: 548: { - -: 549: /* - -: 550: ** Invalid default state - -: 551: */ - 1: 552: BadCount++; - 1: 553: EntryResult = LC_ADTVAL_ERR_DEFSTATE; - -: 554: } - 7: 555: else if (RTSId > LC_MAX_VALID_ADT_RTSID) - -: 556: { - -: 557: /* - -: 558: ** Bad RTS ID (limit set by configuration parameter, - -: 559: ** see lc_platform_cfg.h) - -: 560: */ - 1: 561: BadCount++; - 1: 562: EntryResult = LC_ADTVAL_ERR_RTSID; - -: 563: } - 6: 564: else if (MaxFailsBeforeRTS == 0) - -: 565: { - -: 566: /* - -: 567: ** Bad fail count - -: 568: */ - 1: 569: BadCount++; - 1: 570: EntryResult = LC_ADTVAL_ERR_FAILCNT; - -: 571: } - 5: 572: else if ((EventType != CFE_EVS_DEBUG) && - -: 573: (EventType != CFE_EVS_INFORMATION) && - -: 574: (EventType != CFE_EVS_ERROR) && - -: 575: (EventType != CFE_EVS_CRITICAL)) - -: 576: { - -: 577: /* - -: 578: ** Invalid event type - -: 579: */ - 1: 580: BadCount++; - 1: 581: EntryResult = LC_ADTVAL_ERR_EVTTYPE; - -: 582: } - -: 583: else - -: 584: { - -: 585: /* - -: 586: ** Validate reverse polish equation syntax - -: 587: */ - 4: 588: EntryResult = LC_ValidateRPN(RPNPtr, &RPNIndex, &RPNStackDepth); - -: 589: - 4: 590: if (EntryResult != LC_ADTVAL_NO_ERR) - -: 591: { - 3: 592: BadCount++; - -: 593: } - -: 594: else - -: 595: { - 1: 596: GoodCount++; - -: 597: } - -: 598: } - -: 599: - -: 600: /* - -: 601: ** Generate detailed event for "first" error - -: 602: */ - 1408: 603: if ((EntryResult != LC_ADTVAL_NO_ERR) && (TableResult == CFE_SUCCESS)) - -: 604: { - 7: 605: if (EntryResult == LC_ADTVAL_ERR_RPN) - -: 606: { - 3: 607: CFE_EVS_SendEvent(LC_ADTVAL_RPNERR_EID, CFE_EVS_ERROR, - -: 608: "ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d", - -: 609: TableIndex, RPNIndex, RPNStackDepth); - -: 610: } - -: 611: else - -: 612: { - 4: 613: CFE_EVS_SendEvent(LC_ADTVAL_ERR_EID, CFE_EVS_ERROR, - -: 614: "ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d", - -: 615: TableIndex, EntryResult, DefaultState, RTSId, MaxFailsBeforeRTS, EventType ); - -: 616: } - -: 617: - 7: 618: TableResult = EntryResult; - -: 619: } - -: 620: - -: 621: } /* end TableIndex for */ - -: 622: - -: 623: /* - -: 624: ** Generate informational event with error totals - -: 625: */ - 8: 626: CFE_EVS_SendEvent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, - -: 627: "ADT verify results: good = %d, bad = %d, unused = %d", - -: 628: GoodCount, BadCount, UnusedCount); - -: 629: - 8: 630: return(TableResult); - -: 631: - -: 632:} /* end LC_ValidateADT */ - -: 633: - -: 634:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 635:/* */ - -: 636:/* Validate a reverse polish notation (RPN) equation */ - -: 637:/* */ - -: 638:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 639:int32 LC_ValidateRPN(uint16 *RPNPtr, - -: 640: int32 *IndexValue, - -: 641: int32 *StackDepthValue) -function LC_ValidateRPN called 4 returned 100% blocks executed 100% - 4: 642:{ - 4: 643: int32 Result = LC_ADTVAL_NO_ERR; - 4: 644: int32 BufferIndex; - 4: 645: int32 StackDepth; - 4: 646: uint16 BufferItem; - -: 647: - -: 648: /* - -: 649: ** Each equation consists only of watchpoint ID numbers - -: 650: ** and polish symbols (and, or, equal, etc). - -: 651: ** - -: 652: ** Each watchpoint ID increases the stack depth and - -: 653: ** each polish symbol (except "not" which has no - -: 654: ** effect) decreases the stack depth. - -: 655: ** - -: 656: ** The stack depth must never become negative and the - -: 657: ** depth must equal 1 when the "=" symbol is found. - -: 658: ** - -: 659: ** The last symbol in the equation is assumed to be - -: 660: ** the "=" symbol, and the test does not examine any - -: 661: ** further data. - -: 662: */ - 4: 663: StackDepth = 0; - -: 664: - 9: 665: for (BufferIndex = 0; BufferIndex < LC_MAX_RPN_EQU_SIZE; BufferIndex++) - -: 666: { - 9: 667: BufferItem = RPNPtr[BufferIndex]; - -: 668: - 9: 669: if ((BufferItem == LC_RPN_AND) || - -: 670: (BufferItem == LC_RPN_OR) || - -: 671: (BufferItem == LC_RPN_XOR)) - -: 672: { - -: 673: /* - -: 674: ** Depth test will fail if we haven't already counted 2 - -: 675: ** watchpoint ID values - -: 676: */ - 2: 677: StackDepth--; - -: 678: } - 7: 679: else if (BufferItem == LC_RPN_NOT) - -: 680: { - -: 681: /* - -: 682: ** Depth test will fail if this is 1st symbol - -: 683: */ - -: 684: } - 6: 685: else if (BufferItem == LC_RPN_EQUAL) - -: 686: { - -: 687: /* - -: 688: ** Equation ends when LC_RPN_EQUAL is found - -: 689: */ - 1: 690: break; - -: 691: } - 5: 692: else if (BufferItem < LC_MAX_WATCHPOINTS) - -: 693: { - -: 694: /* - -: 695: ** Valid watchpoint ID - -: 696: */ - 4: 697: StackDepth++; - -: 698: } - -: 699: else - -: 700: { - -: 701: /* - -: 702: ** Not a valid polish symbol or watchpoint ID - -: 703: */ - 7: 704: break; - -: 705: } - -: 706: - -: 707: /* - -: 708: ** Must have more watchpoint ID's than polish symbols - -: 709: */ - 7: 710: if (StackDepth <= 0) - -: 711: { - 2: 712: break; - -: 713: } - -: 714: } - -: 715: - -: 716: /* - -: 717: ** Check for valid Reverse Polish Notation equation - -: 718: */ - 4: 719: if ((BufferItem == LC_RPN_EQUAL) && (StackDepth == 1)) - -: 720: { - 1: 721: Result = LC_ADTVAL_NO_ERR; - -: 722: } - -: 723: else - -: 724: { - 3: 725: Result = LC_ADTVAL_ERR_RPN; - -: 726: - -: 727: /* - -: 728: ** Provide additional error information - -: 729: */ - 3: 730: *IndexValue = BufferIndex; - 3: 731: *StackDepthValue = StackDepth; - -: 732: } - -: 733: - 4: 734: return(Result); - -: 735: - -: 736:} /* end LC_ValidateRPN */ - -: 737: - -: 738:/************************/ - -: 739:/* End of File Comment */ - -: 740:/************************/ diff --git a/fsw/unit_test/output_CDS/lc_app.c.gcov b/fsw/unit_test/output_CDS/lc_app.c.gcov deleted file mode 100644 index 926a837..0000000 --- a/fsw/unit_test/output_CDS/lc_app.c.gcov +++ /dev/null @@ -1,1180 +0,0 @@ - -: 0:Source:../src/lc_app.c - -: 0:Graph:lc_app.gcno - -: 0:Data:lc_app.gcda - -: 0:Runs:1 - -: 0:Programs:1 - -: 1:/************************************************************************ - -: 2:** File: - -: 3:** $Id: lc_app.c.gcov 1.1 2012/07/31 16:53:45EDT nschweis Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** The CFS Limit Checker (LC) is a table driven application - -: 7:** that provides telemetry monitoring and autonomous response - -: 8:** capabilities to Core Flight Executive (cFE) based systems. - -: 9:** - -: 10:** $Log: lc_app.c.gcov $ - -: 10:** Revision 1.1 2012/07/31 16:53:45EDT nschweis - -: 10:** Initial revision - -: 10:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/output_CDS/project.pj - -: 10:** Revision 1.1 2009/01/15 15:26:08EST dahardis - -: 10:** Initial revision - -: 10:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/output_CDS/project.pj - -: 11:** Revision 1.4 2008/12/10 15:34:07EST dahardis - -: 12:** Altered CDS restoration processing according to - -: 13:** DCR 4680 - -: 14:** Revision 1.3 2008/12/10 09:38:33EST dahardis - -: 15:** Fixed calls to CFE_TBL_GetAddress (DCR #4699) - -: 16:** Revision 1.2 2008/12/03 13:59:44EST dahardis - -: 17:** Corrections from peer code review - -: 18:** Revision 1.1 2008/10/29 14:18:51EDT dahardison - -: 19:** Initial revision - -: 20:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 21:** - -: 22:*************************************************************************/ - -: 23: - -: 24:/************************************************************************ - -: 25:** Includes - -: 26:*************************************************************************/ - -: 27:#include "lc_app.h" - -: 28:#include "lc_events.h" - -: 29:#include "lc_msgids.h" - -: 30:#include "lc_perfids.h" - -: 31:#include "lc_version.h" - -: 32:#include "lc_cmds.h" - -: 33:#include "lc_action.h" - -: 34:#include "lc_watch.h" - -: 35:#include "lc_mission_cfg.h" /* Leave these two last to make sure all */ - -: 36:#include "lc_verify.h" /* LC configuration parameters are checked */ - -: 37: - -: 38:/************************************************************************ - -: 39:** Local Macro Definitions - -: 40:*************************************************************************/ - -: 41:/** - -: 42:** \name LC CDS Saved on Exit Identifiers */ - -: 43:/** \{ */ - -: 44:#define LC_CDS_SAVED 0xF0F0 - -: 45:#define LC_CDS_NOT_SAVED 0x0F0F - -: 46:/** \} */ - -: 47: - -: 48:/************************************************************************ - -: 49:** LC Global Data - -: 50:*************************************************************************/ - -: 51:LC_OperData_t LC_OperData; - -: 52:LC_AppData_t LC_AppData; - -: 53: - -: 54:/************************************************************************ - -: 55:** Local Function Prototypes - -: 56:*************************************************************************/ - -: 57:/************************************************************************/ - -: 58:/** \brief Initialize the CFS Limit Checker (LC) application - -: 59:** - -: 60:** \par Description - -: 61:** Limit Checker application initialization routine. This - -: 62:** function performs all the required startup steps to - -: 63:** initialize (or restore from CDS) LC data structures and get - -: 64:** the application registered with the cFE services so it can - -: 65:** begin to receive command messages. - -: 66:** - -: 67:** \par Assumptions, External Events, and Notes: - -: 68:** None - -: 69:** - -: 70:** \returns - -: 71:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 72:** \retstmt Return codes from #LC_EvsInit \endcode - -: 73:** \retstmt Return codes from #LC_SbInit \endcode - -: 74:** \retstmt Return codes from #LC_InitFromCDS \endcode - -: 75:** \retstmt Return codes from #LC_InitNoCDS \endcode - -: 76:** \endreturns - -: 77:** - -: 78:*************************************************************************/ - -: 79:int32 LC_AppInit(void); - -: 80: - -: 81:/************************************************************************/ - -: 82:/** \brief Initialize Event Services - -: 83:** - -: 84:** \par Description - -: 85:** This function performs the steps required to setup - -: 86:** cFE Events Services for use by the LC application - -: 87:** - -: 88:** \par Assumptions, External Events, and Notes: - -: 89:** None - -: 90:** - -: 91:** \returns - -: 92:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 93:** \retstmt Return codes from #CFE_EVS_Register \endcode - -: 94:** \endreturns - -: 95:** - -: 96:*************************************************************************/ - -: 97:int32 LC_EvsInit(void); - -: 98: - -: 99:/************************************************************************/ - -: 100:/** \brief Initialize Software Bus - -: 101:** - -: 102:** \par Description - -: 103:** This function performs the steps required to setup the - -: 104:** cFE software bus for use by the LC application - -: 105:** - -: 106:** \par Assumptions, External Events, and Notes: - -: 107:** None - -: 108:** - -: 109:** \returns - -: 110:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 111:** \retstmt Return codes from #CFE_SB_CreatePipe \endcode - -: 112:** \retstmt Return codes from #CFE_SB_Subscribe \endcode - -: 113:** \endreturns - -: 114:** - -: 115:*************************************************************************/ - -: 116:int32 LC_SbInit(void); - -: 117: - -: 118:/************************************************************************/ - -: 119:/** \brief Initialize LC from CDS - -: 120:** - -: 121:** \par Description - -: 122:** This function attempts to restore the LC application data, - -: 123:** definition tables, and results tables from the critical data - -: 124:** store - -: 125:** - -: 126:** \par Assumptions, External Events, and Notes: - -: 127:** This function is only compiled in and called when the - -: 128:** configuration parameter #LC_SAVE_TO_CDS has been defined - -: 129:** - -: 130:** \returns - -: 131:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 132:** \retstmt Return codes from #CFE_TBL_Register \endcode - -: 133:** \retstmt Return codes from #CFE_ES_RegisterCDS \endcode - -: 134:** \retstmt Return codes from #CFE_TBL_GetAddress \endcode - -: 135:** \retstmt Return codes from #CFE_ES_RestoreFromCDS \endcode - -: 136:** \retstmt Return codes from #LC_AcquirePointers \endcode - -: 137:** \endreturns - -: 138:** - -: 139:*************************************************************************/ - -: 140:int32 LC_InitFromCDS(void); - -: 141: - -: 142:/************************************************************************/ - -: 143:/** \brief Initialize LC without using CDS - -: 144:** - -: 145:** \par Description - -: 146:** This function initializes the LC application data, - -: 147:** definition tables, and results tables from default values - -: 148:** - -: 149:** \par Assumptions, External Events, and Notes: - -: 150:** This function is only compiled in and called when the - -: 151:** configuration parameter #LC_SAVE_TO_CDS has NOT been - -: 152:** defined - -: 153:** - -: 154:** \returns - -: 155:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 156:** \retstmt Return codes from #CFE_TBL_Register \endcode - -: 157:** \retstmt Return codes from #LC_LoadDefaults \endcode - -: 158:** \retstmt Return codes from #LC_AcquirePointers \endcode - -: 159:** \endreturns - -: 160:** - -: 161:*************************************************************************/ - -: 162:int32 LC_InitNoCDS(void); - -: 163: - -: 164:/************************************************************************/ - -: 165:/** \brief Load defaults - -: 166:** - -: 167:** \par Description - -: 168:** This is a initialization support function that loads defaults - -: 169:** for definition tables and application data - -: 170:** - -: 171:** \par Assumptions, External Events, and Notes: - -: 172:** Assumes that the tables have already been successfully - -: 173:** registered - -: 174:** - -: 175:** \returns - -: 176:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 177:** \retstmt Return codes from #CFE_TBL_Load \endcode - -: 178:** \endreturns - -: 179:** - -: 180:*************************************************************************/ - -: 181:int32 LC_LoadDefaults(void); - -: 182: - -: 183:/************************************************************************/ - -: 184:/** \brief Exit LC Application - -: 185:** - -: 186:** \par Description - -: 187:** This function gets called when we exit the cFE executive - -: 188:** services run loop and will save data to the CDS for the - -: 189:** next restart - -: 190:** - -: 191:** \par Assumptions, External Events, and Notes: - -: 192:** This function is only compiled in and called when the - -: 193:** configuration parameter #LC_SAVE_TO_CDS has been defined - -: 194:** - -: 195:*************************************************************************/ - -: 196:void LC_ExitApp(void); - -: 197: - -: 198:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 199:/* */ - -: 200:/* LC application entry point and main process loop */ - -: 201:/* */ - -: 202:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 203:void LC_AppMain(void) -function LC_AppMain called 18 returned 100% blocks executed 100% - 18: 204:{ - 18: 205: int32 Status = CFE_SUCCESS; - 18: 206: uint32 RunStatus = CFE_ES_APP_RUN; - 18: 207: boolean initSuccess = TRUE; - -: 208: - -: 209: /* - -: 210: ** Performance Log, Start - -: 211: */ - 18: 212: CFE_ES_PerfLogEntry(LC_APPMAIN_PERF_ID); - -: 213: - -: 214: /* - -: 215: ** Register this application with Executive Services - -: 216: */ - 18: 217: Status = CFE_ES_RegisterApp(); - -: 218: - -: 219: /* - -: 220: ** Perform application specific initialization - -: 221: */ - 18: 222: if (Status == CFE_SUCCESS) - -: 223: { - 18: 224: Status = LC_AppInit(); - -: 225: } - -: 226: - -: 227: /* - -: 228: ** Check for start-up error... - -: 229: */ - 18: 230: if (Status != CFE_SUCCESS) - -: 231: { - -: 232: /* - -: 233: ** Set run status to terminate main loop - -: 234: */ - 17: 235: RunStatus = CFE_ES_APP_ERROR; - -: 236: - -: 237: /* - -: 238: ** Set flag that init failed so we don't - -: 239: ** attempt application cleanup before exit - -: 240: */ - 17: 241: initSuccess = FALSE; - -: 242: } - -: 243: - -: 244: /* - -: 245: ** Application main loop - -: 246: */ - 68: 247: while(CFE_ES_RunLoop(&RunStatus) == TRUE) - -: 248: { - -: 249: /* - -: 250: ** Performance Log, Stop - -: 251: */ - 50: 252: CFE_ES_PerfLogExit(LC_APPMAIN_PERF_ID); - -: 253: - -: 254: /* - -: 255: ** Pend on the arrival of the next Software Bus message - -: 256: */ - 50: 257: Status = CFE_SB_RcvMsg(&LC_OperData.MsgPtr, LC_OperData.CmdPipe, CFE_SB_PEND_FOREVER); - -: 258: - -: 259: /* - -: 260: ** Performance Log, Start - -: 261: */ - 50: 262: CFE_ES_PerfLogEntry(LC_APPMAIN_PERF_ID); - -: 263: - -: 264: /* - -: 265: ** Process the software bus message - -: 266: */ - 50: 267: if (Status == CFE_SUCCESS) - -: 268: { - 49: 269: Status = LC_AppPipe(LC_OperData.MsgPtr); - -: 270: } - -: 271: - -: 272: /* - -: 273: ** Note: If there were some reason to exit the task - -: 274: ** normally (without error) then we would set - -: 275: ** RunStatus = CFE_ES_APP_EXIT - -: 276: */ - 50: 277: if (Status != CFE_SUCCESS) - -: 278: { - -: 279: /* - -: 280: ** Set request to terminate main loop - -: 281: */ - 1: 282: RunStatus = CFE_ES_APP_ERROR; - -: 283: } - -: 284: - -: 285: } /* end CFS_ES_RunLoop while */ - -: 286: - -: 287: /* - -: 288: ** Check for "fatal" process error... - -: 289: */ - 18: 290: if (Status != CFE_SUCCESS) - -: 291: { - -: 292: /* - -: 293: ** Send an event describing the reason for the termination - -: 294: */ - 18: 295: CFE_EVS_SendEvent(LC_TASK_EXIT_EID, CFE_EVS_CRITICAL, - -: 296: "Task terminating, err = 0x%08X", Status); - -: 297: - -: 298: /* - -: 299: ** In case cFE Event Services is not working - -: 300: */ - 18: 301: CFE_ES_WriteToSysLog("LC task terminating, err = 0x%08X\n", Status); - -: 302: } - -: 303: - -: 304: /* - -: 305: ** Performance Log, Stop - -: 306: */ - 18: 307: CFE_ES_PerfLogExit(LC_APPMAIN_PERF_ID); - -: 308: - -: 309: /* - -: 310: ** Do LC exit processing only if we are configured to use - -: 311: ** the critical data store and we initialized successfully - -: 312: ** See lc_platform_cfg.h to set this compiler switch. - -: 313: */ - -: 314:#ifdef LC_SAVE_TO_CDS - 18: 315: if (initSuccess == TRUE) - -: 316: { - 1: 317: LC_ExitApp(); - -: 318: } - -: 319:#endif - -: 320: - -: 321: /* - -: 322: ** Exit the application - -: 323: */ - 18: 324: CFE_ES_ExitApp(RunStatus); - -: 325: - -: 326:} /* end LC_AppMain */ - -: 327: - -: 328:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 329:/* */ - -: 330:/* LC initialization */ - -: 331:/* */ - -: 332:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 333:int32 LC_AppInit(void) -function LC_AppInit called 18 returned 100% blocks executed 100% - 18: 334:{ - 18: 335: int32 Status = CFE_SUCCESS; - -: 336: - -: 337: /* - -: 338: ** Zero out the operational data structure... - -: 339: */ - 18: 340: OS_MemSet(&LC_OperData, 0, sizeof(LC_OperData_t)); - -: 341: - -: 342: /* - -: 343: ** Initialize event services - -: 344: */ - 18: 345: Status = LC_EvsInit(); - 18: 346: if (Status != CFE_SUCCESS) - -: 347: { - 1: 348: return(Status); - -: 349: } - -: 350: - -: 351: /* - -: 352: ** Initialize software bus - -: 353: */ - 17: 354: Status = LC_SbInit(); - 17: 355: if (Status != CFE_SUCCESS) - -: 356: { - 4: 357: return(Status); - -: 358: } - -: 359: - -: 360: /* - -: 361: ** Check if we are configured to restore from CDS or not - -: 362: ** See lc_platform_cfg.h to set this compiler switch. - -: 363: */ - -: 364:#ifdef LC_SAVE_TO_CDS - 13: 365: Status = LC_InitFromCDS(); - -: 366:#else - -: 367: Status = LC_InitNoCDS(); - -: 368:#endif - -: 369: - -: 370: /* - -: 371: ** Return on error - -: 372: */ - 13: 373: if (Status != CFE_SUCCESS) - -: 374: { - 12: 375: return(Status); - -: 376: } - -: 377: - -: 378: /* - -: 379: ** If we get here, all is good - -: 380: ** Issue the application startup event message - -: 381: */ - 1: 382: CFE_EVS_SendEvent(LC_INIT_INF_EID, CFE_EVS_INFORMATION, - -: 383: "LC Initialized. Version %d.%d.%d.%d", - -: 384: LC_MAJOR_VERSION, - -: 385: LC_MINOR_VERSION, - -: 386: LC_REVISION, - -: 387: LC_MISSION_REV); - -: 388: - 1: 389: return(CFE_SUCCESS); - -: 390: - -: 391:} /* end LC_AppInit */ - -: 392: - -: 393:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 394:/* */ - -: 395:/* Initialize event services interface */ - -: 396:/* */ - -: 397:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 398:int32 LC_EvsInit(void) -function LC_EvsInit called 18 returned 100% blocks executed 100% - 18: 399:{ - 18: 400: int32 Status = CFE_SUCCESS; - -: 401: - -: 402: /* - -: 403: ** If an application event filter table is added - -: 404: ** in the future, initialize it here - -: 405: */ - -: 406: - -: 407: /* - -: 408: ** Register for event services - -: 409: */ - 18: 410: Status = CFE_EVS_Register(NULL, 0, CFE_EVS_BINARY_FILTER); - -: 411: - 18: 412: if (Status != CFE_SUCCESS) - -: 413: { - 1: 414: CFE_ES_WriteToSysLog("LC App: Error Registering For Event Services, RC = 0x%08X\n", Status); - 1: 415: return (Status); - -: 416: } - -: 417: - 17: 418: return(Status); - -: 419: - -: 420:} /* end LC_EvsInit */ - -: 421: - -: 422:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 423:/* */ - -: 424:/* Initialize the software bus interface */ - -: 425:/* */ - -: 426:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 427:int32 LC_SbInit(void) -function LC_SbInit called 17 returned 100% blocks executed 100% - 17: 428:{ - 17: 429: int32 Status = CFE_SUCCESS; - -: 430: - -: 431: /* - -: 432: ** Initialize SB variables - -: 433: */ - 17: 434: LC_OperData.MsgPtr = (CFE_SB_MsgPtr_t) NULL; - 17: 435: LC_OperData.CmdPipe = 0; - -: 436: - -: 437: /* - -: 438: ** Initialize housekeeping packet... - -: 439: */ - 17: 440: CFE_SB_InitMsg(&LC_OperData.HkPacket, LC_HK_TLM_MID, - -: 441: sizeof(LC_HkPacket_t), FALSE); - -: 442: - -: 443: /* - -: 444: ** Create Software Bus message pipe... - -: 445: */ - 17: 446: Status = CFE_SB_CreatePipe(&LC_OperData.CmdPipe, LC_PIPE_DEPTH, LC_PIPE_NAME); - 17: 447: if (Status != CFE_SUCCESS) - -: 448: { - 1: 449: CFE_EVS_SendEvent(LC_CR_PIPE_ERR_EID, CFE_EVS_ERROR, - -: 450: "Error Creating LC Pipe, RC=0x%08X", Status); - 1: 451: return(Status); - -: 452: } - -: 453: - -: 454: /* - -: 455: ** Subscribe to Housekeeping request messages... - -: 456: */ - 16: 457: Status = CFE_SB_Subscribe(LC_SEND_HK_MID, LC_OperData.CmdPipe); - 16: 458: if (Status != CFE_SUCCESS) - -: 459: { - 1: 460: CFE_EVS_SendEvent(LC_SUB_HK_REQ_ERR_EID, CFE_EVS_ERROR, - -: 461: "Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X", - -: 462: LC_SEND_HK_MID, Status); - 1: 463: return(Status); - -: 464: } - -: 465: - -: 466: /* - -: 467: ** Subscribe to LC ground command messages... - -: 468: */ - 15: 469: Status = CFE_SB_Subscribe(LC_CMD_MID, LC_OperData.CmdPipe); - 15: 470: if (Status != CFE_SUCCESS) - -: 471: { - 1: 472: CFE_EVS_SendEvent(LC_SUB_GND_CMD_ERR_EID, CFE_EVS_ERROR, - -: 473: "Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X", - -: 474: LC_CMD_MID, Status); - 1: 475: return(Status); - -: 476: } - -: 477: - -: 478: /* - -: 479: ** Subscribe to LC internal actionpoint sample messages... - -: 480: */ - 14: 481: Status = CFE_SB_Subscribe(LC_SAMPLE_AP_MID, LC_OperData.CmdPipe); - 14: 482: if (Status != CFE_SUCCESS) - -: 483: { - 1: 484: CFE_EVS_SendEvent(LC_SUB_SAMPLE_CMD_ERR_EID, CFE_EVS_ERROR, - -: 485: "Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X", - -: 486: LC_SAMPLE_AP_MID, Status); - -: 487: } - -: 488: - 14: 489: return(Status); - -: 490: - -: 491:} /* end LC_SbInit */ - -: 492: - -: 493:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 494:/* */ - -: 495:/* Initialize LC data structures from the Critical Data Store */ - -: 496:/* The code in this function is only compiled in when we are */ - -: 497:/* configured to use the critical data store. */ - -: 498:/* See lc_platform_cfg.h to set this compiler switch. */ - -: 499:/* */ - -: 500:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 501:#ifdef LC_SAVE_TO_CDS - -: 502: - -: 503:int32 LC_InitFromCDS(void) -function LC_InitFromCDS called 13 returned 100% blocks executed 91% - 13: 504:{ - 13: 505: uint32 TableSize; - 13: 506: uint32 CDSSize; - 13: 507: int32 Status = CFE_SUCCESS; - 13: 508: boolean DefTblsRestored = TRUE; - 13: 509: boolean StatsRestored = TRUE; - 13: 510: boolean ResetResultTables = TRUE; - -: 511: - -: 512: /* - -: 513: ** Register the watchpoint definition table (WDT) - -: 514: */ - 13: 515: TableSize = LC_MAX_WATCHPOINTS * sizeof (LC_WDTEntry_t); - 13: 516: Status = CFE_TBL_Register(&LC_OperData.WDTHandle, - -: 517: LC_WDT_TABLENAME, - -: 518: TableSize, - -: 519: (CFE_TBL_OPT_DEFAULT | CFE_TBL_OPT_CRITICAL), - -: 520: LC_ValidateWDT); - -: 521: /* - -: 522: ** Check if we restored existing data from the CDS - -: 523: */ - 13: 524: if (Status == CFE_TBL_INFO_RECOVERED_TBL) - -: 525: { - 3: 526: CFE_EVS_SendEvent(LC_WDT_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 527: "WDT recovered from CDS"); - -: 528: } - 10: 529: else if (Status == CFE_SUCCESS) - -: 530: { - 9: 531: CFE_EVS_SendEvent(LC_WDT_NO_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 532: "WDT NOT recovered from CDS"); - -: 533: /* - -: 534: ** Set this flag which triggers a default init sequence - -: 535: */ - 9: 536: DefTblsRestored = FALSE; - -: 537: } - -: 538: else - -: 539: { - -: 540: /* - -: 541: ** Can't register table, return with error code - -: 542: */ - 1: 543: CFE_EVS_SendEvent(LC_WDT_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 544: "Error registering WDT, RC=0x%08X", Status); - 1: 545: return (Status); - -: 546: } - -: 547: - -: 548: /* - -: 549: ** Register the actionpoint definition table (ADT) - -: 550: */ - 12: 551: TableSize = LC_MAX_ACTIONPOINTS * sizeof (LC_ADTEntry_t); - 12: 552: Status = CFE_TBL_Register(&LC_OperData.ADTHandle, - -: 553: LC_ADT_TABLENAME, - -: 554: TableSize, - -: 555: (CFE_TBL_OPT_DEFAULT | CFE_TBL_OPT_CRITICAL), - -: 556: LC_ValidateADT); - -: 557: /* - -: 558: ** Check if we restored existing data from the CDS - -: 559: */ - 12: 560: if (Status == CFE_TBL_INFO_RECOVERED_TBL) - -: 561: { - 3: 562: CFE_EVS_SendEvent(LC_ADT_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 563: "ADT recovered from CDS"); - -: 564: } - 9: 565: else if (Status == CFE_SUCCESS) - -: 566: { - 8: 567: CFE_EVS_SendEvent(LC_ADT_NO_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 568: "ADT NOT recovered from CDS"); - -: 569: /* - -: 570: ** Set this flag which triggers a default init sequence - -: 571: */ - 8: 572: DefTblsRestored = FALSE; - -: 573: } - -: 574: else - -: 575: { - -: 576: /* - -: 577: ** Can't register table, return with error code - -: 578: */ - 1: 579: CFE_EVS_SendEvent(LC_ADT_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 580: "Error registering ADT, RC=0x%08X", Status); - 1: 581: return (Status); - -: 582: } - -: 583: - -: 584: /* - -: 585: ** Register the watchpoint results table (WRT) - -: 586: ** Note that the WRT is dump only, so it can't be critical - -: 587: ** in the current version of the cFE (v5.2). - -: 588: ** We manage a CDS area for this data ourselves - -: 589: ** and update it on application exit. - -: 590: */ - 11: 591: TableSize = LC_MAX_WATCHPOINTS * sizeof (LC_WRTEntry_t); - 11: 592: Status = CFE_TBL_Register(&LC_OperData.WRTHandle, - -: 593: LC_WRT_TABLENAME, - -: 594: TableSize, - -: 595: (CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_DUMP_ONLY), - -: 596: NULL); - 11: 597: if (Status != CFE_SUCCESS) - -: 598: { - -: 599: /* - -: 600: ** Can't register table, return with error code - -: 601: */ - 1: 602: CFE_EVS_SendEvent(LC_WRT_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 603: "Error registering WRT, RC=0x%08X", Status); - 1: 604: return (Status); - -: 605: } - -: 606: - -: 607: /* - -: 608: ** Register the actionpoint results table (ART) - -: 609: ** Note that the ART is dump only, so it can't be critical - -: 610: ** in the current version of the cFE (v5.2). - -: 611: ** We manage a CDS area for this data ourselves - -: 612: ** and update it on application exit. - -: 613: */ - 10: 614: TableSize = LC_MAX_ACTIONPOINTS * sizeof (LC_ARTEntry_t); - 10: 615: Status = CFE_TBL_Register(&LC_OperData.ARTHandle, - -: 616: LC_ART_TABLENAME, - -: 617: TableSize, - -: 618: (CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_DUMP_ONLY), - -: 619: NULL); - 10: 620: if (Status != CFE_SUCCESS) - -: 621: { - -: 622: /* - -: 623: ** Can't register table, return with error code - -: 624: */ - 1: 625: CFE_EVS_SendEvent(LC_ART_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 626: "Error registering ART, RC=0x%08X", Status); - 1: 627: return (Status); - -: 628: } - -: 629: - -: 630: /* - -: 631: ** Register the watchpoint results table (WRT) CDS area - -: 632: */ - 9: 633: CDSSize = LC_MAX_WATCHPOINTS * sizeof (LC_WRTEntry_t); - 9: 634: Status = CFE_ES_RegisterCDS(&LC_OperData.WRTDataCDSHandle, - -: 635: CDSSize, - -: 636: LC_WRT_CDSNAME); - 9: 637: if (Status < CFE_SUCCESS) - -: 638: { - -: 639: /* - -: 640: ** Can't register CDS buffer, return with error code - -: 641: */ - 1: 642: CFE_EVS_SendEvent(LC_WRT_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 643: "Error registering WRT CDS Area, RC=0x%08X", Status); - 1: 644: return (Status); - -: 645: } - -: 646: - -: 647: /* - -: 648: ** Register the actionpoint results table (ART) CDS area - -: 649: */ - 8: 650: CDSSize = LC_MAX_ACTIONPOINTS * sizeof (LC_ARTEntry_t); - 8: 651: Status = CFE_ES_RegisterCDS(&LC_OperData.ARTDataCDSHandle, - -: 652: CDSSize, - -: 653: LC_ART_CDSNAME); - 8: 654: if (Status < CFE_SUCCESS) - -: 655: { - -: 656: /* - -: 657: ** Can't register CDS buffer, return with error code - -: 658: */ - #####: 659: CFE_EVS_SendEvent(LC_ART_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 660: "Error registering ART CDS Area, RC=0x%08X", Status); - #####: 661: return (Status); - -: 662: } - -: 663: - -: 664: /* - -: 665: ** Register the LC application data CDS area - -: 666: */ - 8: 667: Status = CFE_ES_RegisterCDS(&LC_OperData.AppDataCDSHandle, - -: 668: sizeof (LC_AppData_t), - -: 669: LC_APPDATA_CDSNAME); - 8: 670: if (Status < CFE_SUCCESS) - -: 671: { - -: 672: /* - -: 673: ** Can't register CDS buffer, return with error code - -: 674: */ - #####: 675: CFE_EVS_SendEvent(LC_APPDATA_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 676: "Error registering application data CDS Area, RC=0x%08X", - -: 677: Status); - #####: 678: return (Status); - -: 679: } - -: 680: - -: 681: /* - -: 682: ** Get pointers to the result tables... - -: 683: */ - 8: 684: Status = CFE_TBL_GetAddress((void *)&LC_OperData.WRTPtr, - -: 685: LC_OperData.WRTHandle); - -: 686: - 8: 687: if (Status != CFE_SUCCESS) - -: 688: { - -: 689: /* - -: 690: ** Can't get WRT address, return with error code - -: 691: */ - 1: 692: CFE_EVS_SendEvent(LC_WRT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 693: "Error getting WRT address, RC=0x%08X", - -: 694: Status); - 1: 695: return (Status); - -: 696: } - -: 697: - 7: 698: Status = CFE_TBL_GetAddress((void *)&LC_OperData.ARTPtr, - -: 699: LC_OperData.ARTHandle); - -: 700: - 7: 701: if (Status != CFE_SUCCESS) - -: 702: { - -: 703: /* - -: 704: ** Can't get ART address, return with error code - -: 705: */ - 1: 706: CFE_EVS_SendEvent(LC_ART_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 707: "Error getting ART address, RC=0x%08X", - -: 708: Status); - 1: 709: return (Status); - -: 710: } - -: 711: - -: 712: /* - -: 713: ** If we were able to restore both definition tables - -: 714: ** Attempt to restore the watchpoint results table (WRT) data - -: 715: */ - 6: 716: if (DefTblsRestored == TRUE) - -: 717: { - 3: 718: Status = CFE_ES_RestoreFromCDS(LC_OperData.WRTPtr, - -: 719: LC_OperData.WRTDataCDSHandle); - 3: 720: if (Status == CFE_SUCCESS) - -: 721: { - 2: 722: CFE_EVS_SendEvent(LC_WRT_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 723: "WRT data recovered from CDS"); - -: 724: } - -: 725: else - -: 726: { - 1: 727: CFE_EVS_SendEvent(LC_WRT_NO_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 728: "WRT data NOT recovered from CDS"); - -: 729: /* - -: 730: ** Set this flag which triggers resetting stats and - -: 731: ** housekeeping data - -: 732: */ - 1: 733: StatsRestored = FALSE; - -: 734: } - -: 735: - -: 736: } /* end DefTblsRestored == TRUE if */ - -: 737: - -: 738: /* - -: 739: ** If we've been able to restore everything so far - -: 740: ** Attempt to restore the actionpoint results table (ART) data - -: 741: */ - 6: 742: if ((DefTblsRestored == TRUE) && (StatsRestored == TRUE)) - -: 743: { - 2: 744: Status = CFE_ES_RestoreFromCDS(LC_OperData.ARTPtr, - -: 745: LC_OperData.ARTDataCDSHandle); - 2: 746: if (Status == CFE_SUCCESS) - -: 747: { - 2: 748: CFE_EVS_SendEvent(LC_ART_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 749: "ART data recovered from CDS"); - -: 750: } - -: 751: else - -: 752: { - #####: 753: CFE_EVS_SendEvent(LC_ART_NO_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 754: "ART data NOT recovered from CDS"); - -: 755: /* - -: 756: ** Set this flag which triggers resetting stats and - -: 757: ** housekeeping data - -: 758: */ - #####: 759: StatsRestored = FALSE; - -: 760: } - -: 761: - -: 762: } /* end DefTblsRestored == TRUE && StatsRestored == TRUE if */ - -: 763: - -: 764: /* - -: 765: ** Release pointers to the result tables... - -: 766: */ - 6: 767: CFE_TBL_ReleaseAddress(LC_OperData.WRTHandle); - 6: 768: CFE_TBL_ReleaseAddress(LC_OperData.ARTHandle); - -: 769: - -: 770: /* - -: 771: ** If we've been able to restore everything so far - -: 772: ** Attempt to restore the critical LC application data - -: 773: */ - 6: 774: if ((DefTblsRestored == TRUE) && (StatsRestored == TRUE)) - -: 775: { - 2: 776: Status = CFE_ES_RestoreFromCDS(&LC_AppData, - -: 777: LC_OperData.AppDataCDSHandle); - 2: 778: if (Status == CFE_SUCCESS) - -: 779: { - 2: 780: CFE_EVS_SendEvent(LC_APPDATA_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 781: "Application data recovered from CDS"); - -: 782: /* - -: 783: ** Check if we need to override the restored application state - -: 784: */ - 2: 785: if (LC_STATE_WHEN_CDS_RESTORED != LC_STATE_FROM_CDS) - -: 786: { - -: 787: LC_AppData.CurrentLCState = LC_STATE_WHEN_CDS_RESTORED; - -: 788: CFE_EVS_SendEvent(LC_STATE_OVERRIDE_DBG_EID, CFE_EVS_DEBUG, - -: 789: "LC State recovered from CDS overridden, state = %d", - -: 790: LC_STATE_WHEN_CDS_RESTORED); - -: 791: } - -: 792: } - -: 793: else - -: 794: { - #####: 795: CFE_EVS_SendEvent(LC_APPDATA_NO_RECOVER_DBG_EID, CFE_EVS_DEBUG, - -: 796: "Application data NOT recovered from CDS"); - -: 797: /* - -: 798: ** Set this flag which triggers resetting stats and - -: 799: ** housekeeping data - -: 800: */ - #####: 801: StatsRestored = FALSE; - -: 802: } - -: 803: - -: 804: } /* end DefTblsRestored == TRUE && StatsRestored == TRUE if */ - -: 805: - -: 806: /* - -: 807: ** If we didn't restore both definition tables successfully from the CDS, - -: 808: ** load defaults for the WDT, ADT, and app data. - -: 809: */ - 6: 810: if (DefTblsRestored != TRUE) - -: 811: { - 3: 812: CFE_EVS_SendEvent(LC_DEFTBLS_RECOVER_INCOMP_INF_EID, CFE_EVS_INFORMATION, - -: 813: "WDT and ADT CDS restore NOT complete, loading defaults"); - -: 814: - 3: 815: Status = LC_LoadDefaults(); - -: 816: - 3: 817: if (Status != CFE_SUCCESS) - -: 818: { - 2: 819: return(Status); - -: 820: } - -: 821: } - -: 822: else - -: 823: { - -: 824: /* - -: 825: ** Check if results tables and housekeeping were restored successfully - -: 826: */ - 3: 827: if (StatsRestored != TRUE) - -: 828: { - 1: 829: CFE_EVS_SendEvent(LC_STATS_RECOVER_INCOMP_INF_EID, CFE_EVS_INFORMATION, - -: 830: "Stats CDS restore NOT complete, resetting stats and counters"); - -: 831: - 1: 832: LC_AppData.CurrentLCState = LC_STATE_POWER_ON_RESET; - 1: 833: LC_AppData.CDSSavedOnExit = LC_CDS_NOT_SAVED; - 1: 834: LC_ResetCounters(); - -: 835: - -: 836: } - -: 837: else - -: 838: { - -: 839: /* - -: 840: ** Check if the results tables and housekeeping data were copied - -: 841: ** to the CDS on the last application exit. - -: 842: */ - 2: 843: if (LC_AppData.CDSSavedOnExit != LC_CDS_SAVED) - -: 844: { - 1: 845: CFE_EVS_SendEvent(LC_NO_CDS_ON_EXIT_INF_EID, CFE_EVS_INFORMATION, - -: 846: "CDS data not saved on last exit, resetting stats and counters"); - -: 847: - 1: 848: LC_AppData.CurrentLCState = LC_STATE_POWER_ON_RESET; - 1: 849: LC_AppData.CDSSavedOnExit = LC_CDS_NOT_SAVED; - 1: 850: LC_ResetCounters(); - -: 851: } - -: 852: else - -: 853: { - -: 854: /* - -: 855: ** Everything was restored - -: 856: ** Reset the save on exit flag - -: 857: ** Set the flag that will tell the LC_AcquirePointers routine - -: 858: ** not to clear the results tables since they were saved - -: 859: ** on the last exit and successfuly restored - -: 860: */ - 1: 861: LC_AppData.CDSSavedOnExit = LC_CDS_NOT_SAVED; - 1: 862: ResetResultTables = FALSE; - -: 863: - 1: 864: CFE_EVS_SendEvent(LC_CDS_RECOVER_COMPLETE_INF_EID, CFE_EVS_INFORMATION, - -: 865: "CDS restore complete"); - -: 866: } - -: 867: - -: 868: } /* end StatsRestored != TRUE else */ - -: 869: - -: 870: } /* end DefTblsRestored != TRUE else */ - -: 871: - -: 872: /* - -: 873: ** Get pointers to table data. This will initiate normal - -: 874: ** table update processing where the results table data will - -: 875: ** be initialized and subscriptions made for packets listed - -: 876: ** in the watchpoint definition table. - -: 877: */ - 4: 878: Status = LC_AcquirePointers(ResetResultTables); - -: 879: - 4: 880: return(Status); - -: 881: - -: 882:} /* end LC_InitFromCDS */ - -: 883: - -: 884:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 885:/* */ - -: 886:/* Init LC data structures, don't use the Critical Data Store */ - -: 887:/* The code in this function is only compiled in when we are */ - -: 888:/* configured NOT to use the critical data store. */ - -: 889:/* See lc_platform_cfg.h to set this compiler switch. */ - -: 890:/* */ - -: 891:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 892:#else /* LC_SAVE_TO_CDS */ - -: 893: - -: 894:int32 LC_InitNoCDS(void) - -: 895:{ - -: 896: uint32 TableSize; - -: 897: int32 Status = CFE_SUCCESS; - -: 898: - -: 899: /* - -: 900: ** Register watchpoint definition table (WDT) - -: 901: */ - -: 902: TableSize = LC_MAX_WATCHPOINTS * sizeof (LC_WDTEntry_t); - -: 903: Status = CFE_TBL_Register(&LC_OperData.WDTHandle, - -: 904: LC_WDT_TABLENAME, - -: 905: TableSize, - -: 906: CFE_TBL_OPT_DEFAULT, - -: 907: LC_ValidateWDT); - -: 908: if (Status != CFE_SUCCESS) - -: 909: { - -: 910: /* - -: 911: ** Can't register table, return with error code - -: 912: */ - -: 913: CFE_EVS_SendEvent(LC_WDT_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 914: "Error registering WDT, RC=0x%08X", Status); - -: 915: return (Status); - -: 916: } - -: 917: - -: 918: /* - -: 919: ** Register actionpoint definition table (ADT) - -: 920: */ - -: 921: TableSize = LC_MAX_ACTIONPOINTS * sizeof (LC_ADTEntry_t); - -: 922: Status = CFE_TBL_Register(&LC_OperData.ADTHandle, - -: 923: LC_ADT_TABLENAME, - -: 924: TableSize, - -: 925: CFE_TBL_OPT_DEFAULT, - -: 926: LC_ValidateADT); - -: 927: if (Status != CFE_SUCCESS) - -: 928: { - -: 929: /* - -: 930: ** Can't register table, return with error code - -: 931: */ - -: 932: CFE_EVS_SendEvent(LC_ADT_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 933: "Error registering ADT, RC=0x%08X", Status); - -: 934: return (Status); - -: 935: } - -: 936: - -: 937: /* - -: 938: ** Register watchpoint results table (WRT) - -: 939: */ - -: 940: TableSize = LC_MAX_WATCHPOINTS * sizeof (LC_WRTEntry_t); - -: 941: Status = CFE_TBL_Register(&LC_OperData.WRTHandle, - -: 942: LC_WRT_TABLENAME, - -: 943: TableSize, - -: 944: (CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_DUMP_ONLY), - -: 945: NULL); - -: 946: if (Status != CFE_SUCCESS) - -: 947: { - -: 948: /* - -: 949: ** Can't register table, return with error code - -: 950: */ - -: 951: CFE_EVS_SendEvent(LC_WRT_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 952: "Error registering WRT, RC=0x%08X", Status); - -: 953: return (Status); - -: 954: } - -: 955: - -: 956: /* - -: 957: ** Register the actionpoint results table (ART) - -: 958: */ - -: 959: TableSize = LC_MAX_ACTIONPOINTS * sizeof (LC_ARTEntry_t); - -: 960: Status = CFE_TBL_Register(&LC_OperData.ARTHandle, - -: 961: LC_ART_TABLENAME, - -: 962: TableSize, - -: 963: (CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_DUMP_ONLY), - -: 964: NULL); - -: 965: if (Status != CFE_SUCCESS) - -: 966: { - -: 967: /* - -: 968: ** Can't register table, return with error code - -: 969: */ - -: 970: CFE_EVS_SendEvent(LC_ART_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 971: "Error registering ART, RC=0x%08X", Status); - -: 972: return (Status); - -: 973: } - -: 974: - -: 975: /* - -: 976: ** Load defaults for the WDT, ADT, and critical app data - -: 977: */ - -: 978: Status = LC_LoadDefaults(); - -: 979: - -: 980: if (Status != CFE_SUCCESS) - -: 981: { - -: 982: return(Status); - -: 983: } - -: 984: - -: 985: /* - -: 986: ** Get pointers to table data. This will initiate normal - -: 987: ** table update processing where the results table data will - -: 988: ** be initialized and subscriptions made for packets listed - -: 989: ** in the watchpoint definition table. - -: 990: */ - -: 991: Status = LC_AcquirePointers(TRUE); - -: 992: - -: 993: return(Status); - -: 994: - -: 995:} /* end LC_InitNoCDS */ - -: 996: - -: 997:#endif /* LC_SAVE_TO_CDS */ - -: 998: - -: 999:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1000:/* */ - -: 1001:/* Load defaults for definition tables and app data */ - -: 1002:/* Requires that the tables have already been successfully */ - -: 1003:/* registered */ - -: 1004:/* */ - -: 1005:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1006:int32 LC_LoadDefaults(void) -function LC_LoadDefaults called 3 returned 100% blocks executed 100% - 3: 1007:{ - 3: 1008: int32 Status = CFE_SUCCESS; - -: 1009: - -: 1010: /* - -: 1011: ** Load default watchpoint definition table (WDT) data - -: 1012: */ - 3: 1013: Status = CFE_TBL_Load(LC_OperData.WDTHandle, CFE_TBL_SRC_FILE, - -: 1014: (const void *) LC_WDT_FILENAME); - -: 1015: - 3: 1016: if (Status != CFE_SUCCESS) - -: 1017: { - -: 1018: /* - -: 1019: ** Can't load default table, return with error code - -: 1020: */ - 1: 1021: CFE_EVS_SendEvent(LC_WDT_LOAD_ERR_EID, CFE_EVS_ERROR, - -: 1022: "Error (RC=0x%08X) Loading WDT with '%s'", - -: 1023: Status, LC_WDT_FILENAME); - 1: 1024: return (Status); - -: 1025: } - -: 1026: - -: 1027: /* - -: 1028: ** Load default actionpoint definition table (ADT) data - -: 1029: */ - 2: 1030: Status = CFE_TBL_Load(LC_OperData.ADTHandle, CFE_TBL_SRC_FILE, - -: 1031: (const void *) LC_ADT_FILENAME); - -: 1032: - 2: 1033: if (Status != CFE_SUCCESS) - -: 1034: { - -: 1035: /* - -: 1036: ** Can't load default table, return with error code - -: 1037: */ - 1: 1038: CFE_EVS_SendEvent(LC_ADT_LOAD_ERR_EID, CFE_EVS_ERROR, - -: 1039: "Error (RC=0x%08X) Loading ADT with '%s'", - -: 1040: Status, LC_ADT_FILENAME); - 1: 1041: return (Status); - -: 1042: } - -: 1043: - -: 1044: /* - -: 1045: ** Load default values for app data - -: 1046: */ - 1: 1047: LC_AppData.CurrentLCState = LC_STATE_POWER_ON_RESET; - 1: 1048: LC_AppData.CDSSavedOnExit = LC_CDS_NOT_SAVED; - 1: 1049: LC_ResetCounters(); - -: 1050: - 1: 1051: return (Status); - -: 1052: - -: 1053:} /* end LC_LoadDefaults */ - -: 1054: - -: 1055:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1056:/* */ - -: 1057:/* Do application cleanup on exit */ - -: 1058:/* The code in this function is only compiled in when we are */ - -: 1059:/* configured to use the critical data store. */ - -: 1060:/* See lc_platform_cfg.h to set this compiler switch. */ - -: 1061:/* */ - -: 1062:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1063:#ifdef LC_SAVE_TO_CDS - -: 1064: - -: 1065:void LC_ExitApp(void) -function LC_ExitApp called 2 returned 100% blocks executed 81% - 2: 1066:{ - 2: 1067: int32 Status = CFE_SUCCESS; - 2: 1068: boolean AllSaved = TRUE; - -: 1069: - -: 1070: /* - -: 1071: ** Attempt to save the watchpoint results table (WRT) data - -: 1072: ** Since this routine only gets called if LC initialized - -: 1073: ** successfully, we should already have our table pointers - -: 1074: */ - 2: 1075: Status = CFE_ES_CopyToCDS(LC_OperData.WRTDataCDSHandle, - -: 1076: LC_OperData.WRTPtr); - 2: 1077: if (Status == CFE_SUCCESS) - -: 1078: { - 1: 1079: CFE_EVS_SendEvent(LC_WRT_SAVE_INF_EID, CFE_EVS_INFORMATION, - -: 1080: "WRT data saved to CDS on exit"); - -: 1081: } - -: 1082: else - -: 1083: { - 1: 1084: CFE_EVS_SendEvent(LC_WRT_NO_SAVE_ERR_EID, CFE_EVS_ERROR, - -: 1085: "WRT data NOT saved to CDS on exit, RC=0x%08X", - -: 1086: Status); - -: 1087: /* - -: 1088: ** Clear the all saved flag on error - -: 1089: */ - 1: 1090: AllSaved = FALSE; - -: 1091: } - -: 1092: - 2: 1093: if (AllSaved == TRUE) - -: 1094: { - -: 1095: /* - -: 1096: ** Attempt to save the actionpoint results table (ART) data - -: 1097: */ - 1: 1098: Status = CFE_ES_CopyToCDS(LC_OperData.ARTDataCDSHandle, - -: 1099: LC_OperData.ARTPtr); - 1: 1100: if (Status == CFE_SUCCESS) - -: 1101: { - 1: 1102: CFE_EVS_SendEvent(LC_ART_SAVE_INF_EID, CFE_EVS_INFORMATION, - -: 1103: "ART data saved to CDS on exit"); - -: 1104: } - -: 1105: else - -: 1106: { - #####: 1107: CFE_EVS_SendEvent(LC_ART_NO_SAVE_ERR_EID, CFE_EVS_ERROR, - -: 1108: "ART data NOT saved to CDS on exit, RC=0x%08X", - -: 1109: Status); - -: 1110: /* - -: 1111: ** Clear the all saved flag on error - -: 1112: */ - #####: 1113: AllSaved = FALSE; - -: 1114: } - -: 1115: - -: 1116: } - -: 1117: - -: 1118: /* - -: 1119: ** If we could save both the WRT and ART, try to save the - -: 1120: ** application data - -: 1121: */ - 2: 1122: if (AllSaved == TRUE) - -: 1123: { - -: 1124: /* - -: 1125: ** Update the CDS saved on exit variable that's stored with the - -: 1126: ** application data. This is the only place where it can - -: 1127: ** get set to LC_CDS_SAVED. - -: 1128: */ - 1: 1129: LC_AppData.CDSSavedOnExit = LC_CDS_SAVED; - -: 1130: - -: 1131: /* - -: 1132: ** Attempt to save the LC application data - -: 1133: */ - 1: 1134: Status = CFE_ES_CopyToCDS(LC_OperData.AppDataCDSHandle, - -: 1135: &LC_AppData); - 1: 1136: if (Status == CFE_SUCCESS) - -: 1137: { - 1: 1138: CFE_EVS_SendEvent(LC_APP_SAVE_INF_EID, CFE_EVS_INFORMATION, - -: 1139: "App data saved to CDS on exit"); - -: 1140: } - -: 1141: else - -: 1142: { - #####: 1143: CFE_EVS_SendEvent(LC_APP_NO_SAVE_ERR_EID, CFE_EVS_ERROR, - -: 1144: "App data NOT saved to CDS on exit, RC=0x%08X", - -: 1145: Status); - -: 1146: /* - -: 1147: ** Clear the all saved flag on error - -: 1148: */ - #####: 1149: AllSaved = FALSE; - -: 1150: } - -: 1151: - -: 1152: } /* end AllSaved == TRUE if */ - -: 1153: - 2: 1154: return; - -: 1155: - -: 1156:} /* end LC_ExitApp */ - -: 1157: - -: 1158:#endif /* LC_SAVE_TO_CDS */ - -: 1159: - -: 1160:/************************/ - -: 1161:/* End of File Comment */ - -: 1162:/************************/ diff --git a/fsw/unit_test/output_CDS/lc_cmds.c.gcov b/fsw/unit_test/output_CDS/lc_cmds.c.gcov deleted file mode 100644 index 90cb613..0000000 --- a/fsw/unit_test/output_CDS/lc_cmds.c.gcov +++ /dev/null @@ -1,1667 +0,0 @@ - -: 0:Source:../src/lc_cmds.c - -: 0:Graph:lc_cmds.gcno - -: 0:Data:lc_cmds.gcda - -: 0:Runs:1 - -: 0:Programs:1 - -: 1:/************************************************************************ - -: 2:** File: - -: 3:** $Id: lc_cmds.c.gcov 1.1 2012/07/31 16:53:46EDT nschweis Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** CFS Limit Checker (LC) command handling routines - -: 7:** - -: 8:** $Log: lc_cmds.c.gcov $ - -: 8:** Revision 1.1 2012/07/31 16:53:46EDT nschweis - -: 8:** Initial revision - -: 8:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/output_CDS/project.pj - -: 8:** Revision 1.1 2009/01/15 15:26:19EST dahardis - -: 8:** Initial revision - -: 8:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/output_CDS/project.pj - -: 9:** Revision 1.4 2009/01/09 11:34:53EST dahardis - -: 10:** Fixed call to CFE_TBL_GetAddress for the Actionpoint Definition Table that was - -: 11:** passing in the wrong table handle, causing the Actionpoint Results Table to be - -: 12:** initialized incorrectly. - -: 13:** Revision 1.3 2008/12/10 09:38:36EST dahardis - -: 14:** Fixed calls to CFE_TBL_GetAddress (DCR #4699) - -: 15:** Revision 1.2 2008/12/03 13:59:34EST dahardis - -: 16:** Corrections from peer code review - -: 17:** Revision 1.1 2008/10/29 14:19:03EDT dahardison - -: 18:** Initial revision - -: 19:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 20:** - -: 21:*************************************************************************/ - -: 22: - -: 23:/************************************************************************ - -: 24:** Includes - -: 25:*************************************************************************/ - -: 26:#include "lc_app.h" - -: 27:#include "lc_cmds.h" - -: 28:#include "lc_msgids.h" - -: 29:#include "lc_events.h" - -: 30:#include "lc_version.h" - -: 31:#include "lc_action.h" - -: 32:#include "lc_watch.h" - -: 33: - -: 34:/************************************************************************ - -: 35:** Local function prototypes - -: 36:*************************************************************************/ - -: 37:/************************************************************************/ - -: 38:/** \brief Sample actionpoints request - -: 39:** - -: 40:** \par Description - -: 41:** Processes an on-board sample actionpoints request message. - -: 42:** - -: 43:** \par Assumptions, External Events, and Notes: - -: 44:** This message does not affect the command execution counter - -: 45:** - -: 46:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 47:** references the software bus message - -: 48:** - -: 49:*************************************************************************/ - -: 50:void LC_SampleAPReq(CFE_SB_MsgPtr_t MessagePtr); - -: 51: - -: 52:/************************************************************************/ - -: 53:/** \brief Housekeeping request - -: 54:** - -: 55:** \par Description - -: 56:** Processes an on-board housekeeping request message. - -: 57:** - -: 58:** \par Assumptions, External Events, and Notes: - -: 59:** This message does not affect the command execution counter - -: 60:** - -: 61:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 62:** references the software bus message - -: 63:** - -: 64:** \returns - -: 65:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 66:** \retstmt Return codes from #LC_AcquirePointers \endcode - -: 67:** \endreturns - -: 68:** - -: 69:*************************************************************************/ - -: 70:int32 LC_HousekeepingReq(CFE_SB_MsgPtr_t MessagePtr); - -: 71: - -: 72:/************************************************************************/ - -: 73:/** \brief Noop command - -: 74:** - -: 75:** \par Description - -: 76:** Processes a noop ground command. - -: 77:** - -: 78:** \par Assumptions, External Events, and Notes: - -: 79:** None - -: 80:** - -: 81:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 82:** references the software bus message - -: 83:** - -: 84:** \sa #LC_NOOP_CC - -: 85:** - -: 86:*************************************************************************/ - -: 87:void LC_NoopCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 88: - -: 89:/************************************************************************/ - -: 90:/** \brief Reset counters command - -: 91:** - -: 92:** \par Description - -: 93:** Processes a reset counters ground command which will reset - -: 94:** the following LC application counters to zero: - -: 95:** - Command counter - -: 96:** - Command error counter - -: 97:** - Actionpoint sample counter - -: 98:** - Monitored message counter - -: 99:** - RTS execution counter - -: 100:** - Passive RTS execution counter - -: 101:** - -: 102:** \par Assumptions, External Events, and Notes: - -: 103:** None - -: 104:** - -: 105:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 106:** references the software bus message - -: 107:** - -: 108:** \sa #LC_RESET_CC - -: 109:** - -: 110:*************************************************************************/ - -: 111:void LC_ResetCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 112: - -: 113:/************************************************************************/ - -: 114:/** \brief Set LC state command - -: 115:** - -: 116:** \par Description - -: 117:** Processes a set LC application state ground command. - -: 118:** - -: 119:** \par Assumptions, External Events, and Notes: - -: 120:** None - -: 121:** - -: 122:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 123:** references the software bus message - -: 124:** - -: 125:** \sa #LC_SET_LC_STATE_CC - -: 126:** - -: 127:*************************************************************************/ - -: 128:void LC_SetLCStateCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 129: - -: 130:/************************************************************************/ - -: 131:/** \brief Set AP state command - -: 132:** - -: 133:** \par Description - -: 134:** Processes a set actionpoint state ground command. - -: 135:** - -: 136:** \par Assumptions, External Events, and Notes: - -: 137:** None - -: 138:** - -: 139:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 140:** references the software bus message - -: 141:** - -: 142:** \sa #LC_SET_AP_STATE_CC - -: 143:** - -: 144:*************************************************************************/ - -: 145:void LC_SetAPStateCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 146: - -: 147:/************************************************************************/ - -: 148:/** \brief Set AP permanently off command - -: 149:** - -: 150:** \par Description - -: 151:** Processes a set actionpoint permanently off ground command. - -: 152:** - -: 153:** \par Assumptions, External Events, and Notes: - -: 154:** None - -: 155:** - -: 156:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 157:** references the software bus message - -: 158:** - -: 159:** \sa #LC_SET_AP_PERMOFF_CC - -: 160:** - -: 161:*************************************************************************/ - -: 162:void LC_SetAPPermOffCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 163: - -: 164:/************************************************************************/ - -: 165:/** \brief Reset AP statistics command - -: 166:** - -: 167:** \par Description - -: 168:** Processes a reset actionpoint statistics ground command. - -: 169:** - -: 170:** \par Assumptions, External Events, and Notes: - -: 171:** None - -: 172:** - -: 173:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 174:** references the software bus message - -: 175:** - -: 176:** \sa #LC_RESET_AP_STATS_CC - -: 177:** - -: 178:*************************************************************************/ - -: 179:void LC_ResetAPStatsCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 180: - -: 181:/************************************************************************/ - -: 182:/** \brief Reset WP statistics command - -: 183:** - -: 184:** \par Description - -: 185:** Processes a reset watchpoint statistics ground command. - -: 186:** - -: 187:** \par Assumptions, External Events, and Notes: - -: 188:** None - -: 189:** - -: 190:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 191:** references the software bus message - -: 192:** - -: 193:** \sa #LC_RESET_WP_STATS_CC - -: 194:** - -: 195:*************************************************************************/ - -: 196:void LC_ResetWPStatsCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 197: - -: 198:/************************************************************************/ - -: 199:/** \brief Verify message length - -: 200:** - -: 201:** \par Description - -: 202:** Checks if the actual length of a software bus message matches - -: 203:** the expected length and sends an error event if a mismatch - -: 204:** occures - -: 205:** - -: 206:** \par Assumptions, External Events, and Notes: - -: 207:** None - -: 208:** - -: 209:** \param [in] msg A #CFE_SB_MsgPtr_t pointer that - -: 210:** references the software bus message - -: 211:** - -: 212:** \param [in] ExpectedLength The expected length of the message - -: 213:** based upon the command code - -: 214:** - -: 215:** \returns - -: 216:** \retstmt Returns TRUE if the length is as expected \endcode - -: 217:** \retstmt Returns FALSE if the length is not as expected \endcode - -: 218:** \endreturns - -: 219:** - -: 220:** \sa #LC_LEN_ERR_EID - -: 221:** - -: 222:*************************************************************************/ - -: 223:boolean LC_VerifyMsgLength(CFE_SB_MsgPtr_t msg, - -: 224: uint16 ExpectedLength); - -: 225: - -: 226:/************************************************************************/ - -: 227:/** \brief Process WDT update - -: 228:** - -: 229:** \par Description - -: 230:** This function gets called when LC detects that a new watchpoint - -: 231:** definition table has been loaded - -: 232:** - -: 233:** \par Assumptions, External Events, and Notes: - -: 234:** None - -: 235:** - -: 236:** \param [in] ResetResultsTable Tells the function if the watchpoint - -: 237:** results table should be cleared - -: 238:** - -: 239:** \sa #LC_ADTUpdated - -: 240:** - -: 241:*************************************************************************/ - -: 242:void LC_WDTUpdated(boolean ResetResultsTable); - -: 243: - -: 244:/************************************************************************/ - -: 245:/** \brief Process ADT update - -: 246:** - -: 247:** \par Description - -: 248:** This function gets called when LC detects that a new actionpoint - -: 249:** definition table has been loaded - -: 250:** - -: 251:** \par Assumptions, External Events, and Notes: - -: 252:** None - -: 253:** - -: 254:** \param [in] ResetResultsTable Tells the function if the actionpoint - -: 255:** results table should be cleared - -: 256:** - -: 257:** \sa #LC_WDTUpdated - -: 258:** - -: 259:*************************************************************************/ - -: 260:void LC_ADTUpdated(boolean ResetResultsTable); - -: 261: - -: 262:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 263:/* */ - -: 264:/* Process a command pipe message */ - -: 265:/* */ - -: 266:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 267:int32 LC_AppPipe(CFE_SB_MsgPtr_t MessagePtr) -function LC_AppPipe called 49 returned 100% blocks executed 97% - 49: 268:{ - 49: 269: int32 Status = CFE_SUCCESS; - 49: 270: CFE_SB_MsgId_t MessageID = 0; - 49: 271: uint16 CommandCode = 0; - -: 272: - 49: 273: MessageID = CFE_SB_GetMsgId(MessagePtr); - 49: 274: switch (MessageID) - -: 275: { - -: 276: /* - -: 277: ** Sample actionpoints request - -: 278: */ - -: 279: case LC_SAMPLE_AP_MID: - 1: 280: LC_SampleAPReq(MessagePtr); - 1: 281: break; - -: 282: - -: 283: /* - -: 284: ** Housekeeping telemetry request - -: 285: ** (only routine that can return a critical error indicator) - -: 286: */ - -: 287: case LC_SEND_HK_MID: - 22: 288: Status = LC_HousekeepingReq(MessagePtr); - 22: 289: break; - -: 290: - -: 291: /* - -: 292: ** LC application commands... - -: 293: */ - -: 294: case LC_CMD_MID: - -: 295: - 25: 296: CommandCode = CFE_SB_GetCmdCode(MessagePtr); - 25: 297: switch (CommandCode) - -: 298: { - -: 299: case LC_NOOP_CC: - 6: 300: LC_NoopCmd(MessagePtr); - 6: 301: break; - -: 302: - -: 303: case LC_RESET_CC: - 2: 304: LC_ResetCmd(MessagePtr); - 2: 305: break; - -: 306: - -: 307: case LC_SET_LC_STATE_CC: - 4: 308: LC_SetLCStateCmd(MessagePtr); - 4: 309: break; - -: 310: - -: 311: case LC_SET_AP_STATE_CC: - 1: 312: LC_SetAPStateCmd(MessagePtr); - 1: 313: break; - -: 314: - -: 315: case LC_SET_AP_PERMOFF_CC: - 1: 316: LC_SetAPPermOffCmd(MessagePtr); - 1: 317: break; - -: 318: - -: 319: case LC_RESET_AP_STATS_CC: - 3: 320: LC_ResetAPStatsCmd(MessagePtr); - 3: 321: break; - -: 322: - -: 323: case LC_RESET_WP_STATS_CC: - 3: 324: LC_ResetWPStatsCmd(MessagePtr); - 3: 325: break; - -: 326: - -: 327: default: - 5: 328: CFE_EVS_SendEvent(LC_CC_ERR_EID, CFE_EVS_ERROR, - -: 329: "Invalid command code: ID = 0x%04X, CC = %d", - -: 330: MessageID, CommandCode); - -: 331: - 5: 332: LC_AppData.CmdErrCount++; - 5: 333: break; - -: 334: - -: 335: } /* end CommandCode switch */ - 5: 336: break; - -: 337: - -: 338: /* - -: 339: ** All other message ID's should be monitor - -: 340: ** packets - -: 341: */ - -: 342: default: - 1: 343: LC_CheckMsgForWPs(MessageID, MessagePtr); - 49: 344: break; - -: 345: - -: 346: } /* end MessageID switch */ - -: 347: - 49: 348: return (Status); - -: 349: - -: 350:} /* End LC_AppPipe */ - -: 351: - -: 352:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 353:/* */ - -: 354:/* Sample Actionpoints Request */ - -: 355:/* */ - -: 356:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 357:void LC_SampleAPReq(CFE_SB_MsgPtr_t MessagePtr) -function LC_SampleAPReq called 16 returned 100% blocks executed 100% - 16: 358:{ - 16: 359: uint16 ExpectedLength = sizeof(LC_SampleAP_t); - 16: 360: LC_SampleAP_t *ReqPtr; - -: 361: - -: 362: /* - -: 363: ** Verify message packet length - -: 364: */ - 16: 365: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 366: { - 15: 367: ReqPtr = ((LC_SampleAP_t *)MessagePtr); - -: 368: - -: 369: /* - -: 370: ** We don't process actionpoint sample requests - -: 371: ** if we're disabled at the application level - -: 372: */ - 15: 373: if (LC_AppData.CurrentLCState != LC_STATE_DISABLED) - -: 374: { - -: 375: /* - -: 376: ** Range check the actionpoint number argument - -: 377: */ - 15: 378: if (((ReqPtr -> APNumber) < LC_MAX_ACTIONPOINTS) || - -: 379: ((ReqPtr -> APNumber) == LC_ALL_ACTIONPOINTS)) - -: 380: { - 14: 381: LC_SampleAPs(ReqPtr -> APNumber); - -: 382: } - -: 383: else - -: 384: { - -: 385: /* - -: 386: ** Actionpoint number is out of range - -: 387: ** (it's zero based, since it's a table index) - -: 388: */ - 1: 389: CFE_EVS_SendEvent(LC_APSAMPLE_APNUM_ERR_EID, CFE_EVS_ERROR, - -: 390: "Sample AP error: invalid AP number = %d", - -: 391: ReqPtr -> APNumber); - -: 392: } - -: 393: - -: 394: } /* end LC_AppData.CurrentLCState if */ - -: 395: - -: 396: } /* end LC_VerifyMsgLength if */ - -: 397: - 16: 398: return; - -: 399: - -: 400:} /* end LC_SampleAPReq */ - -: 401: - -: 402:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 403:/* */ - -: 404:/* Housekeeping request */ - -: 405:/* */ - -: 406:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 407:int32 LC_HousekeepingReq(CFE_SB_MsgPtr_t MessagePtr) -function LC_HousekeepingReq called 23 returned 100% blocks executed 91% - 23: 408:{ - 23: 409: int32 TableResult = CFE_SUCCESS; - 23: 410: uint16 ExpectedLength = sizeof(LC_NoArgsCmd_t); - 23: 411: uint8 ByteData; - 23: 412: uint16 TableIndex; - 23: 413: uint16 HKIndex; - -: 414: - -: 415: /* - -: 416: ** Verify message packet length - -: 417: */ - 23: 418: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 419: { - -: 420: /* - -: 421: ** Update HK variables - -: 422: */ - 22: 423: LC_OperData.HkPacket.CmdCount = LC_AppData.CmdCount; - 22: 424: LC_OperData.HkPacket.CmdErrCount = LC_AppData.CmdErrCount; - 22: 425: LC_OperData.HkPacket.APSampleCount = LC_AppData.APSampleCount; - 22: 426: LC_OperData.HkPacket.MonitoredMsgCount = LC_AppData.MonitoredMsgCount; - 22: 427: LC_OperData.HkPacket.RTSExecCount = LC_AppData.RTSExecCount; - 22: 428: LC_OperData.HkPacket.PassiveRTSExecCount = LC_AppData.PassiveRTSExecCount; - 22: 429: LC_OperData.HkPacket.CurrentLCState = LC_AppData.CurrentLCState; - 22: 430: LC_OperData.HkPacket.WPsInUse = LC_OperData.WPsInUse; - -: 431: - -: 432: /* - -: 433: ** Clear out the active actionpoint count, it will get - -: 434: ** recomputed below - -: 435: */ - 22: 436: LC_OperData.HkPacket.ActiveAPs = 0; - -: 437: - -: 438: /* - -: 439: ** Update packed watch results - -: 440: ** (4 watch results in one 8-bit byte) - -: 441: */ - 990: 442: for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex += 4) - -: 443: { - 968: 444: HKIndex = TableIndex / 4; - -: 445: - -: 446: /* - -: 447: ** Pack in first result - -: 448: */ - 968: 449: switch (LC_OperData.WRTPtr[TableIndex + 3].WatchResult) - -: 450: { - -: 451: case LC_WATCH_NOT_MEASURED: - 965: 452: ByteData = LC_HKWR_NOT_MEASURED << 6; - 965: 453: break; - -: 454: - -: 455: case LC_WATCH_FALSE: - 1: 456: ByteData = LC_HKWR_FALSE << 6; - 1: 457: break; - -: 458: - -: 459: case LC_WATCH_TRUE: - 1: 460: ByteData = LC_HKWR_TRUE << 6; - 1: 461: break; - -: 462: - -: 463: /* - -: 464: ** We should never get an undefined watch result, - -: 465: ** but we'll set an error result if we do - -: 466: */ - -: 467: case LC_WATCH_ERROR: - -: 468: default: - 1: 469: ByteData = LC_HKWR_ERROR << 6; - 968: 470: break; - -: 471: } - -: 472: - -: 473: /* - -: 474: ** Pack in second result - -: 475: */ - 968: 476: switch (LC_OperData.WRTPtr[TableIndex + 2].WatchResult) - -: 477: { - -: 478: case LC_WATCH_NOT_MEASURED: - 965: 479: ByteData = (ByteData | (LC_HKWR_NOT_MEASURED << 4)); - 965: 480: break; - -: 481: - -: 482: case LC_WATCH_FALSE: - 1: 483: ByteData = (ByteData | (LC_HKWR_FALSE << 4)); - 1: 484: break; - -: 485: - -: 486: case LC_WATCH_TRUE: - 1: 487: ByteData = (ByteData | (LC_HKWR_TRUE << 4)); - 1: 488: break; - -: 489: - -: 490: case LC_WATCH_ERROR: - -: 491: default: - 1: 492: ByteData = (ByteData | (LC_HKWR_ERROR << 4)); - 968: 493: break; - -: 494: } - -: 495: - -: 496: /* - -: 497: ** Pack in third result - -: 498: */ - 968: 499: switch (LC_OperData.WRTPtr[TableIndex + 1].WatchResult) - -: 500: { - -: 501: case LC_WATCH_NOT_MEASURED: - 965: 502: ByteData = (ByteData | (LC_HKWR_NOT_MEASURED << 2)); - 965: 503: break; - -: 504: - -: 505: case LC_WATCH_FALSE: - 1: 506: ByteData = (ByteData | (LC_HKWR_FALSE << 2)); - 1: 507: break; - -: 508: - -: 509: case LC_WATCH_TRUE: - 1: 510: ByteData = (ByteData | (LC_HKWR_TRUE << 2)); - 1: 511: break; - -: 512: - -: 513: case LC_WATCH_ERROR: - -: 514: default: - 1: 515: ByteData = (ByteData | (LC_HKWR_ERROR << 2)); - 968: 516: break; - -: 517: } - -: 518: - -: 519: /* - -: 520: ** Pack in fourth and last result - -: 521: */ - 968: 522: switch (LC_OperData.WRTPtr[TableIndex].WatchResult) - -: 523: { - -: 524: case LC_WATCH_NOT_MEASURED: - 965: 525: ByteData = (ByteData | LC_HKWR_NOT_MEASURED); - 965: 526: break; - -: 527: - -: 528: case LC_WATCH_FALSE: - 1: 529: ByteData = (ByteData | LC_HKWR_FALSE); - 1: 530: break; - -: 531: - -: 532: case LC_WATCH_TRUE: - 1: 533: ByteData = (ByteData | LC_HKWR_TRUE); - 1: 534: break; - -: 535: - -: 536: case LC_WATCH_ERROR: - -: 537: default: - 1: 538: ByteData = (ByteData | LC_HKWR_ERROR); - 968: 539: break; - -: 540: } - -: 541: - -: 542: /* - -: 543: ** Update houskeeping watch results array - -: 544: */ - 968: 545: LC_OperData.HkPacket.WPResults[HKIndex] = ByteData; - -: 546: - -: 547: } /* end watch results for loop */ - -: 548: - -: 549: /* - -: 550: ** Update packed action results - -: 551: ** (2 action state/result pairs (4 bits each) in one 8-bit byte) - -: 552: */ - 1958: 553: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex += 2) - -: 554: { - 1936: 555: HKIndex = TableIndex / 2; - -: 556: - -: 557: /* - -: 558: ** Pack in first actionpoint, current state - -: 559: */ - 1936: 560: switch (LC_OperData.ARTPtr[TableIndex + 1].CurrentState) - -: 561: { - -: 562: case LC_ACTION_NOT_USED: - 1932: 563: ByteData = LC_HKAR_STATE_NOT_USED << 6; - 1932: 564: break; - -: 565: - -: 566: case LC_APSTATE_ACTIVE: - 1: 567: ByteData = LC_HKAR_STATE_ACTIVE << 6; - 1: 568: LC_OperData.HkPacket.ActiveAPs++; - 1: 569: break; - -: 570: - -: 571: case LC_APSTATE_PASSIVE: - 1: 572: ByteData = LC_HKAR_STATE_PASSIVE << 6; - 1: 573: break; - -: 574: - -: 575: case LC_APSTATE_DISABLED: - 1: 576: ByteData = LC_HKAR_STATE_DISABLED << 6; - 1: 577: break; - -: 578: - -: 579: /* - -: 580: ** Permanantly disabled actionpoints get reported - -: 581: ** as unused. We should never get an undefined - -: 582: ** action state, but we'll set to not used if we do. - -: 583: */ - -: 584: case LC_APSTATE_PERMOFF: - -: 585: default: - 1: 586: ByteData = LC_HKAR_STATE_NOT_USED << 6; - 1936: 587: break; - -: 588: } - -: 589: - -: 590: /* - -: 591: ** Pack in first actionpoint, action result - -: 592: */ - 1936: 593: switch (LC_OperData.ARTPtr[TableIndex + 1].ActionResult) - -: 594: { - -: 595: case LC_ACTION_NOT_MEASURED: - 1933: 596: ByteData = (ByteData | (LC_HKAR_NOT_MEASURED << 4)); - 1933: 597: break; - -: 598: - -: 599: case LC_ACTION_PASS: - 1: 600: ByteData = (ByteData | (LC_HKAR_PASS << 4)); - 1: 601: break; - -: 602: - -: 603: case LC_ACTION_FAIL: - 1: 604: ByteData = (ByteData | (LC_HKAR_FAIL << 4)); - 1: 605: break; - -: 606: - -: 607: /* - -: 608: ** We should never get an undefined action result, - -: 609: ** but we'll set an error result if we do - -: 610: */ - -: 611: case LC_ACTION_ERROR: - -: 612: default: - 1: 613: ByteData = (ByteData | (LC_HKAR_ERROR << 4)); - 1936: 614: break; - -: 615: } - -: 616: - -: 617: /* - -: 618: ** Pack in second actionpoint, current state - -: 619: */ - 1936: 620: switch (LC_OperData.ARTPtr[TableIndex].CurrentState) - -: 621: { - -: 622: case LC_ACTION_NOT_USED: - 1: 623: ByteData = (ByteData | (LC_HKAR_STATE_NOT_USED << 2)); - 1: 624: break; - -: 625: - -: 626: case LC_APSTATE_ACTIVE: - 1: 627: ByteData = (ByteData | (LC_HKAR_STATE_ACTIVE << 2)); - 1: 628: LC_OperData.HkPacket.ActiveAPs++; - 1: 629: break; - -: 630: - -: 631: case LC_APSTATE_PASSIVE: - 1: 632: ByteData = (ByteData | (LC_HKAR_STATE_PASSIVE << 2)); - 1: 633: break; - -: 634: - -: 635: case LC_APSTATE_DISABLED: - 1: 636: ByteData = (ByteData | (LC_HKAR_STATE_DISABLED << 2)); - -: 637: break; - -: 638: - -: 639: case LC_APSTATE_PERMOFF: - -: 640: default: - 1936: 641: ByteData = (ByteData | (LC_HKAR_STATE_NOT_USED << 2)); - 1936: 642: break; - -: 643: } - -: 644: - -: 645: /* - -: 646: ** Pack in second actionpoint, action result - -: 647: */ - 1936: 648: switch (LC_OperData.ARTPtr[TableIndex].ActionResult) - -: 649: { - -: 650: case LC_ACTION_NOT_MEASURED: - 1933: 651: ByteData = (ByteData | LC_HKAR_NOT_MEASURED); - 1933: 652: break; - -: 653: - -: 654: case LC_ACTION_PASS: - 1: 655: ByteData = (ByteData | LC_HKAR_PASS); - 1: 656: break; - -: 657: - -: 658: case LC_ACTION_FAIL: - 1: 659: ByteData = (ByteData | LC_HKAR_FAIL); - 1: 660: break; - -: 661: - -: 662: case LC_ACTION_ERROR: - -: 663: default: - 1: 664: ByteData = (ByteData | LC_HKAR_ERROR); - 1936: 665: break; - -: 666: } - -: 667: - -: 668: /* - -: 669: ** Update houskeeping action results array - -: 670: */ - 1936: 671: LC_OperData.HkPacket.APResults[HKIndex] = ByteData; - -: 672: - -: 673: } /* end action results for loop */ - -: 674: - -: 675: /* - -: 676: ** Timestamp and send housekeeping packet - -: 677: */ - 22: 678: CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &LC_OperData.HkPacket); - 22: 679: CFE_SB_SendMsg((CFE_SB_Msg_t *) &LC_OperData.HkPacket); - -: 680: - -: 681: } /* end LC_VerifyMsgLength if */ - -: 682: - -: 683: /* - -: 684: ** Note: - -: 685: ** - -: 686: ** The following table functions will give the cFE Table Manager - -: 687: ** a chance to update the tables used by this application. If - -: 688: ** there is an error (very unlikely) the return value will cause - -: 689: ** us to fall out of the main process loop and terminate the LC - -: 690: ** task. It may sound extreme but there is nothing for the - -: 691: ** Limit Checker to do if it cannot access both the definition - -: 692: ** and result tables. - -: 693: */ - 23: 694: CFE_TBL_ReleaseAddress(LC_OperData.WDTHandle); - 23: 695: CFE_TBL_ReleaseAddress(LC_OperData.ADTHandle); - -: 696: - 23: 697: CFE_TBL_ReleaseAddress(LC_OperData.WRTHandle); - 23: 698: CFE_TBL_ReleaseAddress(LC_OperData.ARTHandle); - -: 699: - 23: 700: TableResult = LC_AcquirePointers(TRUE); - -: 701: - 23: 702: return(TableResult); - -: 703: - -: 704:} /* end LC_HousekeepingCmd */ - -: 705: - -: 706:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 707:/* */ - -: 708:/* Noop command */ - -: 709:/* */ - -: 710:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 711:void LC_NoopCmd(CFE_SB_MsgPtr_t MessagePtr) -function LC_NoopCmd called 6 returned 100% blocks executed 100% - 6: 712:{ - 6: 713: uint16 ExpectedLength = sizeof(LC_NoArgsCmd_t); - -: 714: - -: 715: /* - -: 716: ** Verify message packet length - -: 717: */ - 6: 718: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 719: { - 5: 720: LC_AppData.CmdCount++; - -: 721: - 5: 722: CFE_EVS_SendEvent(LC_NOOP_INF_EID, CFE_EVS_INFORMATION, - -: 723: "No-op command: Version %d.%d.%d.%d", - -: 724: LC_MAJOR_VERSION, - -: 725: LC_MINOR_VERSION, - -: 726: LC_REVISION, - -: 727: LC_MISSION_REV); - -: 728: } - -: 729: - 6: 730: return; - -: 731: - -: 732:} /* end LC_NoopCmd */ - -: 733: - -: 734:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 735:/* */ - -: 736:/* Reset counters command */ - -: 737:/* */ - -: 738:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 739:void LC_ResetCmd(CFE_SB_MsgPtr_t MessagePtr) -function LC_ResetCmd called 2 returned 100% blocks executed 100% - 2: 740:{ - 2: 741: uint16 ExpectedLength = sizeof(LC_NoArgsCmd_t); - -: 742: - -: 743: /* - -: 744: ** Verify message packet length - -: 745: */ - 2: 746: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 747: { - 1: 748: LC_ResetCounters(); - -: 749: - 1: 750: CFE_EVS_SendEvent(LC_RESET_DBG_EID, CFE_EVS_DEBUG, - -: 751: "Reset counters command"); - -: 752: } - -: 753: - 2: 754: return; - -: 755: - -: 756:} /* end LC_ResetCmd */ - -: 757: - -: 758:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 759:/* */ - -: 760:/* Reset housekeeping counters */ - -: 761:/* */ - -: 762:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 763:void LC_ResetCounters(void) -function LC_ResetCounters called 4 returned 100% blocks executed 100% - 4: 764:{ - 4: 765: LC_AppData.CmdCount = 0; - 4: 766: LC_AppData.CmdErrCount = 0; - -: 767: - 4: 768: LC_AppData.APSampleCount = 0; - 4: 769: LC_AppData.MonitoredMsgCount = 0; - 4: 770: LC_AppData.RTSExecCount = 0; - 4: 771: LC_AppData.PassiveRTSExecCount = 0; - -: 772: - -: 773: return; - -: 774: - -: 775:} /* end LC_ResetCounters */ - -: 776: - -: 777:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 778:/* */ - -: 779:/* Set LC state command */ - -: 780:/* */ - -: 781:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 782:void LC_SetLCStateCmd(CFE_SB_MsgPtr_t MessagePtr) -function LC_SetLCStateCmd called 4 returned 100% blocks executed 100% - 4: 783:{ - 4: 784: uint16 ExpectedLength = sizeof(LC_SetLCState_t); - 4: 785: LC_SetLCState_t *CmdPtr; - -: 786: - -: 787: /* - -: 788: ** Verify message packet length - -: 789: */ - 4: 790: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 791: { - 3: 792: CmdPtr = ((LC_SetLCState_t *)MessagePtr); - -: 793: - 3: 794: switch (CmdPtr -> NewLCState) - -: 795: { - -: 796: case LC_STATE_ACTIVE: - -: 797: case LC_STATE_PASSIVE: - -: 798: case LC_STATE_DISABLED: - 2: 799: LC_AppData.CurrentLCState = CmdPtr -> NewLCState; - 2: 800: LC_AppData.CmdCount++; - -: 801: - 2: 802: CFE_EVS_SendEvent(LC_LCSTATE_INF_EID, CFE_EVS_INFORMATION, - -: 803: "Set LC state command: new state = %d", - -: 804: CmdPtr -> NewLCState); - 2: 805: break; - -: 806: - -: 807: default: - 1: 808: CFE_EVS_SendEvent(LC_LCSTATE_ERR_EID, CFE_EVS_ERROR, - -: 809: "Set LC state error: invalid state = %d", - -: 810: CmdPtr -> NewLCState); - -: 811: - 1: 812: LC_AppData.CmdErrCount++; - 4: 813: break; - -: 814: } - -: 815: } - -: 816: - 4: 817: return; - -: 818: - -: 819:} /* end LC_SetLCStateCmd */ - -: 820: - -: 821:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 822:/* */ - -: 823:/* Set actionpoint state command */ - -: 824:/* */ - -: 825:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 826:void LC_SetAPStateCmd(CFE_SB_MsgPtr_t MessagePtr) -function LC_SetAPStateCmd called 6 returned 100% blocks executed 100% - 6: 827:{ - 6: 828: uint16 ExpectedLength = sizeof(LC_SetAPState_t); - 6: 829: LC_SetAPState_t *CmdPtr; - 6: 830: uint32 TableIndex; - 6: 831: uint8 CurrentAPState; - 6: 832: boolean ValidState = TRUE; - 6: 833: boolean CmdSuccess = FALSE; - -: 834: - -: 835: /* - -: 836: ** Verify message packet length - -: 837: */ - 6: 838: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 839: { - 5: 840: CmdPtr = ((LC_SetAPState_t *)MessagePtr); - -: 841: - -: 842: /* - -: 843: ** Do a sanity check on the new actionpoint state - -: 844: ** specified. - -: 845: */ - 5: 846: switch (CmdPtr -> NewAPState) - -: 847: { - -: 848: case LC_APSTATE_ACTIVE: - -: 849: case LC_APSTATE_PASSIVE: - -: 850: case LC_APSTATE_DISABLED: - 4: 851: break; - -: 852: - -: 853: default: - 1: 854: ValidState = FALSE; - 1: 855: CFE_EVS_SendEvent(LC_APSTATE_NEW_ERR_EID, CFE_EVS_ERROR, - -: 856: "Set AP state error: AP = %d, Invalid new state = %d", - -: 857: CmdPtr -> APNumber, CmdPtr -> NewAPState); - -: 858: - 1: 859: LC_AppData.CmdErrCount++; - 5: 860: break; - -: 861: } - -: 862: - -: 863: /* - -: 864: ** Do the rest based on the actionpoint ID we were given - -: 865: */ - 5: 866: if (ValidState == TRUE) - -: 867: { - 4: 868: if ((CmdPtr -> APNumber) == LC_ALL_ACTIONPOINTS) - -: 869: { - -: 870: /* - -: 871: ** Set all actionpoints to the new state except those that are not - -: 872: ** used or set permanently off - -: 873: */ - 177: 874: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) - -: 875: { - 176: 876: CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState; - -: 877: - 176: 878: if ((CurrentAPState != LC_ACTION_NOT_USED) && - -: 879: (CurrentAPState != LC_APSTATE_PERMOFF)) - -: 880: { - 1: 881: LC_OperData.ARTPtr[TableIndex].CurrentState = CmdPtr -> NewAPState; - -: 882: } - -: 883: } - -: 884: - -: 885: /* - -: 886: ** Set flag that we succeeded - -: 887: */ - 1: 888: CmdSuccess = TRUE; - -: 889: } - -: 890: else - -: 891: { - 3: 892: if ((CmdPtr -> APNumber) < LC_MAX_ACTIONPOINTS) - -: 893: { - 2: 894: TableIndex = CmdPtr -> APNumber; - 2: 895: CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState; - -: 896: - 2: 897: if ((CurrentAPState != LC_ACTION_NOT_USED) && - -: 898: (CurrentAPState != LC_APSTATE_PERMOFF)) - -: 899: { - -: 900: /* - -: 901: ** Update state for single actionpoint specified - -: 902: */ - 1: 903: LC_OperData.ARTPtr[TableIndex].CurrentState = CmdPtr -> NewAPState; - -: 904: - 1: 905: CmdSuccess = TRUE; - -: 906: } - -: 907: else - -: 908: { - -: 909: /* - -: 910: ** Actionpoints that are not used or set permanently - -: 911: ** off can only be changed by a table load - -: 912: */ - 1: 913: CFE_EVS_SendEvent(LC_APSTATE_CURR_ERR_EID, CFE_EVS_ERROR, - -: 914: "Set AP state error: AP = %d, Invalid current AP state = %d", - -: 915: CmdPtr -> APNumber, CurrentAPState); - -: 916: - 1: 917: LC_AppData.CmdErrCount++; - -: 918: } - -: 919: } - -: 920: else - -: 921: { - -: 922: /* - -: 923: ** Actionpoint number is out of range - -: 924: ** (it's zero based, since it's a table index) - -: 925: */ - 1: 926: CFE_EVS_SendEvent(LC_APSTATE_APNUM_ERR_EID, CFE_EVS_ERROR, - -: 927: "Set AP state error: Invalid AP number = %d", - -: 928: CmdPtr -> APNumber); - -: 929: - 1: 930: LC_AppData.CmdErrCount++; - -: 931: } - -: 932: } - -: 933: - -: 934: /* - -: 935: ** Update the command counter and send out event if command - -: 936: ** executed - -: 937: */ - 4: 938: if (CmdSuccess == TRUE) - -: 939: { - 2: 940: LC_AppData.CmdCount++; - -: 941: - 2: 942: CFE_EVS_SendEvent(LC_APSTATE_INF_EID, CFE_EVS_INFORMATION, - -: 943: "Set AP state command: AP = %d, New state = %d", - -: 944: CmdPtr -> APNumber, CmdPtr -> NewAPState); - -: 945: } - -: 946: - -: 947: } /* end ValidState if */ - -: 948: - -: 949: } /* end LC_VerifyMsgLength if */ - -: 950: - 6: 951: return; - -: 952: - -: 953:} /* end LC_SetAPStateCmd */ - -: 954: - -: 955:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 956:/* */ - -: 957:/* Set actionpoint permanently off command */ - -: 958:/* */ - -: 959:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 960:void LC_SetAPPermOffCmd(CFE_SB_MsgPtr_t MessagePtr) -function LC_SetAPPermOffCmd called 4 returned 100% blocks executed 100% - 4: 961:{ - 4: 962: uint16 ExpectedLength = sizeof(LC_SetAPPermOff_t); - 4: 963: LC_SetAPPermOff_t *CmdPtr; - 4: 964: uint32 TableIndex; - 4: 965: uint8 CurrentAPState; - -: 966: - -: 967: /* - -: 968: ** Verify message packet length - -: 969: */ - 4: 970: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 971: { - 3: 972: CmdPtr = ((LC_SetAPPermOff_t *)MessagePtr); - -: 973: - 3: 974: if (((CmdPtr -> APNumber) == LC_ALL_ACTIONPOINTS) || - -: 975: ((CmdPtr -> APNumber) >= LC_MAX_ACTIONPOINTS)) - -: 976: { - -: 977: /* - -: 978: ** Invalid actionpoint number - -: 979: ** (This command can't be invoked for all actionpoints) - -: 980: */ - 1: 981: CFE_EVS_SendEvent(LC_APOFF_APNUM_ERR_EID, CFE_EVS_ERROR, - -: 982: "Set AP perm off error: Invalid AP number = %d", - -: 983: CmdPtr -> APNumber); - -: 984: - 1: 985: LC_AppData.CmdErrCount++; - -: 986: - -: 987: } - -: 988: else - -: 989: { - 2: 990: TableIndex = CmdPtr -> APNumber; - 2: 991: CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState; - -: 992: - 2: 993: if (CurrentAPState != LC_APSTATE_DISABLED) - -: 994: { - -: 995: /* - -: 996: ** Actionpoints can only be turned permanently off if - -: 997: ** they are currently disabled - -: 998: */ - 1: 999: CFE_EVS_SendEvent(LC_APOFF_CURR_ERR_EID, CFE_EVS_ERROR, - -: 1000: "Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d", - -: 1001: CmdPtr -> APNumber, CurrentAPState); - -: 1002: - 1: 1003: LC_AppData.CmdErrCount++; - -: 1004: } - -: 1005: else - -: 1006: { - -: 1007: /* - -: 1008: ** Update state for actionpoint specified - -: 1009: */ - 1: 1010: LC_OperData.ARTPtr[TableIndex].CurrentState = LC_APSTATE_PERMOFF; - -: 1011: - 1: 1012: LC_AppData.CmdCount++; - -: 1013: - 1: 1014: CFE_EVS_SendEvent(LC_APOFF_INF_EID, CFE_EVS_INFORMATION, - -: 1015: "Set AP permanently off command: AP = %d", - -: 1016: CmdPtr -> APNumber); - -: 1017: } - -: 1018: - -: 1019: } /* end CmdPtr -> APNumber else */ - -: 1020: - -: 1021: } /* end LC_VerifyMsgLength if */ - -: 1022: - 4: 1023: return; - -: 1024: - -: 1025:} /* end LC_SetAPPermOffCmd */ - -: 1026: - -: 1027:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1028:/* */ - -: 1029:/* Reset actionpoint statistics command */ - -: 1030:/* */ - -: 1031:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1032:void LC_ResetAPStatsCmd(CFE_SB_MsgPtr_t MessagePtr) -function LC_ResetAPStatsCmd called 3 returned 100% blocks executed 100% - 3: 1033:{ - 3: 1034: uint16 ExpectedLength = sizeof(LC_ResetAPStats_t); - 3: 1035: LC_ResetAPStats_t *CmdPtr; - 3: 1036: uint32 TableIndex; - 3: 1037: boolean CmdSuccess = FALSE; - -: 1038: - -: 1039: /* - -: 1040: ** Verify message packet length - -: 1041: */ - 3: 1042: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 1043: { - 3: 1044: CmdPtr = ((LC_ResetAPStats_t *)MessagePtr); - -: 1045: - 3: 1046: if ((CmdPtr -> APNumber) == LC_ALL_ACTIONPOINTS) - -: 1047: { - -: 1048: /* - -: 1049: ** Clear actionpoint statistics for all actionpoints - -: 1050: ** We leave the current state and action result variables as they are - -: 1051: */ - 177: 1052: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) - -: 1053: { - 176: 1054: LC_OperData.ARTPtr[TableIndex].FailToPassCount = 0; - 176: 1055: LC_OperData.ARTPtr[TableIndex].PassToFailCount = 0; - 176: 1056: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount = 0; - 176: 1057: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount = 0; - 176: 1058: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount = 0; - -: 1059: } - -: 1060: - -: 1061: /* - -: 1062: ** Set flag that we succeeded - -: 1063: */ - 1: 1064: CmdSuccess = TRUE; - -: 1065: } - -: 1066: else - -: 1067: { - 2: 1068: if ((CmdPtr -> APNumber) < LC_MAX_ACTIONPOINTS) - -: 1069: { - 1: 1070: TableIndex = CmdPtr -> APNumber; - -: 1071: - -: 1072: /* - -: 1073: ** Clear statistics for just a single actionpoint - -: 1074: */ - 1: 1075: LC_OperData.ARTPtr[TableIndex].FailToPassCount = 0; - 1: 1076: LC_OperData.ARTPtr[TableIndex].PassToFailCount = 0; - 1: 1077: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount = 0; - 1: 1078: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount = 0; - 1: 1079: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount = 0; - -: 1080: - 1: 1081: CmdSuccess = TRUE; - -: 1082: } - -: 1083: else - -: 1084: { - -: 1085: /* - -: 1086: ** Actionpoint number is out of range - -: 1087: ** (it's zero based, since it's a table index) - -: 1088: */ - 1: 1089: CFE_EVS_SendEvent(LC_APSTATS_APNUM_ERR_EID, CFE_EVS_ERROR, - -: 1090: "Reset AP stats error: invalid AP number = %d", - -: 1091: CmdPtr -> APNumber); - -: 1092: - 1: 1093: LC_AppData.CmdErrCount++; - -: 1094: } - -: 1095: } - -: 1096: - -: 1097: /* - -: 1098: ** Update the command counter and send out event if command - -: 1099: ** executed - -: 1100: */ - 3: 1101: if (CmdSuccess == TRUE) - -: 1102: { - 2: 1103: LC_AppData.CmdCount++; - -: 1104: - 2: 1105: CFE_EVS_SendEvent(LC_APSTATS_INF_EID, CFE_EVS_INFORMATION, - -: 1106: "Reset AP stats command: AP = %d", - -: 1107: CmdPtr -> APNumber); - -: 1108: } - -: 1109: - -: 1110: } /* end LC_VerifyMsgLength if */ - -: 1111: - 3: 1112: return; - -: 1113: - -: 1114:} /* end LC_ResetAPStatsCmd */ - -: 1115: - -: 1116:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1117:/* */ - -: 1118:/* Reset watchpoint statistics command */ - -: 1119:/* */ - -: 1120:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1121:void LC_ResetWPStatsCmd(CFE_SB_MsgPtr_t MessagePtr) -function LC_ResetWPStatsCmd called 3 returned 100% blocks executed 100% - 3: 1122:{ - 3: 1123: uint16 ExpectedLength = sizeof(LC_ResetWPStats_t); - 3: 1124: LC_ResetWPStats_t *CmdPtr; - 3: 1125: uint32 TableIndex; - 3: 1126: boolean CmdSuccess = FALSE; - -: 1127: - -: 1128: /* - -: 1129: ** Verify message packet length - -: 1130: */ - 3: 1131: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 1132: { - 3: 1133: CmdPtr = ((LC_ResetWPStats_t *)MessagePtr); - -: 1134: - 3: 1135: if ((CmdPtr -> WPNumber) == LC_ALL_WATCHPOINTS) - -: 1136: { - -: 1137: /* - -: 1138: ** Clear watchpoint statistics for all watchpoints - -: 1139: ** We leave the comparison result variable as it is - -: 1140: */ - 177: 1141: for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++) - -: 1142: { - 176: 1143: LC_OperData.WRTPtr[TableIndex].EvaluationCount = 0; - 176: 1144: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount = 0; - 176: 1145: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount = 0; - 176: 1146: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount = 0; - -: 1147: - 176: 1148: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value = 0; - 176: 1149: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds = 0; - 176: 1150: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds = 0; - -: 1151: - 176: 1152: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value = 0; - 176: 1153: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds = 0; - 176: 1154: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds = 0; - -: 1155: } - -: 1156: - -: 1157: /* - -: 1158: ** Set flag that we succeeded - -: 1159: */ - 1: 1160: CmdSuccess = TRUE; - -: 1161: } - -: 1162: else - -: 1163: { - 2: 1164: if ((CmdPtr -> WPNumber) < LC_MAX_WATCHPOINTS) - -: 1165: { - 1: 1166: TableIndex = CmdPtr -> WPNumber; - -: 1167: - -: 1168: /* - -: 1169: ** Clear statistics for just a single watchpoint - -: 1170: */ - 1: 1171: LC_OperData.WRTPtr[TableIndex].EvaluationCount = 0; - 1: 1172: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount = 0; - 1: 1173: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount = 0; - 1: 1174: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount = 0; - -: 1175: - 1: 1176: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value = 0; - 1: 1177: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds = 0; - 1: 1178: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds = 0; - -: 1179: - 1: 1180: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value = 0; - 1: 1181: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds = 0; - 1: 1182: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds = 0; - -: 1183: - 1: 1184: CmdSuccess = TRUE; - -: 1185: } - -: 1186: else - -: 1187: { - -: 1188: /* - -: 1189: ** Watchpoint number is out of range - -: 1190: ** (it's zero based, since it's a table index) - -: 1191: */ - 1: 1192: CFE_EVS_SendEvent(LC_WPSTATS_WPNUM_ERR_EID, CFE_EVS_ERROR, - -: 1193: "Reset WP stats error: invalid WP number = %d", - -: 1194: CmdPtr -> WPNumber); - -: 1195: - 1: 1196: LC_AppData.CmdErrCount++; - -: 1197: } - -: 1198: } - -: 1199: - -: 1200: /* - -: 1201: ** Update the command counter and send out event if command - -: 1202: ** executed - -: 1203: */ - 3: 1204: if (CmdSuccess == TRUE) - -: 1205: { - 2: 1206: LC_AppData.CmdCount++; - -: 1207: - 2: 1208: CFE_EVS_SendEvent(LC_WPSTATS_INF_EID, CFE_EVS_INFORMATION, - -: 1209: "Reset WP stats command: WP = %d", - -: 1210: CmdPtr -> WPNumber); - -: 1211: } - -: 1212: - -: 1213: } /* end LC_VerifyMsgLength if */ - -: 1214: - 3: 1215: return; - -: 1216: - -: 1217:} /* end LC_ResetWPStatsCmd */ - -: 1218: - -: 1219:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1220:/* */ - -: 1221:/* Verify message packet length */ - -: 1222:/* */ - -: 1223:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1224:boolean LC_VerifyMsgLength(CFE_SB_MsgPtr_t msg, - -: 1225: uint16 ExpectedLength) -function LC_VerifyMsgLength called 67 returned 100% blocks executed 100% - 67: 1226:{ - 67: 1227: boolean result = TRUE; - 67: 1228: uint16 CommandCode; - 67: 1229: uint16 ActualLength; - 67: 1230: CFE_SB_MsgId_t MessageID; - -: 1231: - -: 1232: /* - -: 1233: ** Verify the message packet length... - -: 1234: */ - 67: 1235: ActualLength = CFE_SB_GetTotalMsgLength(msg); - 67: 1236: if (ExpectedLength != ActualLength) - -: 1237: { - 7: 1238: MessageID = CFE_SB_GetMsgId(msg); - 7: 1239: CommandCode = CFE_SB_GetCmdCode(msg); - -: 1240: - 7: 1241: if (MessageID == LC_SEND_HK_MID) - -: 1242: { - -: 1243: /* - -: 1244: ** For a bad HK request, just send the event. We only increment - -: 1245: ** the error counter for ground commands and not internal messages. - -: 1246: */ - 1: 1247: CFE_EVS_SendEvent(LC_HKREQ_LEN_ERR_EID, CFE_EVS_ERROR, - -: 1248: "Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d", - -: 1249: MessageID, CommandCode, ActualLength, ExpectedLength); - -: 1250: } - 6: 1251: else if (MessageID == LC_SAMPLE_AP_MID) - -: 1252: { - -: 1253: /* - -: 1254: ** Same thing as previous for a bad actionpoint sample request - -: 1255: */ - 1: 1256: CFE_EVS_SendEvent(LC_APSAMPLE_LEN_ERR_EID, CFE_EVS_ERROR, - -: 1257: "Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d", - -: 1258: MessageID, CommandCode, ActualLength, ExpectedLength); - -: 1259: } - -: 1260: else - -: 1261: { - -: 1262: /* - -: 1263: ** All other cases, increment error counter - -: 1264: */ - 5: 1265: CFE_EVS_SendEvent(LC_LEN_ERR_EID, CFE_EVS_ERROR, - -: 1266: "Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d", - -: 1267: MessageID, CommandCode, ActualLength, ExpectedLength); - 5: 1268: LC_AppData.CmdErrCount++; - -: 1269: } - -: 1270: - 7: 1271: result = FALSE; - -: 1272: } - -: 1273: - 67: 1274: return(result); - -: 1275: - -: 1276:} /* End of LC_VerifyMsgLength */ - -: 1277: - -: 1278:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1279:/* */ - -: 1280:/* Acquire table pointers and process definition table updates */ - -: 1281:/* if needed */ - -: 1282:/* */ - -: 1283:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1284:int32 LC_AcquirePointers(boolean ResetStats) -function LC_AcquirePointers called 34 returned 100% blocks executed 77% - 34: 1285:{ - 34: 1286: int32 Status; - -: 1287: - -: 1288: /* - -: 1289: ** Let cFE manage the definition tables (load or dump)... - -: 1290: */ - 34: 1291: CFE_TBL_Manage(LC_OperData.WDTHandle); - 34: 1292: CFE_TBL_Manage(LC_OperData.ADTHandle); - -: 1293: - -: 1294: /* - -: 1295: ** Check for and handle any pending dump request for the - -: 1296: ** (dump only) watchpoint results table - -: 1297: */ - 34: 1298: Status = CFE_TBL_GetStatus(LC_OperData.WRTHandle); - -: 1299: - 34: 1300: if (Status == CFE_TBL_INFO_DUMP_PENDING) - -: 1301: { - #####: 1302: Status = CFE_TBL_DumpToBuffer(LC_OperData.WRTHandle); - -: 1303: - -: 1304: /* - -: 1305: ** Change warning results to indicate success - -: 1306: */ - #####: 1307: if (Status >= CFE_SUCCESS) - -: 1308: { - #####: 1309: Status = CFE_SUCCESS; - -: 1310: } - -: 1311: else - -: 1312: { - #####: 1313: CFE_EVS_SendEvent(LC_WRT_DUMPBUF_ERR_EID, CFE_EVS_ERROR, - -: 1314: "Error dumping WRT to buffer, RC=0x%08X", - -: 1315: Status); - -: 1316: } - -: 1317: } - -: 1318: else - -: 1319: { - 34: 1320: if (Status >= CFE_SUCCESS) - -: 1321: { - 31: 1322: Status = CFE_SUCCESS; - -: 1323: } - -: 1324: else - -: 1325: { - 3: 1326: CFE_EVS_SendEvent(LC_WRT_GETSTAT_ERR_EID, CFE_EVS_ERROR, - -: 1327: "Error getting WRT status, RC=0x%08X", - -: 1328: Status); - -: 1329: } - -: 1330: } - -: 1331: - -: 1332: /* - -: 1333: ** Check for and handle any pending dump request for the - -: 1334: ** (dump only) actionpoint results table - -: 1335: */ - 34: 1336: if (Status == CFE_SUCCESS) - -: 1337: { - 31: 1338: Status = CFE_TBL_GetStatus(LC_OperData.ARTHandle); - -: 1339: - 31: 1340: if (Status == CFE_TBL_INFO_DUMP_PENDING) - -: 1341: { - #####: 1342: Status = CFE_TBL_DumpToBuffer(LC_OperData.ARTHandle); - -: 1343: - -: 1344: /* - -: 1345: ** Change warning results to indicate success - -: 1346: */ - #####: 1347: if (Status >= CFE_SUCCESS) - -: 1348: { - #####: 1349: Status = CFE_SUCCESS; - -: 1350: } - -: 1351: else - -: 1352: { - #####: 1353: CFE_EVS_SendEvent(LC_ART_DUMPBUF_ERR_EID, CFE_EVS_ERROR, - -: 1354: "Error dumping ART to buffer, RC=0x%08X", - -: 1355: Status); - -: 1356: } - -: 1357: } - -: 1358: else - -: 1359: { - 31: 1360: if (Status >= CFE_SUCCESS) - -: 1361: { - 31: 1362: Status = CFE_SUCCESS; - -: 1363: } - -: 1364: else - -: 1365: { - #####: 1366: CFE_EVS_SendEvent(LC_ART_GETSTAT_ERR_EID, CFE_EVS_ERROR, - -: 1367: "Error getting ART status, RC=0x%08X", - -: 1368: Status); - -: 1369: } - -: 1370: } - -: 1371: } - -: 1372: - -: 1373: /* - -: 1374: ** Get the watchpoint results table pointer - -: 1375: */ - 34: 1376: if (Status == CFE_SUCCESS) - -: 1377: { - 31: 1378: Status = CFE_TBL_GetAddress((void *)&LC_OperData.WRTPtr, - -: 1379: LC_OperData.WRTHandle); - -: 1380: - -: 1381: /* - -: 1382: ** Change warning results to indicate success - -: 1383: */ - 31: 1384: if (Status >= CFE_SUCCESS) - -: 1385: { - 30: 1386: Status = CFE_SUCCESS; - -: 1387: } - -: 1388: else - -: 1389: { - 1: 1390: CFE_EVS_SendEvent(LC_WRT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 1391: "Error getting WRT address, RC=0x%08X", - -: 1392: Status); - -: 1393: } - -: 1394: } - -: 1395: - -: 1396: /* - -: 1397: ** Get the actionpoint results table pointer - -: 1398: */ - 34: 1399: if (Status == CFE_SUCCESS) - -: 1400: { - 30: 1401: Status = CFE_TBL_GetAddress((void *)&LC_OperData.ARTPtr, - -: 1402: LC_OperData.ARTHandle); - -: 1403: - 30: 1404: if (Status >= CFE_SUCCESS) - -: 1405: { - 29: 1406: Status = CFE_SUCCESS; - -: 1407: } - -: 1408: else - -: 1409: { - 1: 1410: CFE_EVS_SendEvent(LC_WRT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 1411: "Error getting ART address, RC=0x%08X", - -: 1412: Status); - -: 1413: } - -: 1414: } - -: 1415: - -: 1416: /* - -: 1417: ** Get a pointer to the watchpoint definition table... - -: 1418: */ - 34: 1419: if (Status == CFE_SUCCESS) - -: 1420: { - 29: 1421: Status = CFE_TBL_GetAddress((void *)&LC_OperData.WDTPtr, - -: 1422: LC_OperData.WDTHandle); - -: 1423: /* - -: 1424: ** Check for an update to the watchpoint definition table... - -: 1425: */ - 29: 1426: if (Status == CFE_TBL_INFO_UPDATED) - -: 1427: { - 2: 1428: LC_WDTUpdated(ResetStats); - -: 1429: } - -: 1430: - 29: 1431: if (Status >= CFE_SUCCESS) - -: 1432: { - 28: 1433: Status = CFE_SUCCESS; - -: 1434: } - -: 1435: else - -: 1436: { - 1: 1437: CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 1438: "Error getting WDT address, RC=0x%08X", - -: 1439: Status); - -: 1440: } - -: 1441: } - -: 1442: - -: 1443: /* - -: 1444: ** Get a pointer to the actionpoint definition table... - -: 1445: */ - 34: 1446: if (Status == CFE_SUCCESS) - -: 1447: { - 28: 1448: Status = CFE_TBL_GetAddress((void *)&LC_OperData.ADTPtr, - -: 1449: LC_OperData.ADTHandle); - -: 1450: /* - -: 1451: ** Check for an update to the actionpoint definition table... - -: 1452: */ - 28: 1453: if (Status == CFE_TBL_INFO_UPDATED) - -: 1454: { - 3: 1455: LC_ADTUpdated(ResetStats); - -: 1456: } - -: 1457: - 28: 1458: if (Status >= CFE_SUCCESS) - -: 1459: { - 27: 1460: Status = CFE_SUCCESS; - -: 1461: } - -: 1462: else - -: 1463: { - 1: 1464: CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 1465: "Error getting ADT address, RC=0x%08X", - -: 1466: Status); - -: 1467: } - -: 1468: } - -: 1469: - 34: 1470: return (Status); - -: 1471: - -: 1472:} /* end LC_AcquirePointers */ - -: 1473: - -: 1474:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1475:/* */ - -: 1476:/* Handle a Watchpoint Definition Table (WDT) update */ - -: 1477:/* */ - -: 1478:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1479:void LC_WDTUpdated(boolean ResetResultsTable) -function LC_WDTUpdated called 2 returned 100% blocks executed 100% - 2: 1480:{ - 2: 1481: int32 Status; - 2: 1482: uint16 MessageID; - 2: 1483: int32 TableIndex; - 2: 1484: int32 ListIndex; - -: 1485: - -: 1486: /* - -: 1487: ** We need to check this flag because if we restored - -: 1488: ** the results tables from the CDS on startup, we don't want - -: 1489: ** to clear them (which is what we normally do) - -: 1490: */ - 2: 1491: if (ResetResultsTable == TRUE) - -: 1492: { - 354: 1493: for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++) - -: 1494: { - -: 1495: /* - -: 1496: ** Clear watchpoint statistics - -: 1497: ** We also need to reinitialize the comparison result - -: 1498: ** variable after a definition table update - -: 1499: */ - 352: 1500: LC_OperData.WRTPtr[TableIndex].WatchResult = LC_WATCH_NOT_MEASURED; - -: 1501: - 352: 1502: LC_OperData.WRTPtr[TableIndex].EvaluationCount = 0; - 352: 1503: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount = 0; - 352: 1504: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount = 0; - 352: 1505: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount = 0; - -: 1506: - 352: 1507: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value = 0; - 352: 1508: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds = 0; - 352: 1509: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds = 0; - -: 1510: - 352: 1511: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value = 0; - 352: 1512: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds = 0; - 352: 1513: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds = 0; - -: 1514: } - -: 1515: } - -: 1516: - -: 1517: /* - -: 1518: ** Un-subscribe to message IDs referenced in old watch definition table... - -: 1519: */ - 12: 1520: for (ListIndex = 0; ListIndex < LC_OperData.SubMsgCount; ListIndex++) - -: 1521: { - 10: 1522: Status = CFE_SB_Unsubscribe(LC_OperData.SubMsgList[ListIndex], LC_OperData.CmdPipe); - -: 1523: - 10: 1524: if (Status != CFE_SUCCESS) - -: 1525: { - 5: 1526: CFE_EVS_SendEvent(LC_UNSUB_WP_ERR_EID, CFE_EVS_ERROR, - -: 1527: "Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X", - -: 1528: LC_OperData.SubMsgList[ListIndex], Status); - -: 1529: } - -: 1530: - -: 1531: /* - -: 1532: ** Even if we got an error clear out the entry in our subscription list, - -: 1533: ** because we need to rebuild it below - -: 1534: */ - 10: 1535: LC_OperData.SubMsgList[ListIndex] = 0; - -: 1536: } - -: 1537: - -: 1538: /* - -: 1539: ** Clear the subscribed message and defined watchpoint count - -: 1540: */ - 2: 1541: LC_OperData.SubMsgCount = 0; - 2: 1542: LC_OperData.WPsInUse = 0; - -: 1543: - -: 1544: /* - -: 1545: ** Process new watchpoint definition table... - -: 1546: */ - 354: 1547: for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++) - -: 1548: { - 352: 1549: MessageID = LC_OperData.WDTPtr[TableIndex].MessageID; - -: 1550: - -: 1551: /* - -: 1552: ** Skip watchpoints that are unused - -: 1553: */ - 352: 1554: if (LC_OperData.WDTPtr[TableIndex].DataType != LC_WATCH_NOT_USED) - -: 1555: { - 10: 1556: LC_OperData.WPsInUse++; /* This count gets reported in HK */ - -: 1557: - -: 1558: /* - -: 1559: ** Search for packet in subscription list... - -: 1560: */ - 17: 1561: for (ListIndex = 0; ListIndex < LC_OperData.SubMsgCount; ListIndex++) - -: 1562: { - 9: 1563: if (LC_OperData.SubMsgList[ListIndex] == MessageID) - -: 1564: { - 2: 1565: break; - -: 1566: } - -: 1567: } - -: 1568: - -: 1569: /* - -: 1570: ** Subscribe to packet (if not already in subscription list)... - -: 1571: */ - 10: 1572: if (ListIndex == LC_OperData.SubMsgCount) - -: 1573: { - 8: 1574: Status = CFE_SB_Subscribe(MessageID, LC_OperData.CmdPipe); - -: 1575: - -: 1576: /* - -: 1577: ** Update subscription list... - -: 1578: */ - 8: 1579: if (Status == CFE_SUCCESS) - -: 1580: { - 3: 1581: LC_OperData.SubMsgList[ListIndex] = MessageID; - 3: 1582: LC_OperData.SubMsgCount++; - -: 1583: } - -: 1584: else - -: 1585: { - 5: 1586: CFE_EVS_SendEvent(LC_SUB_WP_ERR_EID, CFE_EVS_ERROR, - -: 1587: "Error subscribing watchpoint: MID=0x%04X, RC=0x%08X", - -: 1588: MessageID, Status); - -: 1589: } - -: 1590: } - -: 1591: - -: 1592: } /* end LC_WATCH_NOT_USED if */ - -: 1593: - -: 1594: } /* end LC_MAX_WATCHPOINTS for */ - -: 1595: - 2: 1596: return; - -: 1597: - -: 1598:} /* end LC_WDTUpdated */ - -: 1599: - -: 1600:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1601:/* */ - -: 1602:/* Handle an Actionpoint Definition Table (ADT) update */ - -: 1603:/* */ - -: 1604:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1605:void LC_ADTUpdated(boolean ResetResultsTable) -function LC_ADTUpdated called 3 returned 100% blocks executed 100% - 3: 1606:{ - 3: 1607: uint32 TableIndex; - -: 1608: - -: 1609: /* - -: 1610: ** We need to check this flag because if we restored - -: 1611: ** the results tables from the CDS on startup, we don't want - -: 1612: ** to clear them (which is what we normally do) - -: 1613: */ - 3: 1614: if (ResetResultsTable == TRUE) - -: 1615: { - -: 1616: /* - -: 1617: ** Clear actionpoint statistics - -: 1618: ** We also need to reinitialize the action result and current state - -: 1619: ** variables after a definition table update - -: 1620: */ - 531: 1621: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) - -: 1622: { - 528: 1623: LC_OperData.ARTPtr[TableIndex].ActionResult = LC_ACTION_NOT_MEASURED; - 528: 1624: LC_OperData.ARTPtr[TableIndex].CurrentState = - -: 1625: LC_OperData.ADTPtr[TableIndex].DefaultState; - -: 1626: - 528: 1627: LC_OperData.ARTPtr[TableIndex].FailToPassCount = 0; - 528: 1628: LC_OperData.ARTPtr[TableIndex].PassToFailCount = 0; - 528: 1629: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount = 0; - 528: 1630: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount = 0; - 528: 1631: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount = 0; - -: 1632: } - -: 1633: } - -: 1634: - 3: 1635: return; - -: 1636: - -: 1637:} /* end LC_ADTUpdated */ - -: 1638: - -: 1639:/************************/ - -: 1640:/* End of File Comment */ - -: 1641:/************************/ diff --git a/fsw/unit_test/output_CDS/lc_custom.c.gcov b/fsw/unit_test/output_CDS/lc_custom.c.gcov deleted file mode 100644 index cb30c6b..0000000 --- a/fsw/unit_test/output_CDS/lc_custom.c.gcov +++ /dev/null @@ -1,126 +0,0 @@ - -: 0:Source:../src/lc_custom.c - -: 0:Graph:lc_custom.gcno - -: 0:Data:lc_custom.gcda - -: 0:Runs:1 - -: 0:Programs:1 - -: 1:/************************************************************************* - -: 2:** File: - -: 3:** $Id: lc_custom.c.gcov 1.1 2012/07/31 16:53:46EDT nschweis Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** CFS Limit Checker (LC) mission specific code, including the - -: 7:** custom function template. - -: 8:** - -: 9:** $Log: lc_custom.c.gcov $ - -: 9:** Revision 1.1 2012/07/31 16:53:46EDT nschweis - -: 9:** Initial revision - -: 9:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/output_CDS/project.pj - -: 9:** Revision 1.1 2009/01/15 15:26:28EST dahardis - -: 9:** Initial revision - -: 9:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/output_CDS/project.pj - -: 10:** Revision 1.2 2008/12/03 13:59:43EST dahardis - -: 11:** Corrections from peer code review - -: 12:** Revision 1.1 2008/10/29 14:19:08EDT dahardison - -: 13:** Initial revision - -: 14:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 15:** - -: 16:*************************************************************************/ - -: 17: - -: 18:/************************************************************************* - -: 19:** Includes - -: 20:*************************************************************************/ - -: 21:#include "lc_custom.h" - -: 22:#include "lc_tbldefs.h" - -: 23:#include "lc_events.h" - -: 24:#include "lc_mission_cfg.h" - -: 25: - -: 26:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 27:/* */ - -: 28:/* Initiate an RTS request */ - -: 29:/* */ - -: 30:/* NOTE: For complete prolog information, see 'lc_custom.h' */ - -: 31:/* */ - -: 32:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 33:void LC_ExecuteRTS(uint16 RTSId) -function LC_ExecuteRTS called 1 returned 100% blocks executed 100% - 1: 34:{ - -: 35: /*************************************************************** - -: 36: ** This is a local declaration of the command message structure - -: 37: ** to initiate an RTS and has been placed here to allow the - -: 38: ** the LC application to be built without including headers from - -: 39: ** any other applications (like Stored Commanding). - -: 40: ** A mission may choose to remove this and use a message - -: 41: ** structure declared elsewhere instead. - -: 42: ** - -: 43: ** This also applies to the LC_RTS_REQ_MID and LC_RTS_REQ_CC - -: 44: ** constants (see lc_mission_cfg.h). - -: 45: */ - -: 46: typedef struct { - -: 47: uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; - -: 48: - -: 49: uint16 RTSId; - -: 50: uint16 Padding; - -: 51: - -: 52: } LC_RTSRequest_t; - -: 53: - 1: 54: LC_RTSRequest_t RTSRequest; - -: 55: /**************************************************************/ - -: 56: - 1: 57: CFE_SB_InitMsg((CFE_SB_Msg_t *) ((uint32) &RTSRequest), - -: 58: LC_RTS_REQ_MID, sizeof(LC_RTSRequest_t), TRUE); - -: 59: - 1: 60: CFE_SB_SetCmdCode((CFE_SB_Msg_t *) ((uint32) &RTSRequest), - -: 61: LC_RTS_REQ_CC); - -: 62: - 1: 63: RTSRequest.RTSId = RTSId; - -: 64: - 1: 65: CFE_SB_SendMsg((CFE_SB_Msg_t *) ((uint32) &RTSRequest)); - -: 66: - -: 67: return; - -: 68: - -: 69:} /* end LC_ExecuteRTS */ - -: 70: - -: 71:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 72:/* */ - -: 73:/* Mission specific custom function entry point */ - -: 74:/* */ - -: 75:/* NOTE: For complete prolog information, see 'lc_custom.h' */ - -: 76:/* */ - -: 77:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 78:uint8 LC_CustomFunction(uint16 WatchIndex, - -: 79: uint32 ProcessedWPData, - -: 80: CFE_SB_MsgPtr_t MessagePtr, - -: 81: uint32 WDTCustomFuncArg) -function LC_CustomFunction called 1 returned 100% blocks executed 100% - 1: 82:{ - 1: 83: uint8 EvalResult = LC_WATCH_FALSE; - -: 84: - -: 85: /* - -: 86: ** This function is the entry point for all watchpoints where - -: 87: ** the OperatorID in the watchpoint definition table entry - -: 88: ** is set to LC_OPER_CUSTOM. - -: 89: ** - -: 90: ** For this reason The first step would normally be to - -: 91: ** switch on the WatchIndex to figure out what watchpoint got - -: 92: ** us here. As an alternate, a mission may choose to use the - -: 93: ** WDTCustomFuncArg for this instead. - -: 94: */ - 1: 95: switch (WatchIndex) - -: 96: { - -: 97: case 0x0000: - -: 98: case 0x0001: - -: 99: default: - 1: 100: CFE_EVS_SendEvent(LC_CFCALL_ERR_EID, CFE_EVS_ERROR, - -: 101: "Unexpected LC_CustomFunction call: WP = %d", - -: 102: WatchIndex); - 1: 103: break; - -: 104: - -: 105: } /* end WatchIndex switch */ - -: 106: - 1: 107: return (EvalResult); - -: 108: - -: 109:} /* end LC_CustomFunction */ - -: 110: - -: 111:/************************/ - -: 112:/* End of File Comment */ - -: 113:/************************/ diff --git a/fsw/unit_test/output_CDS/lc_utest.exe b/fsw/unit_test/output_CDS/lc_utest.exe deleted file mode 100644 index 305232f..0000000 Binary files a/fsw/unit_test/output_CDS/lc_utest.exe and /dev/null differ diff --git a/fsw/unit_test/output_CDS/lc_utest.out b/fsw/unit_test/output_CDS/lc_utest.out deleted file mode 100644 index 7c6d247..0000000 --- a/fsw/unit_test/output_CDS/lc_utest.out +++ /dev/null @@ -1,1923 +0,0 @@ -UTF Info: Task added to Task Tbl. -SysLog:1980-001-00:00:00.00000 ES Startup: LC loaded and created -UTF Info: App added to App Tbl. - -************************************ -* Application Initialization Tests * -************************************ - -Test CFE_EVS_Register call error ---------------------------------- -UTF Info: Return value for CFE EVS Api #0 set to c2000003 -SysLog:1980-001-00:00:00.00000 LC App: Error Registering For Event Services, RC = 0xC2000003 -CRITICAL EVENT ID=1 Task terminating, err = 0xC2000003 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xC2000003 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp -UTF Info: Return code for CFE EVS Api #0 returned to default - -Test CFE_SB_CreatePipe call error ---------------------------------- -UTF Info: Return value for CFE SB Api #0 set to ca000004 -ERROR EVENT ID=5 Error Creating LC Pipe, RC=0xCA000004 -CRITICAL EVENT ID=1 Task terminating, err = 0xCA000004 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCA000004 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp -UTF Info: Return code for CFE SB Api #0 returned to default - -Test CFE_SB_Subscribe call 1 error ------------------------------------ -ERROR EVENT ID=6 Error Subscribing to HK Request, MID=0x18A5, RC=0xCA000009 -CRITICAL EVENT ID=1 Task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_SB_Subscribe call 2 error ------------------------------------ -ERROR EVENT ID=7 Error Subscribing to GND CMD, MID=0x18A4, RC=0xCA000009 -CRITICAL EVENT ID=1 Task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_SB_Subscribe call 3 error ------------------------------------ -ERROR EVENT ID=8 Error Subscribing to Sample CMD, MID=0x18A6, RC=0xCA000009 -CRITICAL EVENT ID=1 Task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - - -********************************************* -* Application Initialization With CDS Tests * -********************************************* - -UTF Info: Return value for CFE ES Api #17 set to 0 -Test CFE_TBL_Register call 1 error ------------------------------------ -ERROR EVENT ID=11 Error registering WDT, RC=0xCC000003 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_TBL_Register call 2 error ------------------------------------ -DEBUG EVENT ID=10 WDT NOT recovered from CDS -ERROR EVENT ID=14 Error registering ADT, RC=0xCC000003 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_TBL_Register call 3 error ------------------------------------ -DEBUG EVENT ID=10 WDT NOT recovered from CDS -DEBUG EVENT ID=13 ADT NOT recovered from CDS -ERROR EVENT ID=15 Error registering WRT, RC=0xCC000003 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_TBL_Register call 4 error ------------------------------------ -DEBUG EVENT ID=10 WDT NOT recovered from CDS -DEBUG EVENT ID=13 ADT NOT recovered from CDS -ERROR EVENT ID=16 Error registering ART, RC=0xCC000003 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -UTF Info: Return value for CFE TBL Api #0 set to 0 -UTF Info: Return value for CFE ES Api #16 set to c400000f -Test CFE_ES_RegisterCDS call 1 error -------------------------------------- -DEBUG EVENT ID=10 WDT NOT recovered from CDS -DEBUG EVENT ID=13 ADT NOT recovered from CDS -ERROR EVENT ID=17 Error registering WRT CDS Area, RC=0xC400000F -CRITICAL EVENT ID=1 Task terminating, err = 0xC400000F -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xC400000F -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -UTF Info: Return value for CFE ES Api #16 set to 0 -Test CFE_TBL_GetAddress call 1 error -------------------------------------- -DEBUG EVENT ID=10 WDT NOT recovered from CDS -DEBUG EVENT ID=13 ADT NOT recovered from CDS -ERROR EVENT ID=45 Error getting WRT address, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_TBL_GetAddress call 2 error -------------------------------------- -DEBUG EVENT ID=10 WDT NOT recovered from CDS -DEBUG EVENT ID=13 ADT NOT recovered from CDS -ERROR EVENT ID=46 Error getting ART address, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -UTF Info: Return value for CFE TBL Api #6 set to 0 -Test CFE_TBL_Load call 1 error -------------------------------- -DEBUG EVENT ID=10 WDT NOT recovered from CDS -DEBUG EVENT ID=13 ADT NOT recovered from CDS -INFO EVENT ID=27 WDT and ADT CDS restore NOT complete, loading defaults -ERROR EVENT ID=33 Error (RC=0xCC000001) Loading WDT with '/ram/lc_def_wdt.tbl' -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_TBL_Load call 2 error -------------------------------- -DEBUG EVENT ID=10 WDT NOT recovered from CDS -DEBUG EVENT ID=13 ADT NOT recovered from CDS -INFO EVENT ID=27 WDT and ADT CDS restore NOT complete, loading defaults -ERROR EVENT ID=34 Error (RC=0xCC000001) Loading ADT with '/ram/lc_def_adt.tbl' -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -UTF Info: Return value for CFE TBL Api #3 set to 0 -UTF Info: Return value for CFE ES Api #18 set to c4000012 -UTF Info: Return value for CFE TBL Api #10 set to 0 -UTF Info: Return value for CFE TBL Api #11 set to cc000001 -Test CFE_ES_RestoreFromCDS call 1 error -AND CFE_TBL_GetStatus call 1 error ---------------------------------------- -DEBUG EVENT ID=9 WDT recovered from CDS -DEBUG EVENT ID=12 ADT recovered from CDS -DEBUG EVENT ID=21 WRT data NOT recovered from CDS -INFO EVENT ID=28 Stats CDS restore NOT complete, resetting stats and counters -ERROR EVENT ID=82 Error getting WRT status, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -UTF Info: Return value for CFE ES Api #18 set to 0 -Test CFE_ES_RestoreFromCDS no error -AND CFE_TBL_GetStatus call 1 error ------------------------------------ -DEBUG EVENT ID=9 WDT recovered from CDS -DEBUG EVENT ID=12 ADT recovered from CDS -DEBUG EVENT ID=20 WRT data recovered from CDS -DEBUG EVENT ID=22 ART data recovered from CDS -DEBUG EVENT ID=24 Application data recovered from CDS -INFO EVENT ID=29 CDS data not saved on last exit, resetting stats and counters -ERROR EVENT ID=82 Error getting WRT status, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_ES_RestoreFromCDS no error -AND LC_AppData.CDSSavedOnExit = LC_CDS_SAVED -AND CFE_TBL_GetStatus call 1 error ---------------------------------------------- -DEBUG EVENT ID=9 WDT recovered from CDS -DEBUG EVENT ID=12 ADT recovered from CDS -DEBUG EVENT ID=20 WRT data recovered from CDS -DEBUG EVENT ID=22 ART data recovered from CDS -DEBUG EVENT ID=24 Application data recovered from CDS -INFO EVENT ID=30 CDS restore complete -ERROR EVENT ID=82 Error getting WRT status, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -UTF Info: Return value for CFE TBL Api #11 set to 0 - -*********************************** -* Application Exit With CDS Tests * -*********************************** - -UTF Info: Return value for CFE ES Api #17 set to c4000013 -Test CFE_ES_CopyToCDS call 1 error ----------------------------------- -ERROR EVENT ID=36 WRT data NOT saved to CDS on exit, RC=0xC4000013 - -UTF Info: Return value for CFE ES Api #17 set to 0 - -**************************** -* LC_AcquirePointers Tests * -**************************** - -Test CFE_TBL_GetAddress call 1 error -------------------------------------- -ERROR EVENT ID=45 Error getting WRT address, RC=0xCC000001 - -Test CFE_TBL_GetAddress call 2 error -------------------------------------- -ERROR EVENT ID=45 Error getting ART address, RC=0xCC000001 - -Test CFE_TBL_GetAddress call 3 error -------------------------------------- -ERROR EVENT ID=47 Error getting WDT address, RC=0xCC000001 - -Test CFE_TBL_GetAddress call 4 error -------------------------------------- -ERROR EVENT ID=48 Error getting ADT address, RC=0xCC000001 - -UTF Info: Return value for CFE SB Api #3 set to ca00000b -UTF Info: Return value for CFE SB Api #2 set to ca000009 -Test CFE_TBL_GetAddress call 3 table updated with subscription errors ---------------------------------------------------------------------- -ERROR EVENT ID=32 Error unsubscribing watchpoint: MID=0x0010, RC=0xCA00000B -ERROR EVENT ID=32 Error unsubscribing watchpoint: MID=0x0020, RC=0xCA00000B -ERROR EVENT ID=32 Error unsubscribing watchpoint: MID=0x0030, RC=0xCA00000B -ERROR EVENT ID=32 Error unsubscribing watchpoint: MID=0x0040, RC=0xCA00000B -ERROR EVENT ID=32 Error unsubscribing watchpoint: MID=0x0050, RC=0xCA00000B -ERROR EVENT ID=31 Error subscribing watchpoint: MID=0x0060, RC=0xCA000009 -ERROR EVENT ID=31 Error subscribing watchpoint: MID=0x0070, RC=0xCA000009 -ERROR EVENT ID=31 Error subscribing watchpoint: MID=0x0080, RC=0xCA000009 -ERROR EVENT ID=31 Error subscribing watchpoint: MID=0x0090, RC=0xCA000009 -ERROR EVENT ID=31 Error subscribing watchpoint: MID=0x00A0, RC=0xCA000009 - -UTF Info: Return value for CFE SB Api #3 set to 0 -UTF Info: Return value for CFE SB Api #2 set to 0 -Test CFE_TBL_GetAddress call 3 table updated with no errors ------------------------------------------------------------ - -UTF Info: Return code for CFE SB Api #3 returned to default -UTF Info: Return code for CFE SB Api #2 returned to default -Test CFE_TBL_GetAddress call 4 table updated ---------------------------------------------- - - -************************* -* LC Command Pipe Tests * -************************* - -UTF Info: Overwriting ES Task Table Record[0] -SysLog:1980-001-00:00:00.00000 ES Startup: LC loaded and created -UTF Info: App added to App Tbl. -UTF Info: Return value for CFE TBL Api #6 set to 0 -DEBUG EVENT ID=10 WDT NOT recovered from CDS -DEBUG EVENT ID=13 ADT NOT recovered from CDS -INFO EVENT ID=27 WDT and ADT CDS restore NOT complete, loading defaults -INFO EVENT ID=2 LC Initialized. Version 0.0.0.0 - - ***START LC SB COMMAND TESTING*** - --------------------------------- - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 0 - Command Error Count = 0 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - NOOP Command Test - ----------------- -< CMD: APID:00a4 SEQ:0 LEN:8 FC:0 PKT:18a4 c000 0001 0000 -INFO EVENT ID=3 No-op command: Version 0.0.0.0 -< CMD: APID:00a4 SEQ:0 LEN:8 FC:0 PKT:18a4 c000 0001 0000 -INFO EVENT ID=3 No-op command: Version 0.0.0.0 -< CMD: APID:00a4 SEQ:0 LEN:8 FC:0 PKT:18a4 c000 0001 0000 -INFO EVENT ID=3 No-op command: Version 0.0.0.0 -< CMD: APID:00a4 SEQ:0 LEN:8 FC:0 PKT:18a4 c000 0001 0000 -INFO EVENT ID=3 No-op command: Version 0.0.0.0 -< CMD: APID:00a4 SEQ:0 LEN:8 FC:0 PKT:18a4 c000 0001 0000 -INFO EVENT ID=3 No-op command: Version 0.0.0.0 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 5 - Command Error Count = 0 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - NOOP Command With Invalid Length Test - ------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:14 FC:0 PKT:18a4 c000 0007 0000 1234 ffff 7fff -ERROR EVENT ID=44 Invalid msg length: ID = 0x18A4, CC = 0, Len = 14, Expected = 8 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 5 - Command Error Count = 1 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Housekeeping Request With Invalid Length Test - --------------------------------------------- -< CMD: APID:00a5 SEQ:0 LEN:14 FC:0 PKT:18a5 c000 0007 0000 1234 ffff 7fff -ERROR EVENT ID=42 Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 14, Expected = 8 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 5 - Command Error Count = 1 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Reset Counters Command Test - --------------------------- -< CMD: APID:00a4 SEQ:0 LEN:8 FC:1 PKT:18a4 c000 0001 0100 -DEBUG EVENT ID=4 Reset counters command - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 0 - Command Error Count = 0 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Reset Counters Command With Invalid Length Test - ----------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:14 FC:1 PKT:18a4 c000 0007 0100 1234 ffff 7fff -ERROR EVENT ID=44 Invalid msg length: ID = 0x18A4, CC = 1, Len = 14, Expected = 8 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 0 - Command Error Count = 1 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Set LC Application State Command With Invalid Length Test - --------------------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:8 FC:2 PKT:18a4 c000 0001 0200 -ERROR EVENT ID=44 Invalid msg length: ID = 0x18A4, CC = 2, Len = 8, Expected = 12 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 0 - Command Error Count = 2 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Set LC Application State To LC_STATE_PASSIVE Command Test - --------------------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:12 FC:2 PKT:18a4 c000 0005 0200 0002 0000 -INFO EVENT ID=49 Set LC state command: new state = 2 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 1 - Command Error Count = 2 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_PASSIVE - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Set LC Application State Command With Invalid State Test - -------------------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:12 FC:2 PKT:18a4 c000 0005 0200 00ff 0000 -ERROR EVENT ID=50 Set LC state error: invalid state = 255 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 1 - Command Error Count = 3 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_PASSIVE - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Set LC Application State To LC_STATE_DISABLED Command Test - --------------------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:12 FC:2 PKT:18a4 c000 0005 0200 0003 0000 -INFO EVENT ID=49 Set LC state command: new state = 3 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 2 - Command Error Count = 3 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Set AP State Command With Invalid Length Test - --------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:8 FC:3 PKT:18a4 c000 0001 0300 -ERROR EVENT ID=44 Invalid msg length: ID = 0x18A4, CC = 3, Len = 8, Expected = 12 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 2 - Command Error Count = 4 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Set AP Permanently Off Command With Invalid Length Test - ------------------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:8 FC:4 PKT:18a4 c000 0001 0400 -ERROR EVENT ID=44 Invalid msg length: ID = 0x18A4, CC = 4, Len = 8, Expected = 12 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 2 - Command Error Count = 5 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Sample Actionpoints Request With Invalid Length Test - ---------------------------------------------------- -< CMD: APID:00a6 SEQ:0 LEN:8 FC:0 PKT:18a6 c000 0001 0000 -ERROR EVENT ID=43 Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 8, Expected = 12 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 2 - Command Error Count = 5 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Reset AP Statistics for AP 0 Command Test - ----------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:12 FC:5 PKT:18a4 c000 0005 0500 0000 0000 -INFO EVENT ID=58 Reset AP stats command: AP = 0 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 3 - Command Error Count = 5 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Reset WP Statistics for WP 0 Command Test - ----------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:12 FC:6 PKT:18a4 c000 0005 0600 0000 0000 -INFO EVENT ID=60 Reset WP stats command: WP = 0 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 4 - Command Error Count = 5 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Reset AP Statistics for all APs Command Test - -------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:12 FC:5 PKT:18a4 c000 0005 0500 ffff 0000 -INFO EVENT ID=58 Reset AP stats command: AP = 65535 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 5 - Command Error Count = 5 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Reset WP Statistics for all WPs Command Test - -------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:12 FC:6 PKT:18a4 c000 0005 0600 ffff 0000 -INFO EVENT ID=60 Reset WP stats command: WP = 65535 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 6 - Command Error Count = 5 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Reset AP Statistics With Invalid AP Number Command Test - ------------------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:12 FC:5 PKT:18a4 c000 0005 0500 0fff 0000 -ERROR EVENT ID=59 Reset AP stats error: invalid AP number = 4095 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 6 - Command Error Count = 6 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Reset WP Statistics With Invalid WP Number Command Test - ------------------------------------------------------- -< CMD: APID:00a4 SEQ:0 LEN:12 FC:6 PKT:18a4 c000 0005 0600 0fff 0000 -ERROR EVENT ID=61 Reset WP stats error: invalid WP number = 4095 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 6 - Command Error Count = 7 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Invalid Command ID Tests - ------------------------ -< CMD: APID:00a4 SEQ:0 LEN:8 FC:10 PKT:18a4 c000 0001 0a00 -ERROR EVENT ID=41 Invalid command code: ID = 0x18A4, CC = 10 -< CMD: APID:00a4 SEQ:0 LEN:8 FC:11 PKT:18a4 c000 0001 0b00 -ERROR EVENT ID=41 Invalid command code: ID = 0x18A4, CC = 11 -< CMD: APID:00a4 SEQ:0 LEN:8 FC:12 PKT:18a4 c000 0001 0c00 -ERROR EVENT ID=41 Invalid command code: ID = 0x18A4, CC = 12 -< CMD: APID:00a4 SEQ:0 LEN:8 FC:13 PKT:18a4 c000 0001 0d00 -ERROR EVENT ID=41 Invalid command code: ID = 0x18A4, CC = 13 -< CMD: APID:00a4 SEQ:0 LEN:8 FC:14 PKT:18a4 c000 0001 0e00 -ERROR EVENT ID=41 Invalid command code: ID = 0x18A4, CC = 14 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 6 - Command Error Count = 12 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - Invalid Message ID (while LC is disabled) Test - ---------------------------------------------- -< TLM: APID:00ff SEQ:0 LEN:8 PKT:00ff c000 0001 0100 - - Housekeeping Request - -------------------- -< CMD: APID:00a5 SEQ:0 LEN:8 FC:0 PKT:18a5 c000 0001 0000 - -LC HOUSEKEEPING DATA: - Command Count = 6 - Command Error Count = 12 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 0 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - - SB error\app exit test - ----------------------------------------- -UTF Info: Return value for CFE SB Api #5 set to ca000006 -< CMD: APID:00a4 SEQ:0 LEN:8 FC:0 PKT:18a4 c000 0001 0000 -CRITICAL EVENT ID=1 Task terminating, err = 0xCA000006 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCA000006 -INFO EVENT ID=35 WRT data saved to CDS on exit -INFO EVENT ID=37 ART data saved to CDS on exit -INFO EVENT ID=39 App data saved to CDS on exit -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -********************************* -* LC Housekeeping Request Tests * -********************************* - - -LC HOUSEKEEPING DATA: - Command Count = 6 - Command Error Count = 12 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 2 - Current LC State = LC_STATE_DISABLED - -Watchpoint Results: -0xFF 0xFC 0xF1 0xC6 0x1B 0x6F 0xBF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x37 0x3B 0x3F 0x33 0x73 0xB3 0xF3 0x33 -0x33 0x30 0x31 0x32 0x03 0x13 0x23 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 - -*************************** -* LC WDT Validation Tests * -*************************** - -Test WDT Validation with bad DataType -------------------------------------- -ERROR EVENT ID=76 WDT verify err: WP = 20, Err = 1, DType = 45, Oper = 255, MID = 0 -INFO EVENT ID=75 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with bad OperatorID ---------------------------------------- -ERROR EVENT ID=76 WDT verify err: WP = 20, Err = 2, DType = 6, Oper = 45, MID = 0 -INFO EVENT ID=75 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with bad MessageID --------------------------------------- -ERROR EVENT ID=76 WDT verify err: WP = 20, Err = 3, DType = 6, Oper = 3, MID = 8192 -INFO EVENT ID=75 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with floating point NAN comparison value ------------------------------------------------------------- -ERROR EVENT ID=77 WDT verify float err: WP = 20, Err = 4, ComparisonValue = 0xFFFFFFFF -INFO EVENT ID=75 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with floating point infinite comparison value ------------------------------------------------------------------ -ERROR EVENT ID=77 WDT verify float err: WP = 20, Err = 5, ComparisonValue = 0x7F800000 -INFO EVENT ID=75 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with good non-floating point entry ------------------------------------------------------- -INFO EVENT ID=75 WDT verify results: good = 1, bad = 0, unused = 175 - -Test WDT Validation with good floating point entry --------------------------------------------------- -INFO EVENT ID=75 WDT verify results: good = 1, bad = 0, unused = 175 - - -*************************** -* LC ADT Validation Tests * -*************************** - -Test ADT Validation with bad DefaultState ------------------------------------------ -ERROR EVENT ID=79 ADT verify err: AP = 30, Err = 1, State = 10, RTS = 0, FailCnt = 0, EvtType = 2 -INFO EVENT ID=78 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad RTSId ----------------------------------- -ERROR EVENT ID=79 ADT verify err: AP = 30, Err = 2, State = 1, RTS = 65521, FailCnt = 0, EvtType = 2 -INFO EVENT ID=78 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad MaxFailsBeforeRTS ----------------------------------------------- -ERROR EVENT ID=79 ADT verify err: AP = 30, Err = 3, State = 1, RTS = 20, FailCnt = 0, EvtType = 2 -INFO EVENT ID=78 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad EventType --------------------------------------- -ERROR EVENT ID=79 ADT verify err: AP = 30, Err = 4, State = 1, RTS = 20, FailCnt = 5, EvtType = 10 -INFO EVENT ID=78 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad RPN expression -LC_RPN_NOT as the first symbol -------------------------------------------- -ERROR EVENT ID=80 ADT verify RPN err: AP = 30, Index = 0, StackDepth = 0 -INFO EVENT ID=78 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad RPN expression -Missing watchpoint ID -------------------------------------------- -ERROR EVENT ID=80 ADT verify RPN err: AP = 30, Index = 1, StackDepth = 0 -INFO EVENT ID=78 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad RPN expression -Not a valid polish symbol or watchpoint ID -------------------------------------------- -ERROR EVENT ID=80 ADT verify RPN err: AP = 30, Index = 1, StackDepth = 1 -INFO EVENT ID=78 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with good entry ------------------------------------ -INFO EVENT ID=78 ADT verify results: good = 1, bad = 0, unused = 175 - - -********************************** -* LC Set Actionpoint State Tests * -********************************** - -Test set AP state command with invalid new state ------------------------------------------------- -ERROR EVENT ID=52 Set AP state error: AP = 100, Invalid new state = 100 - -Test set AP state command with invalid AP number ------------------------------------------------- -ERROR EVENT ID=54 Set AP state error: Invalid AP number = 177 - -Test set AP state command with invalid current AP state -------------------------------------------------------- -ERROR EVENT ID=53 Set AP state error: AP = 100, Invalid current AP state = 255 - -Test good set AP state command for a single AP ----------------------------------------------- -INFO EVENT ID=51 Set AP state command: AP = 100, New state = 2 - -Test good set AP state command for all APs ------------------------------------------- -INFO EVENT ID=51 Set AP state command: AP = 65535, New state = 1 - - -********************************** -* LC Set Actionpoint Off Tests * -********************************** - -Test set AP off command with invalid AP number ----------------------------------------------- -ERROR EVENT ID=56 Set AP perm off error: Invalid AP number = 177 - -Test set AP off command with invalid current AP state ------------------------------------------------------ -ERROR EVENT ID=57 Set AP perm off error, AP NOT Disabled: AP = 100, Current state = 255 - -Test good set AP off command ----------------------------- -INFO EVENT ID=55 Set AP permanently off command: AP = 100 - - -******************************* -* LC Sample Actionpoint Tests * -******************************* - -Test sample AP message with invalid AP number ---------------------------------------------- -ERROR EVENT ID=67 Sample AP error: invalid AP number = 177 - -Test sample single AP message with invalid current AP state ------------------------------------------------------------ -ERROR EVENT ID=68 Sample AP error, invalid current AP state: AP = 75, State = 255 - -Test sample all APs message ----------------------------- - -Test sample single AP message with watch not measured ------------------------------------------------------ - -Test sample single AP message with watch error ----------------------------------------------- -ERROR EVENT ID=73 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression terminated with LC_RPN_AND ------------------------------------------------------ -ERROR EVENT ID=74 AP has illegal RPN expression: AP = 75, LastOperand = 1, StackPtr = 1 -ERROR EVENT ID=73 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression terminated with LC_RPN_OR ------------------------------------------------------ -ERROR EVENT ID=74 AP has illegal RPN expression: AP = 75, LastOperand = 1, StackPtr = 1 -ERROR EVENT ID=73 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression terminated with LC_RPN_XOR ------------------------------------------------------ -ERROR EVENT ID=74 AP has illegal RPN expression: AP = 75, LastOperand = 1, StackPtr = 1 -ERROR EVENT ID=73 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression begins with LC_RPN_NOT ------------------------------------------------------ -ERROR EVENT ID=74 AP has illegal RPN expression: AP = 75, LastOperand = 0, StackPtr = 1 -ERROR EVENT ID=73 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Premature LC_RPN_EQUAL in expression ------------------------------------------------------ -ERROR EVENT ID=74 AP has illegal RPN expression: AP = 75, LastOperand = 2, StackPtr = 1 -ERROR EVENT ID=73 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression runs beyond LC_MAX_RPN_EQU_SIZE ------------------------------------------------------ -ERROR EVENT ID=74 AP has illegal RPN expression: AP = 75, LastOperand = 19, StackPtr = 20 -ERROR EVENT ID=73 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message, PASS to FAIL Transition ------------------------------------------------------ -DEBUG EVENT ID=71 AP state change from PASS to FAIL: AP = 75 -> CMD: APID:00a6 SEQ:0 LEN:12 FC:2 PKT:18a6 c000 0005 0200 0014 0000 -INFO EVENT ID=455 Test event text: AP = 75, FailCount = 1, RTS = 20 - -LC ART DATA FOR ENTRY #75: - Action Result = LC_ACTION_FAIL - Current State = LC_APSTATE_PASSIVE - Fail To Pass Count = 0 - Pass To Fail Count = 1 - Consecutive Fail Count = 1 - Cumulative Fail Count = 1 - Cumulative RTS Exec Count = 1 - - -Test sample single AP message, PASS to FAIL Transition -While LC state = LC_STATE_PASSIVE ------------------------------------------------------ -DEBUG EVENT ID=71 AP state change from PASS to FAIL: AP = 75 -DEBUG EVENT ID=69 AP failed while LC App passive: AP = 75, FailCount = 1, RTS = 20 - -LC ART DATA FOR ENTRY #75: - Action Result = LC_ACTION_FAIL - Current State = LC_APSTATE_PASSIVE - Fail To Pass Count = 0 - Pass To Fail Count = 1 - Consecutive Fail Count = 1 - Cumulative Fail Count = 1 - Cumulative RTS Exec Count = 0 - - -Test sample single AP message, PASS to FAIL Transition -While AP state = LC_APSTATE_PASSIVE ------------------------------------------------------ -DEBUG EVENT ID=71 AP state change from PASS to FAIL: AP = 75 -DEBUG EVENT ID=70 AP failed while passive: AP = 75, FailCount = 1, RTS = 20 - -LC ART DATA FOR ENTRY #75: - Action Result = LC_ACTION_FAIL - Current State = LC_APSTATE_PASSIVE - Fail To Pass Count = 0 - Pass To Fail Count = 1 - Consecutive Fail Count = 1 - Cumulative Fail Count = 1 - Cumulative RTS Exec Count = 0 - - -Test sample single AP message, FAIL to PASS Transition ------------------------------------------------------- -INFO EVENT ID=72 AP state change from FAIL to PASS: AP = 75 - -LC ART DATA FOR ENTRY #75: - Action Result = LC_ACTION_PASS - Current State = LC_APSTATE_ACTIVE - Fail To Pass Count = 1 - Pass To Fail Count = 0 - Consecutive Fail Count = 0 - Cumulative Fail Count = 0 - Cumulative RTS Exec Count = 0 - - - -*********************** -* LC Watchpoint Tests * -*********************** - -Test message with no defined watchpoints ----------------------------------------- -INFO EVENT ID=62 Msg with unreferenced message ID rcvd: ID = 0x1000 - -Test message with bad watchpoint offset -and UBYTE data type ---------------------------------------- -ERROR EVENT ID=64 WP offset error: MID = 4096, WP = 50, Offset = 100, DataSize = 1, MsgLen = 58 - -Test message with bad watchpoint offset -and UWORD data type ---------------------------------------- -ERROR EVENT ID=64 WP offset error: MID = 4096, WP = 50, Offset = 100, DataSize = 2, MsgLen = 58 - -Test message with bad watchpoint offset -and UDWORD data type ---------------------------------------- -ERROR EVENT ID=64 WP offset error: MID = 4096, WP = 50, Offset = 100, DataSize = 4, MsgLen = 58 - -Test message with bad watchpoint offset -and FLOAT data type ---------------------------------------- -ERROR EVENT ID=64 WP offset error: MID = 4096, WP = 50, Offset = 100, DataSize = 4, MsgLen = 58 - -Test message with bad watchpoint offset -and undefined data type ---------------------------------------- -ERROR EVENT ID=63 WP has undefined data type: WP = 50, DataType = 15 - -Test message with BYTE data type -LC_OPER_LE Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 1 - False To True Count = 1 - Consecutive True Count = 1 - Cumulative True Count = 1 - - Last False To True (Value) = 5 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 0 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with UBYTE data type -LC_OPER_LE Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 2 - False To True Count = 2 - Consecutive True Count = 2 - Cumulative True Count = 2 - - Last False To True (Value) = 5 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 0 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with WORD LE data type -LC_OPER_LT Operator ID, TRUE to FALSE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 3 - False To True Count = 2 - Consecutive True Count = 0 - Cumulative True Count = 2 - - Last False To True (Value) = 5 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 3968 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with WORD BE data type -LC_OPER_LT Operator ID, TRUE to FALSE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 4 - False To True Count = 2 - Consecutive True Count = 0 - Cumulative True Count = 2 - - Last False To True (Value) = 5 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 3968 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with UWORD LE data type -LC_OPER_LT Operator ID, TRUE to FALSE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 5 - False To True Count = 2 - Consecutive True Count = 0 - Cumulative True Count = 2 - - Last False To True (Value) = 5 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 3968 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with UWORD BE data type -LC_OPER_LT Operator ID, TRUE to FALSE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 6 - False To True Count = 2 - Consecutive True Count = 0 - Cumulative True Count = 2 - - Last False To True (Value) = 5 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 3968 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with DWORD LE data type -LC_OPER_EQ Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 7 - False To True Count = 3 - Consecutive True Count = 1 - Cumulative True Count = 3 - - Last False To True (Value) = 987008 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 3968 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with DWORD BE data type -LC_OPER_EQ Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 8 - False To True Count = 4 - Consecutive True Count = 2 - Cumulative True Count = 4 - - Last False To True (Value) = 987008 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 3968 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with UDWORD LE data type -LC_OPER_EQ Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 9 - False To True Count = 5 - Consecutive True Count = 3 - Cumulative True Count = 5 - - Last False To True (Value) = 987008 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 3968 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with UDWORD LE data type -LC_OPER_CUSTOM Operator ID, TRUE to FALSE transition ----------------------------------------------------- -ERROR EVENT ID=85 Unexpected LC_CustomFunction call: WP = 50 - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 10 - False To True Count = 5 - Consecutive True Count = 0 - Cumulative True Count = 5 - - Last False To True (Value) = 987008 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 987008 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with BYTE data type -LC_OPER_NE Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 11 - False To True Count = 6 - Consecutive True Count = 1 - Cumulative True Count = 6 - - Last False To True (Value) = 37 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 987008 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with UBYTE data type -LC_OPER_NE Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 12 - False To True Count = 7 - Consecutive True Count = 2 - Cumulative True Count = 7 - - Last False To True (Value) = 37 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 987008 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with BYTE data type -LC_OPER_GT Operator ID, TRUE to FALSE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 13 - False To True Count = 7 - Consecutive True Count = 0 - Cumulative True Count = 7 - - Last False To True (Value) = 37 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 37 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with UBYTE data type -LC_OPER_GT Operator ID, TRUE to FALSE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 14 - False To True Count = 7 - Consecutive True Count = 0 - Cumulative True Count = 7 - - Last False To True (Value) = 37 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 37 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with BYTE data type -LC_OPER_GE Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 15 - False To True Count = 8 - Consecutive True Count = 1 - Cumulative True Count = 8 - - Last False To True (Value) = 48 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 37 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with UBYTE data type -LC_OPER_GE Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 16 - False To True Count = 9 - Consecutive True Count = 2 - Cumulative True Count = 9 - - Last False To True (Value) = 48 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 37 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with BYTE data type, Invalid Operator ID ------------------------------------------------------ -ERROR EVENT ID=65 WP has invalid operator ID: WP = 50, OperID = 20 - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_ERROR - Evaluation Count = 17 - False To True Count = 9 - Consecutive True Count = 2 - Cumulative True Count = 9 - - Last False To True (Value) = 48 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 37 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with UBYTE data type, Invalid Operator ID ------------------------------------------------------- -ERROR EVENT ID=65 WP has invalid operator ID: WP = 50, OperID = 20 - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_ERROR - Evaluation Count = 18 - False To True Count = 9 - Consecutive True Count = 2 - Cumulative True Count = 9 - - Last False To True (Value) = 48 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 37 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with FLOAT LE data type -LC_OPER_LE Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 19 - False To True Count = 10 - Consecutive True Count = 3 - Cumulative True Count = 10 - - Last False To True (Value) = 1110769664 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 37 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with FLOAT LE data type -LC_OPER_LT Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 20 - False To True Count = 11 - Consecutive True Count = 4 - Cumulative True Count = 11 - - Last False To True (Value) = 1110769664 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 37 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with FLOAT LE data type -LC_OPER_EQ Operator ID, TRUE to FALSE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 21 - False To True Count = 11 - Consecutive True Count = 0 - Cumulative True Count = 11 - - Last False To True (Value) = 1110769664 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 1110769664 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with FLOAT LE data type -LC_OPER_NE Operator ID, FALSE to TRUE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_TRUE - Evaluation Count = 22 - False To True Count = 12 - Consecutive True Count = 1 - Cumulative True Count = 12 - - Last False To True (Value) = 1110769664 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 1110769664 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with FLOAT LE data type -LC_OPER_GT Operator ID, TRUE to FALSE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 23 - False To True Count = 12 - Consecutive True Count = 0 - Cumulative True Count = 12 - - Last False To True (Value) = 1110769664 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 1110769664 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with FLOAT LE data type -LC_OPER_GE Operator ID, TRUE to FALSE transition ------------------------------------------------- - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_FALSE - Evaluation Count = 24 - False To True Count = 12 - Consecutive True Count = 0 - Cumulative True Count = 12 - - Last False To True (Value) = 1110769664 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 1110769664 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with FLOAT LE data type -Invalid Operator ID ------------------------------------- -ERROR EVENT ID=65 WP has invalid operator ID: WP = 50, OperID = 25 - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_ERROR - Evaluation Count = 25 - False To True Count = 12 - Consecutive True Count = 0 - Cumulative True Count = 12 - - Last False To True (Value) = 1110769664 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 1110769664 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test message with FLOAT LE data type -NAN Watchpoint Data ------------------------------------------------- -ERROR EVENT ID=66 WP data value is a float NAN: WP = 50, Value = 0xFFFFFFFF - -LC WRT DATA FOR ENTRY #50: - Watch Result = LC_WATCH_ERROR - Evaluation Count = 26 - False To True Count = 12 - Consecutive True Count = 0 - Cumulative True Count = 12 - - Last False To True (Value) = 1110769664 - Last False To True (Secs) = 0 - Last False To True (SubSecs) = 0 - - Last True To False (Value) = 1110769664 - Last True To False (Secs) = 0 - Last True To False (SubSecs) = 0 - - -Test invalid data type error in LC_OperatorCompare --------------------------------------------------- -ERROR EVENT ID=63 WP has undefined data type: WP = 50, DataType = 25 - -Test invalid data type error in LC_GetSizedWPData -------------------------------------------------- -ERROR EVENT ID=63 WP has undefined data type: WP = 50, DataType = 25 - diff --git a/fsw/unit_test/output_CDS/lc_watch.c.gcov b/fsw/unit_test/output_CDS/lc_watch.c.gcov deleted file mode 100644 index c73bdff..0000000 --- a/fsw/unit_test/output_CDS/lc_watch.c.gcov +++ /dev/null @@ -1,1314 +0,0 @@ - -: 0:Source:../src/lc_watch.c - -: 0:Graph:lc_watch.gcno - -: 0:Data:lc_watch.gcda - -: 0:Runs:1 - -: 0:Programs:1 - -: 1:/************************************************************************* - -: 2:** File: - -: 3:** $Id: lc_watch.c.gcov 1.1 2012/07/31 16:53:49EDT nschweis Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** Functions used for CFS Limit Checker watchpoint processing - -: 7:** - -: 8:** $Log: lc_watch.c.gcov $ - -: 8:** Revision 1.1 2012/07/31 16:53:49EDT nschweis - -: 8:** Initial revision - -: 8:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/unit_test/output_CDS/project.pj - -: 8:** Revision 1.1 2009/01/15 15:27:22EST dahardis - -: 8:** Initial revision - -: 8:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/unit_test/output_CDS/project.pj - -: 9:** Revision 1.2 2008/12/03 13:59:46EST dahardis - -: 10:** Corrections from peer code review - -: 11:** Revision 1.1 2008/10/29 14:19:52EDT dahardison - -: 12:** Initial revision - -: 13:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 14:** - -: 15:*************************************************************************/ - -: 16: - -: 17:/************************************************************************* - -: 18:** Includes - -: 19:*************************************************************************/ - -: 20:#include "lc_app.h" - -: 21:#include "lc_events.h" - -: 22:#include "lc_custom.h" - -: 23:#include "lc_perfids.h" - -: 24: - -: 25:/************************************************************************ - -: 26:** Local Macro Definitions - -: 27:*************************************************************************/ - -: 28:/** - -: 29:** \name LC Byte Order Identifiers */ - -: 30:/** \{ */ - -: 31:#define LC_BIG_ENDIAN 1 - -: 32:#define LC_LITTLE_ENDIAN 2 - -: 33:/** \} */ - -: 34: - -: 35:/************************************************************************* - -: 36:** Local Function Prototypes - -: 37:*************************************************************************/ - -: 38:/************************************************************************/ - -: 39:/** \brief Process a single watchpoint - -: 40:** - -: 41:** \par Description - -: 42:** Support function for watchpoint processing that will - -: 43:** evaluate a single watchpoint - -: 44:** - -: 45:** \par Assumptions, External Events, and Notes: - -: 46:** None - -: 47:** - -: 48:** \param [in] WatchIndex The watchpoint number to evaluate (zero - -: 49:** based watchpoint definition table index) - -: 50:** - -: 51:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 52:** references the software bus message that - -: 53:** contains the watchpoint data - -: 54:** - -: 55:** \param [in] Timestamp A #CFE_TIME_SysTime_t timestamp to use - -: 56:** to update the watchpoint results data - -: 57:** if a state transition is detected - -: 58:** - -: 59:*************************************************************************/ - -: 60:void LC_ProcessWP(uint16 WatchIndex, - -: 61: CFE_SB_MsgPtr_t MessagePtr, - -: 62: CFE_TIME_SysTime_t Timestamp); - -: 63: - -: 64:/************************************************************************/ - -: 65:/** \brief Operator comparison - -: 66:** - -: 67:** \par Description - -: 68:** Support function for watchpoint processing that will perform - -: 69:** the watchpoint data comparison based upon the operator and - -: 70:** data type specified in the watchpoint definition table - -: 71:** - -: 72:** \par Assumptions, External Events, and Notes: - -: 73:** None - -: 74:** - -: 75:** \param [in] WatchIndex The watchpoint number to compare (zero - -: 76:** based watchpoint definition table index) - -: 77:** - -: 78:** \param [in] ProcessedWPData The watchpoint data extracted from - -: 79:** the message that it was contained - -: 80:** in. This is the data after any - -: 81:** sizing, bit-masking, and endianess - -: 82:** fixing that LC might have done - -: 83:** according to the watchpoint definition - -: 84:** - -: 85:** \returns - -: 86:** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode - -: 87:** \retstmt Return codes from #LC_SignedCompare \endcode - -: 88:** \retstmt Return codes from #LC_UnsignedCompare \endcode - -: 89:** \retstmt Return codes from #LC_FloatCompare \endcode - -: 90:** \endreturns - -: 91:** - -: 92:*************************************************************************/ - -: 93:uint8 LC_OperatorCompare(uint16 WatchIndex, - -: 94: uint32 ProcessedWPData); - -: 95: - -: 96:/************************************************************************/ - -: 97:/** \brief Signed comparison - -: 98:** - -: 99:** \par Description - -: 100:** Support function for watchpoint processing that will perform - -: 101:** a signed watchpoint data comparison based upon the operator - -: 102:** specified in the watchpoint definition table - -: 103:** - -: 104:** \par Assumptions, External Events, and Notes: - -: 105:** None - -: 106:** - -: 107:** \param [in] WatchIndex The watchpoint number to compare (zero - -: 108:** based watchpoint definition table index) - -: 109:** - -: 110:** \param [in] WPValue The watchpoint data extracted from - -: 111:** the message that it was contained - -: 112:** in. This is the data after any - -: 113:** sizing, bit-masking, and endianess - -: 114:** fixing that LC might have done - -: 115:** according to the watchpoint definition - -: 116:** - -: 117:** \param [in] CompareValue The comparison value specified in the - -: 118:** watchpoint definition table (sign - -: 119:** extended, if needed, in an int32) - -: 120:** - -: 121:** \returns - -: 122:** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode - -: 123:** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode - -: 124:** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode - -: 125:** \endreturns - -: 126:** - -: 127:*************************************************************************/ - -: 128:uint8 LC_SignedCompare(uint16 WatchIndex, - -: 129: int32 WPValue, - -: 130: int32 CompareValue); - -: 131: - -: 132:/************************************************************************/ - -: 133:/** \brief Unsigned comparison - -: 134:** - -: 135:** \par Description - -: 136:** Support function for watchpoint processing that will perform - -: 137:** an unsigned watchpoint data comparison based upon the operator - -: 138:** specified in the watchpoint definition table - -: 139:** - -: 140:** \par Assumptions, External Events, and Notes: - -: 141:** None - -: 142:** - -: 143:** \param [in] WatchIndex The watchpoint number to compare (zero - -: 144:** based watchpoint definition table index) - -: 145:** - -: 146:** \param [in] WPValue The watchpoint data extracted from - -: 147:** the message that it was contained - -: 148:** in. This is the data after any - -: 149:** sizing, bit-masking, and endianess - -: 150:** fixing that LC might have done - -: 151:** according to the watchpoint definition - -: 152:** - -: 153:** \param [in] CompareValue The comparison value specified in the - -: 154:** watchpoint definition table (zero - -: 155:** extended, if needed, in an uint32) - -: 156:** - -: 157:** \returns - -: 158:** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode - -: 159:** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode - -: 160:** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode - -: 161:** \endreturns - -: 162:** - -: 163:*************************************************************************/ - -: 164:uint8 LC_UnsignedCompare(uint16 WatchIndex, - -: 165: uint32 WPValue, - -: 166: uint32 CompareValue); - -: 167: - -: 168:/************************************************************************/ - -: 169:/** \brief Float comparison - -: 170:** - -: 171:** \par Description - -: 172:** Support function for watchpoint processing that will perform - -: 173:** an floating point watchpoint data comparison based upon the operator - -: 174:** specified in the watchpoint definition table - -: 175:** - -: 176:** \par Assumptions, External Events, and Notes: - -: 177:** None - -: 178:** - -: 179:** \param [in] WatchIndex The watchpoint number to compare (zero - -: 180:** based watchpoint definition table index) - -: 181:** - -: 182:** \param [in] WPMultiType The watchpoint data extracted from - -: 183:** the message that it was contained - -: 184:** in. Stored in a multi-type union. - -: 185:** This is the data after any sizing, - -: 186:** bit-masking, and endianess fixing - -: 187:** that LC might have done according - -: 188:** to the watchpoint definition - -: 189:** - -: 190:** \param [in] CompareMultiType The comparison value specified in the - -: 191:** watchpoint definition table. Stored - -: 192:** in a muti-type union so it can easily - -: 193:** be accessed as a uint32 for validity - -: 194:** checks - -: 195:** - -: 196:** \returns - -: 197:** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode - -: 198:** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode - -: 199:** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode - -: 200:** \endreturns - -: 201:** - -: 202:*************************************************************************/ - -: 203:uint8 LC_FloatCompare(uint16 WatchIndex, - -: 204: LC_MultiType_t WPMultiType, - -: 205: LC_MultiType_t CompareMultiType); - -: 206: - -: 207:/************************************************************************/ - -: 208:/** \brief Watchpoint offset valid - -: 209:** - -: 210:** \par Description - -: 211:** Support function for watchpoint processing that will check if - -: 212:** the watchpoint offset specified in the definition table would - -: 213:** extend past the message that contains the watchpoint data - -: 214:** - -: 215:** \par Assumptions, External Events, and Notes: - -: 216:** None - -: 217:** - -: 218:** \param [in] WatchIndex The watchpoint number to check (zero - -: 219:** based watchpoint definition table index) - -: 220:** - -: 221:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 222:** references the software bus message that - -: 223:** contains the watchpoint data - -: 224:** - -: 225:** \returns - -: 226:** \retstmt Returns TRUE if the offset is within the message size \endcode - -: 227:** \retstmt Returns FALSE if the offset extends past message end \endcode - -: 228:** \endreturns - -: 229:** - -: 230:*************************************************************************/ - -: 231:boolean LC_WPOffsetValid(uint16 WatchIndex, - -: 232: CFE_SB_MsgPtr_t MessagePtr); - -: 233: - -: 234:/************************************************************************/ - -: 235:/** \brief Get sized data - -: 236:** - -: 237:** \par Description - -: 238:** Support function for watchpoint processing that will extract - -: 239:** the watchpoint data from a software bus message based upon the - -: 240:** data type specified in the watchpoint definition table and - -: 241:** store it in a uint32. If there are any endian differences between - -: 242:** LC and the watchpoint data, this is where it will get fixed up. - -: 243:** - -: 244:** \par Assumptions, External Events, and Notes: - -: 245:** None - -: 246:** - -: 247:** \param [in] WatchIndex The watchpoint number to extract (zero - -: 248:** based watchpoint definition table index) - -: 249:** - -: 250:** \param [in] WPDataPtr A pointer to the first byte of the - -: 251:** watchpoint data as it exists in the - -: 252:** software bus message it was received in - -: 253:** - -: 254:** \param [in] SizedDataPtr A pointer to where the extracted watchpoint - -: 255:* data should be stored - -: 256:** - -: 257:** \param [out] *SizedDataPtr Contains the extracted watchpoint data. - -: 258:** This will be set to zero on error - -: 259:** - -: 260:** \returns - -: 261:** \retstmt Returns TRUE if no error \endcode - -: 262:** \retstmt Returns FALSE if an error occurred \endcode - -: 263:** \endreturns - -: 264:** - -: 265:*************************************************************************/ - -: 266:boolean LC_GetSizedWPData(uint16 WatchIndex, - -: 267: uint8 *WPDataPtr, - -: 268: uint32 *SizedDataPtr); - -: 269: - -: 270:/************************************************************************/ - -: 271:/** \brief Check uint32 for float NAN - -: 272:** - -: 273:** \par Description - -: 274:** Utility function for watchpoint processing that will test if - -: 275:** a uint32 value would result in a NAN (not-a-number) value if - -: 276:** it was interpreted as a float. - -: 277:** - -: 278:** \par Assumptions, External Events, and Notes: - -: 279:** None - -: 280:** - -: 281:** \param [in] Data The uint32 value to check - -: 282:** - -: 283:** \returns - -: 284:** \retstmt Returns TRUE if value is a float NAN \endcode - -: 285:** \retstmt Returns FALSE if value is not a float NAN \endcode - -: 286:** \endreturns - -: 287:** - -: 288:*************************************************************************/ - -: 289:boolean LC_Uint32IsNAN(uint32 Data); - -: 290: - -: 291:/************************************************************************/ - -: 292:/** \brief Check uint32 for float infinite - -: 293:** - -: 294:** \par Description - -: 295:** Utility function for watchpoint processing that will test if - -: 296:** a uint32 value would result in an infinite value if - -: 297:** it was interpreted as a float. - -: 298:** - -: 299:** \par Assumptions, External Events, and Notes: - -: 300:** None - -: 301:** - -: 302:** \param [in] Data The uint32 value to check - -: 303:** - -: 304:** \returns - -: 305:** \retstmt Returns TRUE if value is an inifinite float \endcode - -: 306:** \retstmt Returns FALSE if value is not an inifinite float \endcode - -: 307:** \endreturns - -: 308:** - -: 309:*************************************************************************/ - -: 310:boolean LC_Uint32IsInfinite(uint32 Data); - -: 311: - -: 312:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 313:/* */ - -: 314:/* Handle a message with possible watchpoints */ - -: 315:/* */ - -: 316:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 317:void LC_CheckMsgForWPs(CFE_SB_MsgId_t MessageID, - -: 318: CFE_SB_MsgPtr_t MessagePtr) -function LC_CheckMsgForWPs called 33 returned 100% blocks executed 100% - 33: 319:{ - 33: 320: CFE_TIME_SysTime_t Timestamp; - 33: 321: uint16 WatchIndex; - 33: 322: boolean WPFound = FALSE; - -: 323: - -: 324: /* - -: 325: ** We don't do anything with possible watchpoint messages - -: 326: ** if we're disabled at the application level - -: 327: */ - 33: 328: if (LC_AppData.CurrentLCState != LC_STATE_DISABLED) - -: 329: { - -: 330: /* - -: 331: ** Get the message's timestamp, if there is none, - -: 332: ** use the current time (we need this for the results - -: 333: ** table). - -: 334: */ - 32: 335: Timestamp = CFE_SB_GetMsgTime(MessagePtr); - -: 336: - 32: 337: if ((Timestamp.Seconds == 0) && (Timestamp.Subseconds == 0)) - -: 338: { - 32: 339: Timestamp = CFE_TIME_GetTime(); - -: 340: } - -: 341: - -: 342: /* - -: 343: ** Performance Log (start time counter) - -: 344: */ - 32: 345: CFE_ES_PerfLogEntry(LC_WDT_SEARCH_PERF_ID); - -: 346: - -: 347: /* - -: 348: ** Search the watchpoint definition table for - -: 349: ** matches to this message ID - -: 350: */ - 5664: 351: for (WatchIndex = 0; WatchIndex < LC_MAX_WATCHPOINTS; WatchIndex++) - -: 352: { - 5632: 353: if ((LC_OperData.WDTPtr[WatchIndex].DataType != LC_WATCH_NOT_USED) && - -: 354: (LC_OperData.WDTPtr[WatchIndex].MessageID == MessageID)) - -: 355: { - 31: 356: WPFound = TRUE; - -: 357: - -: 358: /* - -: 359: ** Make sure the offset is okay with the recieved message - -: 360: ** length and continue if it is - -: 361: */ - 31: 362: if (LC_WPOffsetValid(WatchIndex, MessagePtr) == TRUE) - -: 363: { - 26: 364: LC_ProcessWP(WatchIndex, MessagePtr, Timestamp); - -: 365: } - -: 366: } - -: 367: - -: 368: } /* end WatchIndex for */ - -: 369: - -: 370: /* - -: 371: ** Performance Log (stop time counter) - -: 372: */ - 32: 373: CFE_ES_PerfLogExit(LC_WDT_SEARCH_PERF_ID); - -: 374: - -: 375: /* - -: 376: ** If we found one or more defined watchpoints for this message, - -: 377: ** bump the monitored message counter - -: 378: */ - 32: 379: if (WPFound == TRUE) - -: 380: { - 31: 381: LC_AppData.MonitoredMsgCount++; - -: 382: } - -: 383: else - -: 384: { - -: 385: /* - -: 386: ** We got a message with no defined watchpoints - -: 387: */ - 1: 388: CFE_EVS_SendEvent(LC_MID_INF_EID, CFE_EVS_INFORMATION, - -: 389: "Msg with unreferenced message ID rcvd: ID = 0x%04X", - -: 390: MessageID); - -: 391: } - -: 392: - -: 393: } /* end LC_STATE_DISABLED if */ - -: 394: - 33: 395: return; - -: 396: - -: 397:} /* end LC_CheckMsgForWPs */ - -: 398: - -: 399:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 400:/* */ - -: 401:/* Process a single watchpoint */ - -: 402:/* */ - -: 403:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 404:void LC_ProcessWP(uint16 WatchIndex, - -: 405: CFE_SB_MsgPtr_t MessagePtr, - -: 406: CFE_TIME_SysTime_t Timestamp) -function LC_ProcessWP called 26 returned 100% blocks executed 100% - 26: 407:{ - 26: 408: uint8 *WPDataPtr; - 26: 409: uint8 PreviousResult; - 26: 410: uint8 WPEvalResult; - 26: 411: uint32 SizedWPData; - 26: 412: uint32 MaskedWPData; - 26: 413: boolean SizedDataValid; - -: 414: - -: 415: /* - -: 416: ** Setup the pointer and get the massaged data - -: 417: */ - 26: 418: WPDataPtr = ((uint8 *)MessagePtr) + - -: 419: LC_OperData.WDTPtr[WatchIndex].WatchpointOffset; - -: 420: - 26: 421: SizedDataValid = LC_GetSizedWPData(WatchIndex, - -: 422: WPDataPtr, - -: 423: &SizedWPData); - 26: 424: if (SizedDataValid == TRUE) - -: 425: { - -: 426: /* - -: 427: ** Get the last evalution result for this watchpoint - -: 428: */ - 26: 429: PreviousResult = LC_OperData.WRTPtr[WatchIndex].WatchResult; - -: 430: - -: 431: /* - -: 432: ** Apply the defined bitmask for this watchpoint and then - -: 433: ** call the mission defined custom function or do our own - -: 434: ** relational comparison. - -: 435: */ - 26: 436: MaskedWPData = SizedWPData & LC_OperData.WDTPtr[WatchIndex].BitMask; - -: 437: - 26: 438: if (LC_OperData.WDTPtr[WatchIndex].OperatorID == LC_OPER_CUSTOM) - -: 439: { - 1: 440: WPEvalResult = LC_CustomFunction(WatchIndex, - -: 441: MaskedWPData, - -: 442: MessagePtr, - -: 443: LC_OperData.WDTPtr[WatchIndex].CustomFuncArgument); - -: 444: } - -: 445: else - -: 446: { - 25: 447: WPEvalResult = LC_OperatorCompare(WatchIndex, MaskedWPData); - -: 448: } - -: 449: - -: 450: /* - -: 451: ** Update the watch result - -: 452: */ - 26: 453: LC_OperData.WRTPtr[WatchIndex].WatchResult = WPEvalResult; - -: 454: - -: 455: /* - -: 456: ** Update the watchpoint statistics based on the evaluation - -: 457: ** result - -: 458: */ - 26: 459: LC_OperData.WRTPtr[WatchIndex].EvaluationCount++; - -: 460: - 26: 461: if (WPEvalResult == LC_WATCH_TRUE) - -: 462: { - 12: 463: LC_OperData.WRTPtr[WatchIndex].CumulativeTrueCount++; - 12: 464: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount++; - -: 465: - 12: 466: if (PreviousResult == LC_WATCH_FALSE) - -: 467: { - 12: 468: LC_OperData.WRTPtr[WatchIndex].FalseToTrueCount++; - -: 469: - 12: 470: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue - -: 471: .Value = MaskedWPData; - -: 472: - 12: 473: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue - -: 474: .Timestamp.Seconds = Timestamp.Seconds; - -: 475: - 12: 476: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue - -: 477: .Timestamp.Subseconds = Timestamp.Subseconds; - -: 478: } - -: 479: } - 14: 480: else if (WPEvalResult == LC_WATCH_FALSE) - -: 481: { - 10: 482: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount = 0; - -: 483: - 10: 484: if (PreviousResult == LC_WATCH_TRUE) - -: 485: { - 10: 486: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse - -: 487: .Value = MaskedWPData; - -: 488: - 10: 489: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse - -: 490: .Timestamp.Seconds = Timestamp.Seconds; - -: 491: - 10: 492: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse - -: 493: .Timestamp.Subseconds = Timestamp.Subseconds; - -: 494: } - -: 495: } - -: 496: - -: 497: } /* end SizedDataValid if */ - -: 498: - 26: 499: return; - -: 500: - -: 501:} /* end LC_ProcessWP */ - -: 502: - -: 503:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 504:/* */ - -: 505:/* Perform a watchpoint relational comparison */ - -: 506:/* */ - -: 507:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 508:uint8 LC_OperatorCompare(uint16 WatchIndex, - -: 509: uint32 ProcessedWPData) -function LC_OperatorCompare called 26 returned 100% blocks executed 100% - 26: 510:{ - 26: 511: uint8 EvalResult; - 26: 512: LC_MultiType_t WatchpointValue; - 26: 513: LC_MultiType_t ComparisonValue; - -: 514: - 26: 515: WatchpointValue.Unsigned32 = ProcessedWPData; - 26: 516: ComparisonValue = LC_OperData.WDTPtr[WatchIndex].ComparisonValue; - -: 517: - -: 518: /* - -: 519: ** Handle the comparison appropriately depending on the data type - -: 520: ** Any endian difference was handled when the watchpoint - -: 521: ** data was extracted from the SB message - -: 522: */ - 26: 523: switch (LC_OperData.WDTPtr[WatchIndex].DataType) - -: 524: { - -: 525: /* - -: 526: ** Signed integer types will get sign extended - -: 527: */ - -: 528: case LC_DATA_BYTE: - 5: 529: EvalResult = LC_SignedCompare(WatchIndex, - -: 530: WatchpointValue.Signed8in32.Signed8, - -: 531: ComparisonValue.Signed8in32.Signed8); - 5: 532: break; - -: 533: - -: 534: case LC_DATA_WORD_BE: - -: 535: case LC_DATA_WORD_LE: - 2: 536: EvalResult = LC_SignedCompare(WatchIndex, - -: 537: WatchpointValue.Signed16in32.Signed16, - -: 538: ComparisonValue.Signed16in32.Signed16); - 2: 539: break; - -: 540: - -: 541: case LC_DATA_DWORD_BE: - -: 542: case LC_DATA_DWORD_LE: - 2: 543: EvalResult = LC_SignedCompare(WatchIndex, - -: 544: WatchpointValue.Signed32, - -: 545: ComparisonValue.Signed32); - 2: 546: break; - -: 547: - -: 548: /* - -: 549: ** Unsigned integer types will get zero extended - -: 550: */ - -: 551: case LC_DATA_UBYTE: - 5: 552: EvalResult = LC_UnsignedCompare(WatchIndex, - -: 553: WatchpointValue.Unsigned8in32.Unsigned8, - -: 554: ComparisonValue.Unsigned8in32.Unsigned8); - 5: 555: break; - -: 556: - -: 557: case LC_DATA_UWORD_BE: - -: 558: case LC_DATA_UWORD_LE: - 2: 559: EvalResult = LC_UnsignedCompare(WatchIndex, - -: 560: WatchpointValue.Unsigned16in32.Unsigned16, - -: 561: ComparisonValue.Unsigned16in32.Unsigned16); - 2: 562: break; - -: 563: - -: 564: case LC_DATA_UDWORD_BE: - -: 565: case LC_DATA_UDWORD_LE: - 1: 566: EvalResult = LC_UnsignedCompare(WatchIndex, - -: 567: WatchpointValue.Unsigned32, - -: 568: ComparisonValue.Unsigned32); - 1: 569: break; - -: 570: - -: 571: /* - -: 572: ** Floating point values are handled separately - -: 573: */ - -: 574: case LC_DATA_FLOAT_BE: - -: 575: case LC_DATA_FLOAT_LE: - 8: 576: EvalResult = LC_FloatCompare(WatchIndex, - -: 577: WatchpointValue, - -: 578: ComparisonValue); - 8: 579: break; - -: 580: - -: 581: default: - -: 582: /* - -: 583: ** This should have been caught before now, but we'll - -: 584: ** handle it just in case we ever get here. - -: 585: */ - 1: 586: CFE_EVS_SendEvent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, - -: 587: "WP has undefined data type: WP = %d, DataType = %d", - -: 588: WatchIndex, LC_OperData.WDTPtr[WatchIndex].DataType); - -: 589: - 1: 590: EvalResult = LC_WATCH_ERROR; - 26: 591: break; - -: 592: } - -: 593: - 26: 594: return (EvalResult); - -: 595: - -: 596:} /* end LC_OperatorCompare */ - -: 597: - -: 598: - -: 599:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 600:/* */ - -: 601:/* Perform a watchpoint signed integer comparison */ - -: 602:/* */ - -: 603:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 604:uint8 LC_SignedCompare(uint16 WatchIndex, - -: 605: int32 WPValue, - -: 606: int32 CompareValue) -function LC_SignedCompare called 9 returned 100% blocks executed 100% - 9: 607:{ - 9: 608: uint8 EvalResult; - 9: 609: uint8 OperatorID; - -: 610: - 9: 611: OperatorID = LC_OperData.WDTPtr[WatchIndex].OperatorID; - -: 612: - 9: 613: switch (OperatorID) - -: 614: { - -: 615: case LC_OPER_LE: - 1: 616: EvalResult = (WPValue <= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 617: break; - -: 618: - -: 619: case LC_OPER_LT: - 2: 620: EvalResult = (WPValue < CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 2: 621: break; - -: 622: - -: 623: case LC_OPER_EQ: - 2: 624: EvalResult = (WPValue == CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 2: 625: break; - -: 626: - -: 627: case LC_OPER_NE: - 1: 628: EvalResult = (WPValue != CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 629: break; - -: 630: - -: 631: case LC_OPER_GT: - 1: 632: EvalResult = (WPValue > CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 633: break; - -: 634: - -: 635: case LC_OPER_GE: - 1: 636: EvalResult = (WPValue >= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 637: break; - -: 638: - -: 639: default: - -: 640: /* - -: 641: ** This should have been caught before now, but we'll - -: 642: ** handle it just in case we ever get here. - -: 643: */ - 1: 644: CFE_EVS_SendEvent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, - -: 645: "WP has invalid operator ID: WP = %d, OperID = %d", - -: 646: WatchIndex, OperatorID); - -: 647: - 1: 648: EvalResult = LC_WATCH_ERROR; - 9: 649: break; - -: 650: } - -: 651: - 9: 652: return (EvalResult); - -: 653: - -: 654:} /* end LC_SignedCompare */ - -: 655: - -: 656:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 657:/* */ - -: 658:/* Perform a watchpoint unsigned integer comparison */ - -: 659:/* */ - -: 660:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 661:uint8 LC_UnsignedCompare(uint16 WatchIndex, - -: 662: uint32 WPValue, - -: 663: uint32 CompareValue) -function LC_UnsignedCompare called 8 returned 100% blocks executed 100% - 8: 664:{ - 8: 665: uint8 EvalResult; - 8: 666: uint8 OperatorID; - -: 667: - 8: 668: OperatorID = LC_OperData.WDTPtr[WatchIndex].OperatorID; - -: 669: - 8: 670: switch (OperatorID) - -: 671: { - -: 672: case LC_OPER_LE: - 1: 673: EvalResult = (WPValue <= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 674: break; - -: 675: - -: 676: case LC_OPER_LT: - 2: 677: EvalResult = (WPValue < CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 2: 678: break; - -: 679: - -: 680: case LC_OPER_EQ: - 1: 681: EvalResult = (WPValue == CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 682: break; - -: 683: - -: 684: case LC_OPER_NE: - 1: 685: EvalResult = (WPValue != CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 686: break; - -: 687: - -: 688: case LC_OPER_GT: - 1: 689: EvalResult = (WPValue > CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 690: break; - -: 691: - -: 692: case LC_OPER_GE: - 1: 693: EvalResult = (WPValue >= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 694: break; - -: 695: - -: 696: default: - -: 697: /* - -: 698: ** This should have been caught before now, but we'll - -: 699: ** handle it just in case we ever get here. - -: 700: */ - 1: 701: CFE_EVS_SendEvent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, - -: 702: "WP has invalid operator ID: WP = %d, OperID = %d", - -: 703: WatchIndex, OperatorID); - -: 704: - 1: 705: EvalResult = LC_WATCH_ERROR; - 8: 706: break; - -: 707: } - -: 708: - 8: 709: return (EvalResult); - -: 710: - -: 711:} /* end LC_UnsignedCompare */ - -: 712: - -: 713:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 714:/* */ - -: 715:/* Perform a floating point number comparison */ - -: 716:/* */ - -: 717:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 718:uint8 LC_FloatCompare(uint16 WatchIndex, - -: 719: LC_MultiType_t WPMultiType, - -: 720: LC_MultiType_t CompareMultiType) -function LC_FloatCompare called 8 returned 100% blocks executed 91% - 8: 721:{ - 8: 722: uint8 EvalResult; - 8: 723: uint8 OperatorID; - 8: 724: float WPFloat; - 8: 725: float CompareFloat; - 8: 726: float Diff; - -: 727: - 8: 728: OperatorID = LC_OperData.WDTPtr[WatchIndex].OperatorID; - -: 729: - -: 730: /* - -: 731: ** Before we do any comparison, check the watchpoint value for - -: 732: ** a floating point NAN (not-a-number). NAN comparisons don't - -: 733: ** work and can generate floating point exceptions. By contrast - -: 734: ** comparisons with infinite numbers will behave as they should - -: 735: ** so we don't try to catch those (we would rather they generate - -: 736: ** watchpoint violations). - -: 737: ** - -: 738: ** The comparison (threshold) value comes from the Watchpoint - -: 739: ** Definition Table (WDT) and any weird values should get nailed - -: 740: ** during table validation. - -: 741: */ - 8: 742: if (LC_Uint32IsNAN(WPMultiType.Unsigned32) == FALSE) - -: 743: { - 7: 744: WPFloat = WPMultiType.Float32; - 7: 745: CompareFloat = CompareMultiType.Float32; - -: 746: - 7: 747: switch (OperatorID) - -: 748: { - -: 749: case LC_OPER_LE: - 1: 750: EvalResult = (WPFloat <= CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 751: break; - -: 752: - -: 753: case LC_OPER_LT: - 1: 754: EvalResult = (WPFloat < CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 755: break; - -: 756: - -: 757: case LC_OPER_EQ: - 1: 758: Diff = (WPFloat > CompareFloat) ? (WPFloat - CompareFloat) : (CompareFloat - WPFloat); - 1: 759: EvalResult = (Diff <= (float) LC_FLOAT_TOLERANCE) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 760: break; - -: 761: - -: 762: case LC_OPER_NE: - 1: 763: Diff = (WPFloat > CompareFloat) ? (WPFloat - CompareFloat) : (CompareFloat - WPFloat); - 1: 764: EvalResult = (Diff > (float) LC_FLOAT_TOLERANCE) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 765: break; - -: 766: - -: 767: case LC_OPER_GT: - 1: 768: EvalResult = (WPFloat > CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 769: break; - -: 770: - -: 771: case LC_OPER_GE: - 1: 772: EvalResult = (WPFloat >= CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 773: break; - -: 774: - -: 775: default: - -: 776: /* - -: 777: ** This should have been caught before now, but we'll - -: 778: ** handle it just in case we ever get here. - -: 779: */ - 1: 780: CFE_EVS_SendEvent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, - -: 781: "WP has invalid operator ID: WP = %d, OperID = %d", - -: 782: WatchIndex, OperatorID); - -: 783: - 1: 784: EvalResult = LC_WATCH_ERROR; - 1: 785: break; - -: 786: - -: 787: } /* end of switch */ - -: 788: - -: 789: } /* end LC_WPIsNAN if */ - -: 790: else - -: 791: { - 1: 792: CFE_EVS_SendEvent(LC_WP_NAN_ERR_EID, CFE_EVS_ERROR, - -: 793: "WP data value is a float NAN: WP = %d, Value = 0x%08X", - -: 794: WatchIndex, WPMultiType.Unsigned32); - -: 795: - 1: 796: EvalResult = LC_WATCH_ERROR; - -: 797: } - -: 798: - 8: 799: return (EvalResult); - -: 800: - -: 801:} /* end LC_FloatCompare */ - -: 802: - -: 803:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 804:/* */ - -: 805:/* Checks if a defined watchpoint offset will send us past the */ - -: 806:/* end of the received message */ - -: 807:/* */ - -: 808:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 809:boolean LC_WPOffsetValid(uint16 WatchIndex, - -: 810: CFE_SB_MsgPtr_t MessagePtr) -function LC_WPOffsetValid called 31 returned 100% blocks executed 100% - 31: 811:{ - 31: 812: uint16 MsgLength; - 31: 813: uint32 Offset; - 31: 814: uint32 NumOfDataBytes = 0; - 31: 815: boolean OffsetValid = TRUE; - 31: 816: CFE_SB_MsgId_t MessageID = 0; - -: 817: - -: 818: /* - -: 819: ** Check the message length against the watchpoint - -: 820: ** offset and data type to make sure we won't - -: 821: ** try to read past it. - -: 822: */ - 31: 823: switch (LC_OperData.WDTPtr[WatchIndex].DataType) - -: 824: { - -: 825: case LC_DATA_BYTE: - -: 826: case LC_DATA_UBYTE: - 11: 827: NumOfDataBytes = sizeof (uint8); - 11: 828: break; - -: 829: - -: 830: case LC_DATA_WORD_BE: - -: 831: case LC_DATA_WORD_LE: - -: 832: case LC_DATA_UWORD_BE: - -: 833: case LC_DATA_UWORD_LE: - 5: 834: NumOfDataBytes = sizeof (uint16); - 5: 835: break; - -: 836: - -: 837: case LC_DATA_DWORD_BE: - -: 838: case LC_DATA_DWORD_LE: - -: 839: case LC_DATA_UDWORD_BE: - -: 840: case LC_DATA_UDWORD_LE: - 5: 841: NumOfDataBytes = sizeof (uint32); - 5: 842: break; - -: 843: - -: 844: case LC_DATA_FLOAT_BE: - -: 845: case LC_DATA_FLOAT_LE: - 9: 846: NumOfDataBytes = sizeof (float); - 9: 847: break; - -: 848: - -: 849: default: - -: 850: /* - -: 851: ** This should have been caught before now, but we'll - -: 852: ** handle it just in case we ever get here. - -: 853: */ - 1: 854: CFE_EVS_SendEvent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, - -: 855: "WP has undefined data type: WP = %d, DataType = %d", - -: 856: WatchIndex, LC_OperData.WDTPtr[WatchIndex].DataType); - -: 857: - 1: 858: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; - -: 859: - 1: 860: return (FALSE); - -: 861: break; - -: 862: - -: 863: } /* end switch */ - -: 864: - 30: 865: MsgLength = CFE_SB_GetTotalMsgLength(MessagePtr); - -: 866: - 30: 867: Offset = LC_OperData.WDTPtr[WatchIndex].WatchpointOffset; - -: 868: - 30: 869: if ((Offset + NumOfDataBytes) > MsgLength) - -: 870: { - 4: 871: OffsetValid = FALSE; - -: 872: - 4: 873: MessageID = CFE_SB_GetMsgId(MessagePtr); - -: 874: - 4: 875: CFE_EVS_SendEvent(LC_WP_OFFSET_ERR_EID, CFE_EVS_ERROR, - -: 876: "WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d", - -: 877: MessageID, WatchIndex, Offset, NumOfDataBytes, MsgLength); - -: 878: - 4: 879: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; - -: 880: } - -: 881: - 30: 882: return (OffsetValid); - -: 883: - -: 884:} /* end LC_WPOffsetValid */ - -: 885: - -: 886:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 887:/* */ - -: 888:/* Get sized watchpoint data */ - -: 889:/* */ - -: 890:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 891:boolean LC_GetSizedWPData(uint16 WatchIndex, - -: 892: uint8 *WPDataPtr, - -: 893: uint32 *SizedDataPtr) -function LC_GetSizedWPData called 27 returned 100% blocks executed 79% - 27: 894:{ - 27: 895: boolean Success = TRUE; - 27: 896: uint32 uint32Data = 0; - 27: 897: uint16 uint16Data; - -: 898: - 27: 899: int32 int32Data; - 27: 900: int16 int16Data; - 27: 901: int8 int8Data; - -: 902: - 27: 903: uint8 *uint8Ptr; - 27: 904: uint8 *RawBytePtr = WPDataPtr; - -: 905: - -: 906: /* - -: 907: ** Use these OSAL compiler flags to figure out what - -: 908: ** the target's byte order is that LC was compiled for. - -: 909: ** We define these this way so if neither (or both) are - -: 910: ** defined, we'll get a build error - -: 911: */ - -: 912:#ifdef _STRUCT_HIGH_BIT_FIRST_ - -: 913: int32 OurByteOrder = LC_BIG_ENDIAN; - -: 914:#endif - -: 915: - -: 916:#ifdef _STRUCT_LOW_BIT_FIRST_ - 27: 917: int32 OurByteOrder = LC_LITTLE_ENDIAN; - -: 918:#endif - -: 919: - -: 920: /* - -: 921: ** Get the watchpoint data value (which may be on a misaligned - -: 922: ** address boundary) and put it into an unsigned 32 properly - -: 923: ** handling endian and sign extension issues - -: 924: */ - 27: 925: switch (LC_OperData.WDTPtr[WatchIndex].DataType) - -: 926: { - -: 927: case LC_DATA_BYTE: - 5: 928: int8Data = (int8) RawBytePtr[0]; - 5: 929: int32Data = (int32) int8Data; - 5: 930: uint32Data = (uint32) int32Data; - 5: 931: break; - -: 932: - -: 933: case LC_DATA_UBYTE: - 5: 934: uint32Data = (uint32) RawBytePtr[0]; - 5: 935: break; - -: 936: - -: 937: case LC_DATA_WORD_BE: - 1: 938: uint8Ptr = (uint8 *) &int16Data; - 1: 939: if (OurByteOrder == LC_BIG_ENDIAN) - -: 940: { - #####: 941: uint8Ptr[0] = RawBytePtr[0]; - #####: 942: uint8Ptr[1] = RawBytePtr[1]; - -: 943: } - -: 944: else - -: 945: { - 1: 946: uint8Ptr[0] = RawBytePtr[1]; - 1: 947: uint8Ptr[1] = RawBytePtr[0]; - -: 948: } - 1: 949: int32Data = (int32) int16Data; - 1: 950: uint32Data = (uint32) int32Data; - 1: 951: break; - -: 952: - -: 953: case LC_DATA_WORD_LE: - 1: 954: uint8Ptr = (uint8 *) &int16Data; - 1: 955: if (OurByteOrder == LC_LITTLE_ENDIAN) - -: 956: { - 1: 957: uint8Ptr[0] = RawBytePtr[0]; - 1: 958: uint8Ptr[1] = RawBytePtr[1]; - -: 959: } - -: 960: else - -: 961: { - #####: 962: uint8Ptr[0] = RawBytePtr[1]; - #####: 963: uint8Ptr[1] = RawBytePtr[0]; - -: 964: } - 1: 965: int32Data = (int32) int16Data; - 1: 966: uint32Data = (uint32) int32Data; - 1: 967: break; - -: 968: - -: 969: case LC_DATA_UWORD_BE: - 1: 970: uint8Ptr = (uint8 *) &uint16Data; - 1: 971: if (OurByteOrder == LC_BIG_ENDIAN) - -: 972: { - #####: 973: uint8Ptr[0] = RawBytePtr[0]; - #####: 974: uint8Ptr[1] = RawBytePtr[1]; - -: 975: } - -: 976: else - -: 977: { - 1: 978: uint8Ptr[0] = RawBytePtr[1]; - 1: 979: uint8Ptr[1] = RawBytePtr[0]; - -: 980: } - 1: 981: uint32Data = (uint32) uint16Data; - 1: 982: break; - -: 983: - -: 984: case LC_DATA_UWORD_LE: - 1: 985: uint8Ptr = (uint8 *) &uint16Data; - 1: 986: if (OurByteOrder == LC_LITTLE_ENDIAN) - -: 987: { - 1: 988: uint8Ptr[0] = RawBytePtr[0]; - 1: 989: uint8Ptr[1] = RawBytePtr[1]; - -: 990: } - -: 991: else - -: 992: { - #####: 993: uint8Ptr[0] = RawBytePtr[1]; - #####: 994: uint8Ptr[1] = RawBytePtr[0]; - -: 995: } - 1: 996: uint32Data = (uint32) uint16Data; - 1: 997: break; - -: 998: - -: 999: case LC_DATA_DWORD_BE: - -: 1000: case LC_DATA_UDWORD_BE: - -: 1001: case LC_DATA_FLOAT_BE: - 1: 1002: uint8Ptr = (uint8 *) &uint32Data; - 1: 1003: if (OurByteOrder == LC_BIG_ENDIAN) - -: 1004: { - #####: 1005: uint8Ptr[0] = RawBytePtr[0]; - #####: 1006: uint8Ptr[1] = RawBytePtr[1]; - #####: 1007: uint8Ptr[2] = RawBytePtr[2]; - #####: 1008: uint8Ptr[3] = RawBytePtr[3]; - -: 1009: } - -: 1010: else - -: 1011: { - 1: 1012: uint8Ptr[0] = RawBytePtr[3]; - 1: 1013: uint8Ptr[1] = RawBytePtr[2]; - 1: 1014: uint8Ptr[2] = RawBytePtr[1]; - 1: 1015: uint8Ptr[3] = RawBytePtr[0]; - -: 1016: } - 1: 1017: break; - -: 1018: - -: 1019: case LC_DATA_DWORD_LE: - -: 1020: case LC_DATA_UDWORD_LE: - -: 1021: case LC_DATA_FLOAT_LE: - 11: 1022: uint8Ptr = (uint8 *) &uint32Data; - 11: 1023: if (OurByteOrder == LC_LITTLE_ENDIAN) - -: 1024: { - 11: 1025: uint8Ptr[0] = RawBytePtr[0]; - 11: 1026: uint8Ptr[1] = RawBytePtr[1]; - 11: 1027: uint8Ptr[2] = RawBytePtr[2]; - 11: 1028: uint8Ptr[3] = RawBytePtr[3]; - -: 1029: } - -: 1030: else - -: 1031: { - #####: 1032: uint8Ptr[0] = RawBytePtr[3]; - #####: 1033: uint8Ptr[1] = RawBytePtr[2]; - #####: 1034: uint8Ptr[2] = RawBytePtr[1]; - #####: 1035: uint8Ptr[3] = RawBytePtr[0]; - -: 1036: } - #####: 1037: break; - -: 1038: - -: 1039: default: - -: 1040: /* - -: 1041: ** This should have been caught before now, but we'll - -: 1042: ** handle it just in case we ever get here. - -: 1043: */ - 1: 1044: CFE_EVS_SendEvent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, - -: 1045: "WP has undefined data type: WP = %d, DataType = %d", - -: 1046: WatchIndex, LC_OperData.WDTPtr[WatchIndex].DataType); - -: 1047: - 1: 1048: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; - -: 1049: - 1: 1050: Success = FALSE; - 27: 1051: break; - -: 1052: - -: 1053: } /* end switch */ - -: 1054: - -: 1055: /* - -: 1056: ** Set result value - -: 1057: */ - 27: 1058: *SizedDataPtr = uint32Data; - -: 1059: - -: 1060: /* - -: 1061: ** Return success flag - -: 1062: */ - 27: 1063: return (Success); - -: 1064: - -: 1065:} /* end LC_GetSizedWPData */ - -: 1066: - -: 1067:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1068:/* */ - -: 1069:/* Validate the watchpoint definition table (WDT) */ - -: 1070:/* */ - -: 1071:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1072:int32 LC_ValidateWDT(void *TableData) -function LC_ValidateWDT called 7 returned 100% blocks executed 100% - 7: 1073:{ - 7: 1074: LC_WDTEntry_t *TableArray = (LC_WDTEntry_t *) TableData; - -: 1075: - 7: 1076: int32 EntryResult = LC_WDTVAL_NO_ERR; - 7: 1077: int32 TableResult = CFE_SUCCESS; - 7: 1078: int32 TableIndex; - -: 1079: - 7: 1080: uint8 DataType; - 7: 1081: uint8 OperatorID; - 7: 1082: uint16 MessageID; - 7: 1083: uint32 CompareValue; - -: 1084: - 7: 1085: int32 GoodCount = 0; - 7: 1086: int32 BadCount = 0; - 7: 1087: int32 UnusedCount = 0; - -: 1088: - -: 1089: /* - -: 1090: ** Verify each entry in the pending watchpoint definition table - -: 1091: */ - 1239: 1092: for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) - -: 1093: { - 1232: 1094: DataType = TableArray[TableIndex].DataType; - 1232: 1095: OperatorID = TableArray[TableIndex].OperatorID; - 1232: 1096: MessageID = TableArray[TableIndex].MessageID; - 1232: 1097: CompareValue = TableArray[TableIndex].ComparisonValue.Unsigned32; - -: 1098: - 1232: 1099: if (DataType == LC_WATCH_NOT_USED) - -: 1100: { - -: 1101: /* - -: 1102: ** Unused table entry - -: 1103: */ - 1225: 1104: UnusedCount++; - -: 1105: } - 7: 1106: else if ((DataType != LC_DATA_BYTE) && - -: 1107: (DataType != LC_DATA_UBYTE) && - -: 1108: (DataType != LC_DATA_BYTE) && - -: 1109: (DataType != LC_DATA_UBYTE) && - -: 1110: (DataType != LC_DATA_WORD_BE) && - -: 1111: (DataType != LC_DATA_WORD_LE) && - -: 1112: (DataType != LC_DATA_UWORD_BE) && - -: 1113: (DataType != LC_DATA_UWORD_LE) && - -: 1114: (DataType != LC_DATA_DWORD_BE) && - -: 1115: (DataType != LC_DATA_DWORD_LE) && - -: 1116: (DataType != LC_DATA_UDWORD_BE) && - -: 1117: (DataType != LC_DATA_UDWORD_LE) && - -: 1118: (DataType != LC_DATA_FLOAT_BE) && - -: 1119: (DataType != LC_DATA_FLOAT_LE)) - -: 1120: { - -: 1121: /* - -: 1122: ** Invalid data type - -: 1123: */ - 1: 1124: BadCount++; - 1: 1125: EntryResult = LC_WDTVAL_ERR_DATATYPE; - -: 1126: } - 6: 1127: else if ((OperatorID != LC_OPER_LT) && - -: 1128: (OperatorID != LC_OPER_LT) && - -: 1129: (OperatorID != LC_OPER_LE) && - -: 1130: (OperatorID != LC_OPER_NE) && - -: 1131: (OperatorID != LC_OPER_EQ) && - -: 1132: (OperatorID != LC_OPER_GE) && - -: 1133: (OperatorID != LC_OPER_GT) && - -: 1134: (OperatorID != LC_OPER_CUSTOM)) - -: 1135: { - -: 1136: /* - -: 1137: ** Invalid operator - -: 1138: */ - 1: 1139: BadCount++; - 1: 1140: EntryResult = LC_WDTVAL_ERR_OPER; - -: 1141: } - 5: 1142: else if (MessageID > CFE_SB_HIGHEST_VALID_MSGID) - -: 1143: { - -: 1144: /* - -: 1145: ** Bad message ID (limit set by configuration parameter, - -: 1146: ** see cfe_platform_cfg.h) - -: 1147: */ - 1: 1148: BadCount++; - 1: 1149: EntryResult = LC_WDTVAL_ERR_MID; - -: 1150: } - 4: 1151: else if ((DataType == LC_DATA_FLOAT_BE) || - -: 1152: (DataType == LC_DATA_FLOAT_LE)) - -: 1153: { - -: 1154: /* - -: 1155: ** Check the floating point comparison value for - -: 1156: ** NAN (not-a-number) or infinite values - -: 1157: */ - 3: 1158: if (LC_Uint32IsNAN(CompareValue) == TRUE) - -: 1159: { - 1: 1160: BadCount++; - 1: 1161: EntryResult = LC_WDTVAL_ERR_FPNAN; - -: 1162: } - 2: 1163: else if (LC_Uint32IsInfinite(CompareValue) == TRUE) - -: 1164: { - 1: 1165: BadCount++; - 1: 1166: EntryResult = LC_WDTVAL_ERR_FPINF; - -: 1167: } - -: 1168: else - -: 1169: { - -: 1170: /* - -: 1171: ** We passed all checks for this floating point entry - -: 1172: */ - 1: 1173: GoodCount++; - -: 1174: } - -: 1175: } - -: 1176: else - -: 1177: { - -: 1178: /* - -: 1179: ** We passed all checks for this non-floating point entry - -: 1180: */ - 1: 1181: GoodCount++; - -: 1182: } - -: 1183: - -: 1184: /* - -: 1185: ** Generate detailed event for "first" error - -: 1186: */ - 1232: 1187: if ((EntryResult != LC_WDTVAL_NO_ERR) && (TableResult == CFE_SUCCESS)) - -: 1188: { - 5: 1189: if ((EntryResult == LC_WDTVAL_ERR_FPNAN) || - -: 1190: (EntryResult == LC_WDTVAL_ERR_FPINF)) - -: 1191: { - 2: 1192: CFE_EVS_SendEvent(LC_WDTVAL_FPERR_EID, CFE_EVS_ERROR, - -: 1193: "WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X", - -: 1194: TableIndex, EntryResult, CompareValue); - -: 1195: } - -: 1196: else - -: 1197: { - 3: 1198: CFE_EVS_SendEvent(LC_WDTVAL_ERR_EID, CFE_EVS_ERROR, - -: 1199: "WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d", - -: 1200: TableIndex, EntryResult, DataType, OperatorID, MessageID); - -: 1201: } - -: 1202: - 5: 1203: TableResult = EntryResult; - -: 1204: } - -: 1205: - -: 1206: } /* end TableIndex for */ - -: 1207: - -: 1208: /* - -: 1209: ** Generate informational event with error totals - -: 1210: */ - 7: 1211: CFE_EVS_SendEvent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, - -: 1212: "WDT verify results: good = %d, bad = %d, unused = %d", - -: 1213: GoodCount, BadCount, UnusedCount); - -: 1214: - 7: 1215: return(TableResult); - -: 1216: - -: 1217:} /* end LC_ValidateWDT */ - -: 1218: - -: 1219:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1220:/* */ - -: 1221:/* Test if a 32 bit integer's value would be a floating point */ - -: 1222:/* NAN (not-a-number). Assumes IEEE-754 floating point format */ - -: 1223:/* */ - -: 1224:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1225:boolean LC_Uint32IsNAN(uint32 Data) -function LC_Uint32IsNAN called 11 returned 100% blocks executed 100% - 11: 1226:{ - 11: 1227: boolean Result = FALSE; - 11: 1228: uint32 Exponent; - 11: 1229: uint32 Fraction; - -: 1230: - -: 1231: /* - -: 1232: ** Check if the exponent field is all 1's - -: 1233: */ - 11: 1234: Exponent = Data & 0x7F800000; - -: 1235: - 11: 1236: if (Exponent == 0x7F800000) - -: 1237: { - -: 1238: /* - -: 1239: ** If the fraction field is also non-zero, - -: 1240: ** it's a NAN - -: 1241: */ - 3: 1242: Fraction = Data & 0x007FFFFF; - -: 1243: - 3: 1244: if (Fraction > 0) - -: 1245: { - 2: 1246: Result = TRUE; - -: 1247: } - -: 1248: } - -: 1249: - 11: 1250: return (Result); - -: 1251: - -: 1252:} /* end LC_Uint32IsNAN */ - -: 1253: - -: 1254:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1255:/* */ - -: 1256:/* Test if a 32 bit integer's value would be an infinite */ - -: 1257:/* (positive or negative) floating point number. Assumes */ - -: 1258:/* IEEE-754 floating point format */ - -: 1259:/* */ - -: 1260:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1261:boolean LC_Uint32IsInfinite(uint32 Data) -function LC_Uint32IsInfinite called 2 returned 100% blocks executed 100% - 2: 1262:{ - 2: 1263: boolean Result = FALSE; - 2: 1264: uint32 Exponent; - 2: 1265: uint32 Fraction; - -: 1266: - -: 1267: /* - -: 1268: ** Check if the exponent field is all 1's - -: 1269: */ - 2: 1270: Exponent = Data & 0x7F800000; - -: 1271: - 2: 1272: if (Exponent == 0x7F800000) - -: 1273: { - -: 1274: /* - -: 1275: ** If the fraction field is also zero, - -: 1276: ** it's infinite - -: 1277: */ - 1: 1278: Fraction = Data & 0x007FFFFF; - -: 1279: - 1: 1280: if (Fraction == 0) - -: 1281: { - 1: 1282: Result = TRUE; - -: 1283: } - -: 1284: } - -: 1285: - 2: 1286: return (Result); - -: 1287: - -: 1288:} /* end LC_Uint32IsInfinite */ - -: 1289: - -: 1290:/************************/ - -: 1291:/* End of File Comment */ - -: 1292:/************************/ diff --git a/fsw/unit_test/output_noCDS/README_noCDS.txt b/fsw/unit_test/output_noCDS/README_noCDS.txt deleted file mode 100644 index 0eb5059..0000000 --- a/fsw/unit_test/output_noCDS/README_noCDS.txt +++ /dev/null @@ -1,97 +0,0 @@ - -README for CFS Limit Checker (LCX) unit tests run on 10/01/12 - -CDS Configuration Setting -------------------------- -#define LC_SAVE_TO_CDS commented out in lc_platform_cfg.h -This readme is for unit test output WITHOUT the CDS used during -application initialization. - -Platform --------- -MAC OS 10 using VMware installed Red Hat Linux 5 - -Supporting Software Used: -------------------------- -cFE v5.2/OSAL 2.12 with bundled UTF - -Coverage Summary ----------------- -$ gcov lc_action.c -File `../src/lc_action.c' -Lines executed:100.00% of 170 -../src/lc_action.c:creating `lc_action.c.gcov' - -$ gcov lc_app.c -File `../src/lc_app.c' -Lines executed:67.92% of 240 -../src/lc_app.c:creating `lc_app.c.gcov' - -$ gcov lc_cmds.c -File `../src/lc_cmds.c' -Lines executed:94.82% of 328 -../src/lc_cmds.c:creating `lc_cmds.c.gcov' - -$ gcov lc_custom.c -File `../src/lc_custom.c' -Lines executed:100.00% of 10 -../src/lc_custom.c:creating `lc_custom.c.gcov' - -$ gcov lc_watch.c -File `../src/lc_watch.c' -Lines executed:95.36% of 345 -../src/lc_watch.c:creating `lc_watch.c.gcov' - -Comments On Code Not Covered ----------------------------- -In the function LC_AppMain in file lc_app.c.gcov - - Lines: 305, 310, 315, 320, 322, 330, 335 - The main run loop is common code used by most applications. - - Line: 368 - This line requires that Critical Data Store (CDS) is enabled. - -In the function LC_TableInit in file lc_app.c.gcov - - Lines: 595, 612, 612, 631, 644, 649 - Lines: 651, 653, 655, 661, 663, 665 - Lines: 667, 674, 688, 690, 693, 695, 701 - These lines require that Critical Data Store (CDS) is enabled. - -In the function LC_CreateDefinitionTables in file lc_app.c.gcov - - Lines: 837-38, 871-72, 877, 883-84, 934, 936 - These lines require that Critical Data Store (CDS) is enabled. - -In the function LC_CreateTaskCDS in file lc_app.c.gcov - - Lines: all lines (38) in this function - These lines require that Critical Data Store (CDS) is enabled. - -In the function LC_LoadDefaultTables in file lc_app.c.gcov - - Lines: 1174, 1176, 1180 - These lines require that Critical Data Store (CDS) is enabled. - -In the function LC_HousekeepingCmd in file lc_cmds.c.gcov - - Lines: 737, 739 - These lines require that Critical Data Store (CDS) is enabled. - -In the function LC_UpdateTaskCDS in file lc_cmds.c.gcov - - Lines: all lines (15) in this function - These lines require that Critical Data Store (CDS) is enabled. - -In the function LC_GetSizedWPData in file lc_watch.c.gcov - - Lines: 1277-78, 1298-99, 1309-10 - Lines: 1329-30, 1341-44, 1368-71 - These tests were run on an x86 machine which is Little Endian. To - execute these lines would require execution on a big endian machine - (such as a PowerPC) that would have resulted in an alternate - set of unexecuted lines. Since we already have two sets of unit - test output based upon CDS use, it didn't seem worthwhile to add - additional ones just for these cases. - diff --git a/fsw/unit_test/output_noCDS/lc_action.c.gcov b/fsw/unit_test/output_noCDS/lc_action.c.gcov deleted file mode 100644 index a4707a5..0000000 --- a/fsw/unit_test/output_noCDS/lc_action.c.gcov +++ /dev/null @@ -1,862 +0,0 @@ - -: 0:Source:../src/lc_action.c - -: 0:Graph:lc_action.gcno - -: 0:Data:lc_action.gcda - -: 0:Runs:1 - -: 0:Programs:3 - -: 1:/************************************************************************* - -: 2:** File: - -: 3:** $Id: lc_action.c.gcov 1.1.1.1 2012/10/01 18:48:16EDT lwalling Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** Functions used for CFS Limit Checker actionpoint processing - -: 7:** - -: 8:** $Log: lc_action.c.gcov $ - -: 8:** Revision 1.1.1.1 2012/10/01 18:48:16EDT lwalling - -: 8:** Apply unit test output file updates to branch - -: 8:** Revision 1.3 2012/10/01 13:57:38PDT lwalling - -: 8:** Updates to output files after fix compile warnings - -: 9:** Revision 1.4 2012/10/01 13:20:48PDT lwalling - -: 10:** Removed unused variable Operand from function LC_EvaluateRPN() - -: 11:** Revision 1.3 2012/08/01 11:41:07PDT lwalling - -: 12:** Cleanup actionpoint operators use of STALE - -: 13:** Revision 1.2 2012/08/01 11:20:22PDT lwalling - -: 14:** Change NOT_MEASURED to STALE - -: 15:** Revision 1.1 2012/07/31 13:53:36PDT nschweis - -: 16:** Initial revision - -: 17:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj - -: 18:** Revision 1.10 2012/06/26 17:59:09EDT lwalling - -: 19:** Fix ap logic for OR and AND operators when wp result = LC_WATCH_NOT_MEASURED - -: 20:** Revision 1.9 2011/02/07 14:58:33PST lwalling - -: 21:** Modify sample AP commands to target groups of AP's - -: 22:** Revision 1.8 2011/01/19 12:45:39EST jmdagost - -: 23:** Moved two message parameters to the message IDs file for scheduler table access. - -: 24:** Revision 1.7 2011/01/19 11:35:21EST jmdagost - -: 25:** Initialize local variables RPNIndex and RPNStackDepth. - -: 26:** Revision 1.6 2010/04/12 14:29:31EDT lwalling - -: 27:** Changed bitwise RPN comparisons to logical comparisons - -: 28:** Revision 1.5 2010/02/19 17:43:54EST lwalling - -: 29:** Change state events limits to individual limits for Passive AP, FailToPass and PassToFail - -: 30:** Revision 1.4 2009/12/28 14:47:21EST lwalling - -: 31:** Add event limits, change limited events from debug to info - -: 32:** Revision 1.3 2009/01/29 15:39:03EST dahardis - -: 33:** Changed an event message from INFO to DEBUG as documented - -: 34:** in DCR #6811 - -: 35:** Revision 1.2 2008/12/03 13:59:46EST dahardis - -: 36:** Corrections from peer code review - -: 37:** Revision 1.1 2008/10/29 14:18:36EDT dahardison - -: 38:** Initial revision - -: 39:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 40:** - -: 41:*************************************************************************/ - -: 42: - -: 43:/************************************************************************* - -: 44:** Includes - -: 45:*************************************************************************/ - -: 46:#include "lc_app.h" - -: 47:#include "lc_action.h" - -: 48:#include "lc_msgids.h" - -: 49:#include "lc_events.h" - -: 50:#include "lc_custom.h" - -: 51: - -: 52:#include - -: 53: - -: 54:/************************************************************************* - -: 55:** Local Function Prototypes - -: 56:*************************************************************************/ - -: 57:/************************************************************************/ - -: 58:/** \brief Sample single actionpoint - -: 59:** - -: 60:** \par Description - -: 61:** Support function for actionpoint processing that will sample - -: 62:** a single actionpoint and handle the result as needed - -: 63:** - -: 64:** \par Assumptions, External Events, and Notes: - -: 65:** None - -: 66:** - -: 67:** \param [in] APNumber The actionpoint number to sample (zero - -: 68:** based actionpoint definition table index) - -: 69:** - -: 70:*************************************************************************/ - -: 71:void LC_SampleSingleAP(uint16 APNumber); - -: 72: - -: 73:/************************************************************************/ - -: 74:/** \brief Evaluate RPN - -: 75:** - -: 76:** \par Description - -: 77:** Support function for actionpoint processing that evaluates - -: 78:** the reverse polish notation (RPN) equation for the specified - -: 79:** actionpoint and returns the result - -: 80:** - -: 81:** \par Assumptions, External Events, and Notes: - -: 82:** None - -: 83:** - -: 84:** \param [in] APNumber The actionpoint number to evaluate (zero - -: 85:** based actionpoint definition table index) - -: 86:** - -: 87:** \returns - -: 88:** \retcode #LC_ACTION_PASS \retdesc \copydoc LC_ACTION_PASS \endcode - -: 89:** \retcode #LC_ACTION_FAIL \retdesc \copydoc LC_ACTION_FAIL \endcode - -: 90:** \retcode #LC_ACTION_STALE \retdesc \copydoc LC_ACTION_STALE \endcode - -: 91:** \retcode #LC_ACTION_ERROR \retdesc \copydoc LC_ACTION_ERROR \endcode - -: 92:** \endreturns - -: 93:** - -: 94:*************************************************************************/ - -: 95:uint8 LC_EvaluateRPN(uint16 APNumber); - -: 96: - -: 97:/************************************************************************/ - -: 98:/** \brief Validate RPN expression - -: 99:** - -: 100:** \par Description - -: 101:** Support function for actionpoint definition table validation - -: 102:** that checks a reverse polish notation (RPN) equation for - -: 103:** possible errors. - -: 104:** - -: 105:** \par Assumptions, External Events, and Notes: - -: 106:** None - -: 107:** - -: 108:** \param [in] RPNPtr Pointer to the RPN equation - -: 109:** - -: 110:** \param [in] IndexValue A pointer where to store the equation - -: 111:** index value if an error is detected - -: 112:** - -: 113:** \param [in] StackDepthValue A pointer where to store the equation - -: 114:** stack depth value if an error is detected - -: 115:** - -: 116:** \param [out] *IndexValue Equation index value where error was - -: 117:** found. Not modified if return code is - -: 118:** #LC_ADTVAL_NO_ERR - -: 119:** - -: 120:** \param [out] *StackDepthValue Equation stack depth value where error - -: 121:** found. Not modified if return code is - -: 122:** #LC_ADTVAL_NO_ERR - -: 123:** - -: 124:** \returns - -: 125:** \retcode #LC_ADTVAL_NO_ERR \retdesc \copydoc LC_ADTVAL_NO_ERR \endcode - -: 126:** \retcode #LC_ADTVAL_ERR_RPN \retdesc \copydoc LC_ADTVAL_ERR_RPN \endcode - -: 127:** \endreturns - -: 128:** - -: 129:** \sa #LC_ValidateADT - -: 130:** - -: 131:*************************************************************************/ - -: 132:int32 LC_ValidateRPN(uint16 *RPNPtr, - -: 133: int32 *IndexValue, - -: 134: int32 *StackDepthValue); - -: 135: - -: 136:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 137:/* */ - -: 138:/* Sample one or all actionpoints */ - -: 139:/* */ - -: 140:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 141:void LC_SampleAPs(uint16 StartIndex, uint16 EndIndex) - 17: 142:{ - -: 143: uint16 TableIndex; - -: 144: uint8 CurrentAPState; - -: 145: - -: 146: /* - -: 147: ** If we're specifying a single actionpoint, make sure it's - -: 148: ** current state is valid for a sample request - -: 149: */ - 17: 150: if (StartIndex == EndIndex) - -: 151: { - 16: 152: CurrentAPState = LC_OperData.ARTPtr[StartIndex].CurrentState; - -: 153: - 30: 154: if ((CurrentAPState != LC_ACTION_NOT_USED) && - -: 155: (CurrentAPState != LC_APSTATE_PERMOFF)) - -: 156: { - -: 157: /* - -: 158: ** Sample the specified actionpoint - -: 159: */ - 14: 160: LC_SampleSingleAP(StartIndex); - -: 161: } - -: 162: else - -: 163: { - -: 164: /* - -: 165: ** Actionpoint isn't currently operational - -: 166: */ - 2: 167: CFE_EVS_SendEvent(LC_APSAMPLE_CURR_ERR_EID, CFE_EVS_ERROR, - -: 168: "Sample AP error, invalid current AP state: AP = %d, State = %d", - -: 169: StartIndex, CurrentAPState); - -: 170: } - -: 171: } - -: 172: else - -: 173: { - -: 174: /* - -: 175: ** Sample selected actionpoints - -: 176: */ - 177: 177: for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++) - -: 178: { - 176: 179: LC_SampleSingleAP(TableIndex); - -: 180: } - -: 181: - -: 182: } - -: 183: - -: 184: return; - -: 185: - -: 186:} /* end LC_SampleAP */ - -: 187: - -: 188:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 189:/* */ - -: 190:/* Sample a single actionpoint */ - -: 191:/* */ - -: 192:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 193:void LC_SampleSingleAP(uint16 APNumber) - 193: 194:{ - -: 195: uint8 CurrentAPState; - -: 196: uint8 PreviousResult; - -: 197: uint8 CurrentResult; - -: 198: char EventText[CFE_EVS_MAX_MESSAGE_LENGTH]; - -: 199: - -: 200: /* - -: 201: ** We only do the sample if the actionpoint is active - -: 202: ** or passive. Other states are ignored since this - -: 203: ** routine is called in a loop to process ALL actionpoints. - -: 204: */ - 193: 205: CurrentAPState = LC_OperData.ARTPtr[APNumber].CurrentState; - -: 206: - 193: 207: if ((CurrentAPState == LC_APSTATE_ACTIVE) || - -: 208: (CurrentAPState == LC_APSTATE_PASSIVE)) - -: 209: { - -: 210: /* - -: 211: ** Evaluate the actionpoint and update the results - -: 212: ** as needed - -: 213: */ - 182: 214: LC_AppData.APSampleCount++; - -: 215: - 182: 216: PreviousResult = LC_OperData.ARTPtr[APNumber].ActionResult; - -: 217: - 182: 218: CurrentResult = LC_EvaluateRPN(APNumber); - -: 219: - 182: 220: LC_OperData.ARTPtr[APNumber].ActionResult = CurrentResult; - -: 221: - -: 222: /***************************************** - -: 223: ** If actionpoint fails current evaluation - -: 224: ******************************************/ - 182: 225: if (CurrentResult == LC_ACTION_FAIL) - -: 226: { - 5: 227: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount++; - 5: 228: LC_OperData.ARTPtr[APNumber].CumulativeFailCount++; - -: 229: - 5: 230: if (PreviousResult == LC_ACTION_PASS) - -: 231: { - -: 232: /* - -: 233: ** We failed this time, but we passed last time - -: 234: */ - 5: 235: LC_OperData.ARTPtr[APNumber].PassToFailCount++; - -: 236: - -: 237: /* - -: 238: ** Send only a limited number of Pass to Fail events - -: 239: */ - 5: 240: if (LC_OperData.ARTPtr[APNumber].PassToFailCount <= - -: 241: LC_OperData.ADTPtr[APNumber].MaxPassFailEvents) - -: 242: { - 2: 243: CFE_EVS_SendEvent(LC_AP_PASSTOFAIL_INF_EID, CFE_EVS_INFORMATION, - -: 244: "AP state change from PASS to FAIL: AP = %d", - -: 245: APNumber); - -: 246: } - -: 247: } - -: 248: - 5: 249: if (LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount >= - -: 250: LC_OperData.ADTPtr[APNumber].MaxFailsBeforeRTS) - -: 251: { - -: 252: /* - -: 253: ** We have failed enough times to request the RTS - -: 254: */ - 4: 255: if (CurrentAPState == LC_APSTATE_ACTIVE) - -: 256: { - -: 257: /* - -: 258: ** Actions go to passive after they've failed - -: 259: */ - 2: 260: LC_OperData.ARTPtr[APNumber].CurrentState = LC_APSTATE_PASSIVE; - -: 261: - 2: 262: if (LC_AppData.CurrentLCState == LC_STATE_ACTIVE) - -: 263: { - -: 264: /* - -: 265: ** If the LC application state is active, request the - -: 266: ** specified RTS be executed - -: 267: */ - 1: 268: LC_ExecuteRTS(LC_OperData.ADTPtr[APNumber].RTSId); - -: 269: - 1: 270: LC_OperData.ARTPtr[APNumber].CumulativeRTSExecCount++; - -: 271: - 1: 272: LC_AppData.RTSExecCount++; - -: 273: - -: 274: /* - -: 275: ** Copy event text specific to this action - -: 276: ** making sure to NUL terminate in case the event - -: 277: ** text is too long since strncpy won't - -: 278: */ - 1: 279: strncpy(EventText, - -: 280: LC_OperData.ADTPtr[APNumber].EventText, - -: 281: LC_MAX_ACTION_TEXT); - 1: 282: EventText[LC_MAX_ACTION_TEXT - 1] = '\0'; - -: 283: - -: 284: /* - -: 285: ** Add our trailer with AP specific info making - -: 286: ** sure we won't exceed our character buffer. - -: 287: ** strncat will always NUL terminate so we have - -: 288: ** to subtract 1 from the max to leave room for it. - -: 289: */ - 1: 290: strncat(EventText, - -: 291: LC_AP_EVENT_TAIL_STR, - -: 292: (CFE_EVS_MAX_MESSAGE_LENGTH - LC_MAX_ACTION_TEXT) - 1); - -: 293: - 1: 294: CFE_EVS_SendEvent( - -: 295: LC_OperData.ADTPtr[APNumber].EventID, - -: 296: LC_OperData.ADTPtr[APNumber].EventType, - -: 297: EventText, APNumber, - -: 298: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, - -: 299: LC_OperData.ADTPtr[APNumber].RTSId); - -: 300: } - -: 301: else - -: 302: { - -: 303: /* - -: 304: ** The LC application state is passive so we don't - -: 305: ** do the RTS request. We bump the passive RTS execution - -: 306: ** counter and send out a generic event message - -: 307: */ - 1: 308: LC_AppData.PassiveRTSExecCount++; - -: 309: - 1: 310: CFE_EVS_SendEvent(LC_PASSIVE_FAIL_DBG_EID, CFE_EVS_DEBUG, - -: 311: "AP failed while LC App passive: AP = %d, FailCount = %d, RTS = %d", - -: 312: APNumber, - -: 313: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, - -: 314: LC_OperData.ADTPtr[APNumber].RTSId); - -: 315: } - -: 316: } - -: 317: else - -: 318: { - -: 319: /* - -: 320: ** The actionpoint failed while the actionpoint state is passive - -: 321: */ - 2: 322: LC_OperData.ARTPtr[APNumber].PassiveAPCount++; - -: 323: - -: 324: /* - -: 325: ** Send only a limited number of AP is Passive events - -: 326: */ - 2: 327: if (LC_OperData.ARTPtr[APNumber].PassiveAPCount <= - -: 328: LC_OperData.ADTPtr[APNumber].MaxPassiveEvents) - -: 329: { - 1: 330: CFE_EVS_SendEvent(LC_AP_PASSIVE_FAIL_INF_EID, CFE_EVS_INFORMATION, - -: 331: "AP failed while passive: AP = %d, FailCount = %d, RTS = %d", - -: 332: APNumber, - -: 333: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount, - -: 334: LC_OperData.ADTPtr[APNumber].RTSId); - -: 335: } - -: 336: } - -: 337: - -: 338: } /* end (ConsecutiveFailCount >= MaxFailsBeforeRTS) if */ - -: 339: - -: 340: } /* end (CurrentResult == LC_ACTION_FAIL) if */ - -: 341: - -: 342: /****************************************** - -: 343: ** If actionpoint passes current evaluation - -: 344: *******************************************/ - 177: 345: else if (CurrentResult == LC_ACTION_PASS) - -: 346: { - 169: 347: if (PreviousResult == LC_ACTION_FAIL) - -: 348: { - -: 349: /* - -: 350: ** We passed this time, but we failed last time - -: 351: */ - 2: 352: LC_OperData.ARTPtr[APNumber].FailToPassCount++; - -: 353: - -: 354: /* - -: 355: ** Send only a limited number of Fail to Pass events - -: 356: */ - 2: 357: if (LC_OperData.ARTPtr[APNumber].FailToPassCount <= - -: 358: LC_OperData.ADTPtr[APNumber].MaxFailPassEvents) - -: 359: { - 1: 360: CFE_EVS_SendEvent(LC_AP_FAILTOPASS_INF_EID, CFE_EVS_INFORMATION, - -: 361: "AP state change from FAIL to PASS: AP = %d", - -: 362: APNumber); - -: 363: } - -: 364: } - -: 365: /* - -: 366: ** Clear consecutive failure counter for this AP - -: 367: */ - 169: 368: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount = 0; - -: 369: } - -: 370: - -: 371: /* - -: 372: ** If actionpoint is not measured or has gone stale - -: 373: */ - 8: 374: else if (CurrentResult == LC_ACTION_STALE) - -: 375: { - -: 376: /* - -: 377: ** Make sure the consecutive fail count is zeroed - -: 378: */ - 1: 379: LC_OperData.ARTPtr[APNumber].ConsecutiveFailCount = 0; - -: 380: } - -: 381: else - -: 382: { - -: 383: /* - -: 384: ** We got back a LC_ACTION_ERROR result, send event - -: 385: */ - 7: 386: CFE_EVS_SendEvent(LC_ACTION_ERROR_ERR_EID, CFE_EVS_ERROR, - -: 387: "AP evaluated to error: AP = %d, Result = %d", - -: 388: APNumber, CurrentResult); - -: 389: } - -: 390: - -: 391: } /* end CurrentAPState if */ - -: 392: - -: 393: return; - -: 394: - -: 395:} /* end LC_SampleSingleAP */ - -: 396: - -: 397:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 398:/* */ - -: 399:/* Evaluate the Reverse Polish Notation (RPN) equation for an */ - -: 400:/* actionpoint */ - -: 401:/* */ - -: 402:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 403:#define POP_RPN_DATA ((StackPtr <= 0) \ - -: 404: ? (IllegalRPN = TRUE) \ - -: 405: : (RPNStack [--StackPtr])) - -: 406: - -: 407:#define PUSH_RPN_DATA(x) ((StackPtr >= LC_MAX_RPN_EQU_SIZE) \ - -: 408: ? (IllegalRPN = TRUE) \ - -: 409: : (RPNStack [StackPtr++] = x)) - -: 410:uint8 LC_EvaluateRPN(uint16 APNumber) - 199: 411:{ - -: 412: boolean Done; - -: 413: boolean IllegalRPN; - -: 414: boolean IllegalOperand; - 199: 415: uint8 EvalResult = LC_ACTION_ERROR; - -: 416: int32 RPNEquationPtr; - -: 417: int32 StackPtr; - -: 418: uint16 RPNData; - -: 419: uint16 RPNStack [LC_MAX_RPN_EQU_SIZE]; - -: 420: uint16 Operand1; - -: 421: uint16 Operand2; - -: 422: - 199: 423: StackPtr = 0; - 199: 424: RPNEquationPtr = 0; - 199: 425: IllegalRPN = FALSE; - 199: 426: IllegalOperand = FALSE; - 199: 427: Done = FALSE; - -: 428: - -: 429: /* - -: 430: ** Keep going till we're done or till we get an error - -: 431: */ - 849: 432: while ((Done == FALSE) && - -: 433: (IllegalRPN == FALSE) && - -: 434: (IllegalOperand == FALSE)) - -: 435: { - -: 436: /* - -: 437: ** Pick off each piece of the RPN equation and handle - -: 438: ** one at a time - -: 439: */ - 451: 440: RPNData = LC_OperData.ADTPtr[APNumber].RPNEquation[RPNEquationPtr++]; - -: 441: - -: 442: /* - -: 443: ** The data is either an RPN operator or a watchpoint number - -: 444: */ - 451: 445: switch (RPNData) - -: 446: { - -: 447: /* - -: 448: ** If the data is an RPN operator then each operand is - -: 449: ** either a watchpoint evaluation result or it is the - -: 450: ** result of a previous RPN operation - -: 451: */ - -: 452: case LC_RPN_AND: - 9: 453: Operand2 = POP_RPN_DATA; - 9: 454: Operand1 = POP_RPN_DATA; - 11: 455: if ((Operand1 == LC_WATCH_FALSE) || - -: 456: (Operand2 == LC_WATCH_FALSE)) - -: 457: { - 2: 458: PUSH_RPN_DATA (LC_WATCH_FALSE); - -: 459: } - 9: 460: else if ((Operand1 == LC_WATCH_ERROR) || - -: 461: (Operand2 == LC_WATCH_ERROR)) - -: 462: { - 2: 463: PUSH_RPN_DATA (LC_WATCH_ERROR); - -: 464: } - 7: 465: else if ((Operand1 == LC_WATCH_STALE) || - -: 466: (Operand2 == LC_WATCH_STALE)) - -: 467: { - 2: 468: PUSH_RPN_DATA (LC_WATCH_STALE); - -: 469: } - -: 470: else - -: 471: { - 3: 472: PUSH_RPN_DATA (LC_WATCH_TRUE); - -: 473: } - 9: 474: break; - -: 475: - -: 476: case LC_RPN_OR: - 6: 477: Operand2 = POP_RPN_DATA; - 6: 478: Operand1 = POP_RPN_DATA; - 7: 479: if ((Operand1 == LC_WATCH_TRUE) || - -: 480: (Operand2 == LC_WATCH_TRUE)) - -: 481: { - 1: 482: PUSH_RPN_DATA (LC_WATCH_TRUE); - -: 483: } - 7: 484: else if ((Operand1 == LC_WATCH_ERROR) || - -: 485: (Operand2 == LC_WATCH_ERROR)) - -: 486: { - 2: 487: PUSH_RPN_DATA (LC_WATCH_ERROR); - -: 488: } - 5: 489: else if ((Operand1 == LC_WATCH_STALE) || - -: 490: (Operand2 == LC_WATCH_STALE)) - -: 491: { - 2: 492: PUSH_RPN_DATA (LC_WATCH_STALE); - -: 493: } - -: 494: else - -: 495: { - 1: 496: PUSH_RPN_DATA (LC_WATCH_FALSE); - -: 497: } - 6: 498: break; - -: 499: - -: 500: case LC_RPN_XOR: - 5: 501: Operand2 = POP_RPN_DATA; - 5: 502: Operand1 = POP_RPN_DATA; - 7: 503: if ((Operand1 == LC_WATCH_ERROR) || - -: 504: (Operand2 == LC_WATCH_ERROR)) - -: 505: { - 2: 506: PUSH_RPN_DATA (LC_WATCH_ERROR); - -: 507: } - 5: 508: else if ((Operand1 == LC_WATCH_STALE) || - -: 509: (Operand2 == LC_WATCH_STALE)) - -: 510: { - 2: 511: PUSH_RPN_DATA (LC_WATCH_STALE); - -: 512: } - -: 513: else - -: 514: { - 1: 515: PUSH_RPN_DATA (Operand1 != Operand2); - -: 516: } - 5: 517: break; - -: 518: - -: 519: case LC_RPN_NOT: - 3: 520: Operand1 = POP_RPN_DATA; - 3: 521: if (Operand1 == LC_WATCH_ERROR) - -: 522: { - 1: 523: PUSH_RPN_DATA (LC_WATCH_ERROR); - -: 524: } - 2: 525: else if (Operand1 == LC_WATCH_STALE) - -: 526: { - 1: 527: PUSH_RPN_DATA (LC_WATCH_STALE); - -: 528: } - -: 529: else - -: 530: { - 1: 531: PUSH_RPN_DATA (Operand1 == LC_WATCH_FALSE); - -: 532: } - 3: 533: break; - -: 534: - -: 535: case LC_RPN_EQUAL: - 193: 536: EvalResult = POP_RPN_DATA; - 193: 537: if ((EvalResult == LC_WATCH_ERROR) || - -: 538: (EvalResult == LC_WATCH_STALE)) - -: 539: { - 16: 540: IllegalOperand = TRUE; - -: 541: } - 193: 542: if (StackPtr == 0) - -: 543: { - 192: 544: Done = TRUE; - -: 545: } - -: 546: else - -: 547: { - 1: 548: IllegalRPN = TRUE; - -: 549: } - 193: 550: break; - -: 551: - -: 552: /* - -: 553: ** If the data is a watchpoint number then the operand is - -: 554: ** the current value of that watchpoint result - -: 555: */ - -: 556: default: - 235: 557: if (RPNData < LC_MAX_WATCHPOINTS) - -: 558: { - 234: 559: PUSH_RPN_DATA (LC_OperData.WRTPtr[RPNData].WatchResult); - -: 560: } - -: 561: else - -: 562: { - 1: 563: IllegalRPN = TRUE; - -: 564: } - -: 565: break; - -: 566: - -: 567: } /* end switch */ - -: 568: - -: 569: /* - -: 570: ** If still not done and have no errors - check for the end of the buffer - -: 571: */ - 451: 572: if ((Done == FALSE) && - -: 573: (IllegalRPN == FALSE) && - -: 574: (IllegalOperand == FALSE)) - -: 575: { - 253: 576: if (RPNEquationPtr >= LC_MAX_RPN_EQU_SIZE) - -: 577: { - 1: 578: IllegalRPN = TRUE; - -: 579: } - -: 580: } - -: 581: - -: 582: } /* end while */ - -: 583: - 199: 584: if (IllegalRPN == TRUE) - -: 585: { - 7: 586: CFE_EVS_SendEvent(LC_INVALID_RPN_ERR_EID, CFE_EVS_ERROR, - -: 587: "AP has illegal RPN expression: AP = %d, LastOperand = %d, StackPtr = %d", - -: 588: APNumber, (RPNEquationPtr - 1), StackPtr); - -: 589: - 7: 590: EvalResult = LC_ACTION_ERROR; - -: 591: } - -: 592: else if (EvalResult == LC_WATCH_ERROR) - -: 593: { - -: 594: EvalResult = LC_ACTION_ERROR; - -: 595: } - -: 596: else if (EvalResult == LC_WATCH_STALE) - -: 597: { - -: 598: EvalResult = LC_ACTION_STALE; - -: 599: } - -: 600: else if (EvalResult == LC_WATCH_FALSE) - -: 601: { - -: 602: EvalResult = LC_ACTION_PASS; - -: 603: } - -: 604: else if (EvalResult == LC_WATCH_TRUE) - -: 605: { - -: 606: EvalResult = LC_ACTION_FAIL; - -: 607: } - -: 608: - 199: 609: return (EvalResult); - -: 610: - -: 611:} /* end LC_EvaluateRPN */ - -: 612: - -: 613:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 614:/* */ - -: 615:/* Validate the actionpoint definition table (ADT) */ - -: 616:/* */ - -: 617:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 618:int32 LC_ValidateADT(void *TableData) - 8: 619:{ - 8: 620: LC_ADTEntry_t *TableArray = (LC_ADTEntry_t *) TableData; - -: 621: - 8: 622: int32 EntryResult = LC_ADTVAL_NO_ERR; - 8: 623: int32 TableResult = CFE_SUCCESS; - -: 624: int32 TableIndex; - -: 625: - -: 626: uint8 DefaultState; - -: 627: uint16 RTSId; - -: 628: uint16 MaxFailsBeforeRTS; - -: 629: uint16 EventType; - -: 630: - -: 631: uint16 *RPNPtr; - 8: 632: int32 RPNIndex = 0; - 8: 633: int32 RPNStackDepth = 0; - -: 634: - 8: 635: int32 GoodCount = 0; - 8: 636: int32 BadCount = 0; - 8: 637: int32 UnusedCount = 0; - -: 638: - -: 639: /* - -: 640: ** Verify each entry in the pending actionpoint definition table - -: 641: */ - 1416: 642: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++ ) - -: 643: { - 1408: 644: DefaultState = TableArray[TableIndex].DefaultState; - 1408: 645: RTSId = TableArray[TableIndex].RTSId; - 1408: 646: MaxFailsBeforeRTS = TableArray[TableIndex].MaxFailsBeforeRTS; - 1408: 647: RPNPtr = TableArray[TableIndex].RPNEquation; - 1408: 648: EventType = TableArray[TableIndex].EventType; - -: 649: - 1408: 650: if (DefaultState == LC_ACTION_NOT_USED) - -: 651: { - -: 652: /* - -: 653: ** Unused table entry - -: 654: */ - 1400: 655: UnusedCount++; - -: 656: } - 9: 657: else if ((DefaultState != LC_APSTATE_ACTIVE) && - -: 658: (DefaultState != LC_APSTATE_PASSIVE) && - -: 659: (DefaultState != LC_APSTATE_DISABLED) && - -: 660: (DefaultState != LC_APSTATE_PERMOFF)) - -: 661: { - -: 662: /* - -: 663: ** Invalid default state - -: 664: */ - 1: 665: BadCount++; - 1: 666: EntryResult = LC_ADTVAL_ERR_DEFSTATE; - -: 667: } - 7: 668: else if (RTSId > LC_MAX_VALID_ADT_RTSID) - -: 669: { - -: 670: /* - -: 671: ** Bad RTS ID (limit set by configuration parameter, - -: 672: ** see lc_platform_cfg.h) - -: 673: */ - 1: 674: BadCount++; - 1: 675: EntryResult = LC_ADTVAL_ERR_RTSID; - -: 676: } - 6: 677: else if (MaxFailsBeforeRTS == 0) - -: 678: { - -: 679: /* - -: 680: ** Bad fail count - -: 681: */ - 1: 682: BadCount++; - 1: 683: EntryResult = LC_ADTVAL_ERR_FAILCNT; - -: 684: } - 6: 685: else if ((EventType != CFE_EVS_DEBUG) && - -: 686: (EventType != CFE_EVS_INFORMATION) && - -: 687: (EventType != CFE_EVS_ERROR) && - -: 688: (EventType != CFE_EVS_CRITICAL)) - -: 689: { - -: 690: /* - -: 691: ** Invalid event type - -: 692: */ - 1: 693: BadCount++; - 1: 694: EntryResult = LC_ADTVAL_ERR_EVTTYPE; - -: 695: } - -: 696: else - -: 697: { - -: 698: /* - -: 699: ** Validate reverse polish equation syntax - -: 700: */ - 4: 701: EntryResult = LC_ValidateRPN(RPNPtr, &RPNIndex, &RPNStackDepth); - -: 702: - 4: 703: if (EntryResult != LC_ADTVAL_NO_ERR) - -: 704: { - 3: 705: BadCount++; - -: 706: } - -: 707: else - -: 708: { - 1: 709: GoodCount++; - -: 710: } - -: 711: } - -: 712: - -: 713: /* - -: 714: ** Generate detailed event for "first" error - -: 715: */ - 1408: 716: if ((EntryResult != LC_ADTVAL_NO_ERR) && (TableResult == CFE_SUCCESS)) - -: 717: { - 7: 718: if (EntryResult == LC_ADTVAL_ERR_RPN) - -: 719: { - 3: 720: CFE_EVS_SendEvent(LC_ADTVAL_RPNERR_EID, CFE_EVS_ERROR, - -: 721: "ADT verify RPN err: AP = %d, Index = %d, StackDepth = %d", - -: 722: TableIndex, RPNIndex, RPNStackDepth); - -: 723: } - -: 724: else - -: 725: { - 4: 726: CFE_EVS_SendEvent(LC_ADTVAL_ERR_EID, CFE_EVS_ERROR, - -: 727: "ADT verify err: AP = %d, Err = %d, State = %d, RTS = %d, FailCnt = %d, EvtType = %d", - -: 728: TableIndex, EntryResult, DefaultState, RTSId, MaxFailsBeforeRTS, EventType ); - -: 729: } - -: 730: - 7: 731: TableResult = EntryResult; - -: 732: } - -: 733: - -: 734: } /* end TableIndex for */ - -: 735: - -: 736: /* - -: 737: ** Generate informational event with error totals - -: 738: */ - 8: 739: CFE_EVS_SendEvent(LC_ADTVAL_INF_EID, CFE_EVS_INFORMATION, - -: 740: "ADT verify results: good = %d, bad = %d, unused = %d", - -: 741: GoodCount, BadCount, UnusedCount); - -: 742: - 8: 743: return(TableResult); - -: 744: - -: 745:} /* end LC_ValidateADT */ - -: 746: - -: 747:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 748:/* */ - -: 749:/* Validate a reverse polish notation (RPN) equation */ - -: 750:/* */ - -: 751:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 752:int32 LC_ValidateRPN(uint16 *RPNPtr, - -: 753: int32 *IndexValue, - -: 754: int32 *StackDepthValue) - 4: 755:{ - 4: 756: int32 Result = LC_ADTVAL_NO_ERR; - -: 757: int32 BufferIndex; - -: 758: int32 StackDepth; - -: 759: uint16 BufferItem; - -: 760: - -: 761: /* - -: 762: ** Each equation consists only of watchpoint ID numbers - -: 763: ** and polish symbols (and, or, equal, etc). - -: 764: ** - -: 765: ** Each watchpoint ID increases the stack depth and - -: 766: ** each polish symbol (except "not" which has no - -: 767: ** effect) decreases the stack depth. - -: 768: ** - -: 769: ** The stack depth must never become negative and the - -: 770: ** depth must equal 1 when the "=" symbol is found. - -: 771: ** - -: 772: ** The last symbol in the equation is assumed to be - -: 773: ** the "=" symbol, and the test does not examine any - -: 774: ** further data. - -: 775: */ - 4: 776: StackDepth = 0; - -: 777: - 9: 778: for (BufferIndex = 0; BufferIndex < LC_MAX_RPN_EQU_SIZE; BufferIndex++) - -: 779: { - 9: 780: BufferItem = RPNPtr[BufferIndex]; - -: 781: - 11: 782: if ((BufferItem == LC_RPN_AND) || - -: 783: (BufferItem == LC_RPN_OR) || - -: 784: (BufferItem == LC_RPN_XOR)) - -: 785: { - -: 786: /* - -: 787: ** Depth test will fail if we haven't already counted 2 - -: 788: ** watchpoint ID values - -: 789: */ - 2: 790: StackDepth--; - -: 791: } - 7: 792: else if (BufferItem == LC_RPN_NOT) - -: 793: { - -: 794: /* - -: 795: ** Depth test will fail if this is 1st symbol - -: 796: */ - -: 797: } - 6: 798: else if (BufferItem == LC_RPN_EQUAL) - -: 799: { - -: 800: /* - -: 801: ** Equation ends when LC_RPN_EQUAL is found - -: 802: */ - 1: 803: break; - -: 804: } - 5: 805: else if (BufferItem < LC_MAX_WATCHPOINTS) - -: 806: { - -: 807: /* - -: 808: ** Valid watchpoint ID - -: 809: */ - 4: 810: StackDepth++; - -: 811: } - -: 812: else - -: 813: { - -: 814: /* - -: 815: ** Not a valid polish symbol or watchpoint ID - -: 816: */ - 1: 817: break; - -: 818: } - -: 819: - -: 820: /* - -: 821: ** Must have more watchpoint ID's than polish symbols - -: 822: */ - 7: 823: if (StackDepth <= 0) - -: 824: { - 2: 825: break; - -: 826: } - -: 827: } - -: 828: - -: 829: /* - -: 830: ** Check for valid Reverse Polish Notation equation - -: 831: */ - 5: 832: if ((BufferItem == LC_RPN_EQUAL) && (StackDepth == 1)) - -: 833: { - 1: 834: Result = LC_ADTVAL_NO_ERR; - -: 835: } - -: 836: else - -: 837: { - 3: 838: Result = LC_ADTVAL_ERR_RPN; - -: 839: - -: 840: /* - -: 841: ** Provide additional error information - -: 842: */ - 3: 843: *IndexValue = BufferIndex; - 3: 844: *StackDepthValue = StackDepth; - -: 845: } - -: 846: - 4: 847: return(Result); - -: 848: - -: 849:} /* end LC_ValidateRPN */ - -: 850: - -: 851:/************************/ - -: 852:/* End of File Comment */ - -: 853:/************************/ diff --git a/fsw/unit_test/output_noCDS/lc_app.c.gcov b/fsw/unit_test/output_noCDS/lc_app.c.gcov deleted file mode 100644 index 610a494..0000000 --- a/fsw/unit_test/output_noCDS/lc_app.c.gcov +++ /dev/null @@ -1,1200 +0,0 @@ - -: 0:Source:../src/lc_app.c - -: 0:Graph:lc_app.gcno - -: 0:Data:lc_app.gcda - -: 0:Runs:1 - -: 0:Programs:1 - -: 1:/************************************************************************ - -: 2:** File: - -: 3:** $Id: lc_app.c.gcov 1.1.1.1 2012/10/01 18:48:31EDT lwalling Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** The CFS Limit Checker (LC) is a table driven application - -: 7:** that provides telemetry monitoring and autonomous response - -: 8:** capabilities to Core Flight Executive (cFE) based systems. - -: 9:** - -: 10:** $Log: lc_app.c.gcov $ - -: 10:** Revision 1.1.1.1 2012/10/01 18:48:31EDT lwalling - -: 10:** Apply unit test output file updates to branch - -: 10:** Revision 1.3 2012/10/01 13:57:38PDT lwalling - -: 10:** Updates to output files after fix compile warnings - -: 11:** Revision 1.2 2012/10/01 13:23:59PDT lwalling - -: 12:** Added local variable to avoid comparing 2 macros in function LC_CreateTaskCDS() - -: 13:** Revision 1.1 2012/07/31 13:53:36PDT nschweis - -: 14:** Initial revision - -: 15:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj - -: 16:** Revision 1.16 2011/10/04 17:00:30EDT lwalling - -: 17:** Must load AP def table before init AP results table - -: 18:** Revision 1.15 2011/06/08 16:07:40EDT lwalling - -: 19:** Change call from LC_SubscribeWP() to LC_CreateHashTable() - -: 20:** Revision 1.14 2011/03/10 14:11:10EST lwalling - -: 21:** Cleanup use of debug events during task startup - -: 22:** Revision 1.13 2011/03/02 10:53:23EST lwalling - -: 23:** Explicitly state return value when known to be CFE_SUCCESS - -: 24:** Revision 1.12 2011/03/01 15:38:50EST lwalling - -: 25:** Cleanup local function prototypes, move LC_SubscribeWP() and LC_UpdateTaskCDS() to lc_cmds.c - -: 26:** Revision 1.11 2011/03/01 09:35:30EST lwalling - -: 27:** Modified startup logic re use of CDS and critical tables - -: 28:** Revision 1.10 2011/02/14 16:57:13EST lwalling - -: 29:** Created LC_StartedNoCDS() to clear results tables after CDS load error - -: 30:** Revision 1.9 2011/01/19 11:32:06EST jmdagost - -: 31:** Moved mission revision number from lc_version.h to lc_platform_cfg.h. - -: 32:** Revision 1.8 2010/03/08 10:37:09EST lwalling - -: 33:** Move saved, not saved state definitions to common header file - -: 34:** Revision 1.7 2009/06/12 14:17:23EDT rmcgraw - -: 35:** DCR82191:1 Changed OS_Mem function calls to CFE_PSP_Mem - -: 36:** Revision 1.6 2009/02/23 11:15:10EST dahardis - -: 37:** Added code to update the application data in the CDS on - -: 38:** application startup after the "saved on exit" flag is reset - -: 39:** (see DCR 7084) - -: 40:** Revision 1.5 2009/01/15 15:36:11EST dahardis - -: 41:** Unit test fixes - -: 42:** Revision 1.4 2008/12/10 15:34:07EST dahardis - -: 43:** Altered CDS restoration processing according to - -: 44:** DCR 4680 - -: 45:** Revision 1.3 2008/12/10 09:38:33EST dahardis - -: 46:** Fixed calls to CFE_TBL_GetAddress (DCR #4699) - -: 47:** Revision 1.2 2008/12/03 13:59:44EST dahardis - -: 48:** Corrections from peer code review - -: 49:** Revision 1.1 2008/10/29 14:18:51EDT dahardison - -: 50:** Initial revision - -: 51:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 52:** - -: 53:*************************************************************************/ - -: 54: - -: 55:/************************************************************************ - -: 56:** Includes - -: 57:*************************************************************************/ - -: 58:#include "lc_app.h" - -: 59:#include "lc_events.h" - -: 60:#include "lc_msgids.h" - -: 61:#include "lc_perfids.h" - -: 62:#include "lc_version.h" - -: 63:#include "lc_cmds.h" - -: 64:#include "lc_action.h" - -: 65:#include "lc_watch.h" - -: 66:#include "lc_platform_cfg.h" - -: 67:#include "lc_mission_cfg.h" /* Leave these two last to make sure all */ - -: 68:#include "lc_verify.h" /* LC configuration parameters are checked */ - -: 69: - -: 70:/************************************************************************ - -: 71:** LC Global Data - -: 72:*************************************************************************/ - -: 73:LC_OperData_t LC_OperData; - -: 74:LC_AppData_t LC_AppData; - -: 75: - -: 76:/************************************************************************ - -: 77:** Local Function Prototypes - -: 78:*************************************************************************/ - -: 79:/************************************************************************/ - -: 80:/** \brief Initialize the CFS Limit Checker (LC) application - -: 81:** - -: 82:** \par Description - -: 83:** Limit Checker application initialization routine. This - -: 84:** function performs all the required startup steps to - -: 85:** initialize (or restore from CDS) LC data structures and get - -: 86:** the application registered with the cFE services so it can - -: 87:** begin to receive command messages. - -: 88:** - -: 89:** \par Assumptions, External Events, and Notes: - -: 90:** None - -: 91:** - -: 92:** \returns - -: 93:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 94:** \retstmt Return codes from #LC_EvsInit \endcode - -: 95:** \retstmt Return codes from #LC_SbInit \endcode - -: 96:** \retstmt Return codes from #LC_InitFromCDS \endcode - -: 97:** \retstmt Return codes from #LC_InitNoCDS \endcode - -: 98:** \endreturns - -: 99:** - -: 100:*************************************************************************/ - -: 101:int32 LC_AppInit(void); - -: 102: - -: 103:/************************************************************************/ - -: 104:/** \brief Initialize Event Services - -: 105:** - -: 106:** \par Description - -: 107:** This function performs the steps required to setup - -: 108:** cFE Events Services for use by the LC application - -: 109:** - -: 110:** \par Assumptions, External Events, and Notes: - -: 111:** None - -: 112:** - -: 113:** \returns - -: 114:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 115:** \retstmt Return codes from #CFE_EVS_Register \endcode - -: 116:** \endreturns - -: 117:** - -: 118:*************************************************************************/ - -: 119:int32 LC_EvsInit(void); - -: 120: - -: 121:/************************************************************************/ - -: 122:/** \brief Initialize Software Bus - -: 123:** - -: 124:** \par Description - -: 125:** This function performs the steps required to setup the - -: 126:** cFE software bus for use by the LC application - -: 127:** - -: 128:** \par Assumptions, External Events, and Notes: - -: 129:** None - -: 130:** - -: 131:** \returns - -: 132:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 133:** \retstmt Return codes from #CFE_SB_CreatePipe \endcode - -: 134:** \retstmt Return codes from #CFE_SB_Subscribe \endcode - -: 135:** \endreturns - -: 136:** - -: 137:*************************************************************************/ - -: 138:int32 LC_SbInit(void); - -: 139: - -: 140:/************************************************************************/ - -: 141:/** \brief Initialize Table Services (includes CDS) - -: 142:** - -: 143:** \par Description - -: 144:** This function creates the tables used by the LC application and - -: 145:** establishes the initial table values based on the configuration - -: 146:** setting that enables the use of Critical Data Store (CDS) and - -: 147:** the availability of stored data to restore. - -: 148:** - -: 149:** \par Assumptions, External Events, and Notes: - -: 150:** None - -: 151:** - -: 152:** \returns - -: 153:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 154:** \retstmt Return codes from #LC_CreateResultTables \endcode - -: 155:** \retstmt Return codes from #LC_CreateDefinitionTables \endcode - -: 156:** \retstmt Return codes from #LC_LoadDefaultTables \endcode - -: 157:** \retstmt Return codes from #CFE_TBL_GetAddress \endcode - -: 158:** \endreturns - -: 159:** - -: 160:** \sa #LC_SAVE_TO_CDS - -: 161:** - -: 162:*************************************************************************/ - -: 163:int32 LC_TableInit(void); - -: 164: - -: 165:/************************************************************************/ - -: 166:/** \brief Create Watchpoint and Actionpoint Result Tables - -: 167:** - -: 168:** \par Description - -: 169:** This function creates the dump only result tables used by the LC - -: 170:** application. - -: 171:** - -: 172:** \par Assumptions, External Events, and Notes: - -: 173:** None - -: 174:** - -: 175:** \returns - -: 176:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 177:** \retstmt Return codes from #CFE_TBL_Register \endcode - -: 178:** \retstmt Return codes from #CFE_TBL_GetAddress \endcode - -: 179:** \endreturns - -: 180:** - -: 181:** \sa #LC_TableInit - -: 182:** - -: 183:*************************************************************************/ - -: 184:int32 LC_CreateResultTables(void); - -: 185: - -: 186:/************************************************************************/ - -: 187:/** \brief Create Watchpoint and Actionpoint Definition Tables - -: 188:** - -: 189:** \par Description - -: 190:** This function creates the loadable definition tables used by the - -: 191:** LC application. - -: 192:** - -: 193:** \par Assumptions, External Events, and Notes: - -: 194:** None - -: 195:** - -: 196:** \returns - -: 197:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 198:** \retstmt Return codes from #CFE_TBL_Register \endcode - -: 199:** \endreturns - -: 200:** - -: 201:** \sa #LC_TableInit - -: 202:** - -: 203:*************************************************************************/ - -: 204:int32 LC_CreateDefinitionTables(void); - -: 205: - -: 206:/************************************************************************/ - -: 207:/** \brief Create Result Table and Application Data CDS Areas - -: 208:** - -: 209:** \par Description - -: 210:** This function creates the loadable definition tables used by the - -: 211:** LC application. - -: 212:** - -: 213:** \par Assumptions, External Events, and Notes: - -: 214:** None - -: 215:** - -: 216:** \returns - -: 217:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 218:** \retstmt Return codes from #CFE_ES_RegisterCDS \endcode - -: 219:** \endreturns - -: 220:** - -: 221:** \sa #LC_TableInit - -: 222:** - -: 223:*************************************************************************/ - -: 224:int32 LC_CreateTaskCDS(void); - -: 225: - -: 226:/************************************************************************/ - -: 227:/** \brief Load Default Table Values - -: 228:** - -: 229:** \par Description - -: 230:** This function loads the definition tables from table files named - -: 231:** in the LC platform configuration header file. The function also - -: 232:** initializes the contents of the dump only results tables and - -: 233:** initializes the global application data structure. - -: 234:** - -: 235:** \par Assumptions, External Events, and Notes: - -: 236:** None - -: 237:** - -: 238:** \returns - -: 239:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 240:** \retstmt Return codes from #CFE_TBL_Load \endcode - -: 241:** \endreturns - -: 242:** - -: 243:** \sa #LC_TableInit - -: 244:** - -: 245:*************************************************************************/ - -: 246:int32 LC_LoadDefaultTables(void); - -: 247: - -: 248: - -: 249: - -: 250:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 251:/* */ - -: 252:/* LC application entry point and main process loop */ - -: 253:/* */ - -: 254:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 255: - -: 256:void LC_AppMain(void) - 13: 257:{ - 13: 258: int32 Status = CFE_SUCCESS; - 13: 259: uint32 RunStatus = CFE_ES_APP_RUN; - 13: 260: boolean initSuccess = TRUE; - -: 261: - -: 262: /* - -: 263: ** Performance Log, Start - -: 264: */ - 13: 265: CFE_ES_PerfLogEntry(LC_APPMAIN_PERF_ID); - -: 266: - -: 267: /* - -: 268: ** Register this application with Executive Services - -: 269: */ - 13: 270: Status = CFE_ES_RegisterApp(); - -: 271: - -: 272: /* - -: 273: ** Perform application specific initialization - -: 274: */ - 13: 275: if (Status == CFE_SUCCESS) - -: 276: { - 13: 277: Status = LC_AppInit(); - -: 278: } - -: 279: - -: 280: /* - -: 281: ** Check for start-up error... - -: 282: */ - 13: 283: if (Status != CFE_SUCCESS) - -: 284: { - -: 285: /* - -: 286: ** Set run status to terminate main loop - -: 287: */ - 13: 288: RunStatus = CFE_ES_APP_ERROR; - -: 289: - -: 290: /* - -: 291: ** Set flag that init failed so we don't - -: 292: ** attempt application cleanup before exit - -: 293: */ - 13: 294: initSuccess = FALSE; - -: 295: } - -: 296: - -: 297: /* - -: 298: ** Application main loop - -: 299: */ - 26: 300: while(CFE_ES_RunLoop(&RunStatus) == TRUE) - -: 301: { - -: 302: /* - -: 303: ** Performance Log, Stop - -: 304: */ - #####: 305: CFE_ES_PerfLogExit(LC_APPMAIN_PERF_ID); - -: 306: - -: 307: /* - -: 308: ** Pend on the arrival of the next Software Bus message - -: 309: */ - #####: 310: Status = CFE_SB_RcvMsg(&LC_OperData.MsgPtr, LC_OperData.CmdPipe, CFE_SB_PEND_FOREVER); - -: 311: - -: 312: /* - -: 313: ** Performance Log, Start - -: 314: */ - #####: 315: CFE_ES_PerfLogEntry(LC_APPMAIN_PERF_ID); - -: 316: - -: 317: /* - -: 318: ** Process the software bus message - -: 319: */ - #####: 320: if (Status == CFE_SUCCESS) - -: 321: { - #####: 322: Status = LC_AppPipe(LC_OperData.MsgPtr); - -: 323: } - -: 324: - -: 325: /* - -: 326: ** Note: If there were some reason to exit the task - -: 327: ** normally (without error) then we would set - -: 328: ** RunStatus = CFE_ES_APP_EXIT - -: 329: */ - #####: 330: if (Status != CFE_SUCCESS) - -: 331: { - -: 332: /* - -: 333: ** Set request to terminate main loop - -: 334: */ - #####: 335: RunStatus = CFE_ES_APP_ERROR; - -: 336: } - -: 337: - -: 338: } /* end CFS_ES_RunLoop while */ - -: 339: - -: 340: /* - -: 341: ** Check for "fatal" process error... - -: 342: */ - 13: 343: if (Status != CFE_SUCCESS) - -: 344: { - -: 345: /* - -: 346: ** Send an event describing the reason for the termination - -: 347: */ - 13: 348: CFE_EVS_SendEvent(LC_TASK_EXIT_EID, CFE_EVS_CRITICAL, - -: 349: "Task terminating, err = 0x%08X", Status); - -: 350: - -: 351: /* - -: 352: ** In case cFE Event Services is not working - -: 353: */ - 13: 354: CFE_ES_WriteToSysLog("LC task terminating, err = 0x%08X\n", Status); - -: 355: } - -: 356: - -: 357: /* - -: 358: ** Performance Log, Stop - -: 359: */ - 13: 360: CFE_ES_PerfLogExit(LC_APPMAIN_PERF_ID); - -: 361: - -: 362: /* - -: 363: ** Do not update CDS if inactive or startup was incomplete - -: 364: */ - 13: 365: if ((LC_OperData.HaveActiveCDS) && - -: 366: (LC_AppData.CDSSavedOnExit == LC_CDS_SAVED)) - -: 367: { - #####: 368: LC_UpdateTaskCDS(); - -: 369: } - -: 370: - -: 371: /* - -: 372: ** Exit the application - -: 373: */ - 13: 374: CFE_ES_ExitApp(RunStatus); - -: 375: - 13: 376:} /* end LC_AppMain */ - -: 377: - -: 378: - -: 379:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 380:/* */ - -: 381:/* LC initialization */ - -: 382:/* */ - -: 383:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 384: - -: 385:int32 LC_AppInit(void) - 14: 386:{ - 14: 387: int32 Status = CFE_SUCCESS; - -: 388: - -: 389: /* - -: 390: ** Zero out the global data structures... - -: 391: */ - 14: 392: CFE_PSP_MemSet(&LC_OperData, 0, sizeof(LC_OperData_t)); - 14: 393: CFE_PSP_MemSet(&LC_AppData, 0, sizeof(LC_AppData_t)); - -: 394: - -: 395: /* - -: 396: ** Initialize event services - -: 397: */ - 14: 398: Status = LC_EvsInit(); - 14: 399: if (Status != CFE_SUCCESS) - -: 400: { - 1: 401: return(Status); - -: 402: } - -: 403: - -: 404: /* - -: 405: ** Initialize software bus - -: 406: */ - 13: 407: Status = LC_SbInit(); - 13: 408: if (Status != CFE_SUCCESS) - -: 409: { - 4: 410: return(Status); - -: 411: } - -: 412: - -: 413: /* - -: 414: ** Initialize table services - -: 415: */ - 9: 416: Status = LC_TableInit(); - 9: 417: if (Status != CFE_SUCCESS) - -: 418: { - 8: 419: return(Status); - -: 420: } - -: 421: - -: 422: /* - -: 423: ** If we get here, all is good - -: 424: ** Issue the application startup event message - -: 425: */ - 1: 426: CFE_EVS_SendEvent(LC_INIT_INF_EID, CFE_EVS_INFORMATION, - -: 427: "LC Initialized. Version %d.%d.%d.%d", - -: 428: LC_MAJOR_VERSION, - -: 429: LC_MINOR_VERSION, - -: 430: LC_REVISION, - -: 431: LC_MISSION_REV); - -: 432: - 1: 433: return(CFE_SUCCESS); - -: 434: - -: 435:} /* end LC_AppInit */ - -: 436: - -: 437: - -: 438:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 439:/* */ - -: 440:/* Initialize event services interface */ - -: 441:/* */ - -: 442:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 443: - -: 444:int32 LC_EvsInit(void) - 14: 445:{ - 14: 446: int32 Status = CFE_SUCCESS; - -: 447: - -: 448: /* - -: 449: ** If an application event filter table is added - -: 450: ** in the future, initialize it here - -: 451: */ - -: 452: - -: 453: /* - -: 454: ** Register for event services - -: 455: */ - 14: 456: Status = CFE_EVS_Register(NULL, 0, CFE_EVS_BINARY_FILTER); - -: 457: - 14: 458: if (Status != CFE_SUCCESS) - -: 459: { - 1: 460: CFE_ES_WriteToSysLog("LC App: Error Registering For Event Services, RC = 0x%08X\n", Status); - 1: 461: return (Status); - -: 462: } - -: 463: - 13: 464: return(CFE_SUCCESS); - -: 465: - -: 466:} /* end LC_EvsInit */ - -: 467: - -: 468: - -: 469:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 470:/* */ - -: 471:/* Initialize the software bus interface */ - -: 472:/* */ - -: 473:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 474: - -: 475:int32 LC_SbInit(void) - 13: 476:{ - 13: 477: int32 Status = CFE_SUCCESS; - -: 478: - -: 479: /* - -: 480: ** Initialize SB variables - -: 481: */ - 13: 482: LC_OperData.MsgPtr = (CFE_SB_MsgPtr_t) NULL; - 13: 483: LC_OperData.CmdPipe = 0; - -: 484: - -: 485: /* - -: 486: ** Initialize housekeeping packet... - -: 487: */ - 13: 488: CFE_SB_InitMsg(&LC_OperData.HkPacket, LC_HK_TLM_MID, - -: 489: sizeof(LC_HkPacket_t), FALSE); - -: 490: - -: 491: /* - -: 492: ** Create Software Bus message pipe... - -: 493: */ - 13: 494: Status = CFE_SB_CreatePipe(&LC_OperData.CmdPipe, LC_PIPE_DEPTH, LC_PIPE_NAME); - 13: 495: if (Status != CFE_SUCCESS) - -: 496: { - 1: 497: CFE_EVS_SendEvent(LC_CR_PIPE_ERR_EID, CFE_EVS_ERROR, - -: 498: "Error Creating LC Pipe, RC=0x%08X", Status); - 1: 499: return(Status); - -: 500: } - -: 501: - -: 502: /* - -: 503: ** Subscribe to Housekeeping request messages... - -: 504: */ - 12: 505: Status = CFE_SB_Subscribe(LC_SEND_HK_MID, LC_OperData.CmdPipe); - 12: 506: if (Status != CFE_SUCCESS) - -: 507: { - 1: 508: CFE_EVS_SendEvent(LC_SUB_HK_REQ_ERR_EID, CFE_EVS_ERROR, - -: 509: "Error Subscribing to HK Request, MID=0x%04X, RC=0x%08X", - -: 510: LC_SEND_HK_MID, Status); - 1: 511: return(Status); - -: 512: } - -: 513: - -: 514: /* - -: 515: ** Subscribe to LC ground command messages... - -: 516: */ - 11: 517: Status = CFE_SB_Subscribe(LC_CMD_MID, LC_OperData.CmdPipe); - 11: 518: if (Status != CFE_SUCCESS) - -: 519: { - 1: 520: CFE_EVS_SendEvent(LC_SUB_GND_CMD_ERR_EID, CFE_EVS_ERROR, - -: 521: "Error Subscribing to GND CMD, MID=0x%04X, RC=0x%08X", - -: 522: LC_CMD_MID, Status); - 1: 523: return(Status); - -: 524: } - -: 525: - -: 526: /* - -: 527: ** Subscribe to LC internal actionpoint sample messages... - -: 528: */ - 10: 529: Status = CFE_SB_Subscribe(LC_SAMPLE_AP_MID, LC_OperData.CmdPipe); - 10: 530: if (Status != CFE_SUCCESS) - -: 531: { - 1: 532: CFE_EVS_SendEvent(LC_SUB_SAMPLE_CMD_ERR_EID, CFE_EVS_ERROR, - -: 533: "Error Subscribing to Sample CMD, MID=0x%04X, RC=0x%08X", - -: 534: LC_SAMPLE_AP_MID, Status); - 1: 535: return(Status); - -: 536: } - -: 537: - 9: 538: return(CFE_SUCCESS); - -: 539: - -: 540:} /* end LC_SbInit */ - -: 541: - -: 542: - -: 543:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 544:/* */ - -: 545:/* Table initialization - includes Critical Data Store (CDS) */ - -: 546:/* */ - -: 547:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 548: - -: 549:int32 LC_TableInit(void) - 11: 550:{ - -: 551: int32 Result; - -: 552: - -: 553: /* - -: 554: ** LC task use of Critical Data Store (CDS) - -: 555: ** - -: 556: ** Global application data (LC_AppData) - -: 557: ** Watchpint results dump only table data - -: 558: ** Actionpoint results dump only table data - -: 559: ** - -: 560: ** cFE Table Services use of CDS for LC task - -: 561: ** - -: 562: ** Watchpint definition loadable table data - -: 563: ** Actionpoint definition loadable table data - -: 564: ** - -: 565: ** LC table initialization logic re CDS - -: 566: ** - -: 567: ** If LC cannot create all the CDS storage at startup, then LC - -: 568: ** will disable LC use of CDS and continue. - -: 569: ** - -: 570: ** If LC cannot register definition tables as critical, then LC - -: 571: ** will disable LC use of CDS and re-register tables as non-critical. - -: 572: ** - -: 573: ** If LC cannot register definition and results tables at startup, - -: 574: ** then LC will terminate - table use is a required function. - -: 575: ** - -: 576: ** If LC can create all the CDS storage and register definition - -: 577: ** tables as critical, then LC will write to CDS regardless of - -: 578: ** whether LC was able to read from CDS at startup. - -: 579: ** - -: 580: ** If LC cannot restore everything from CDS at startup, then LC - -: 581: ** will initialize everything - load default definition tables, - -: 582: ** init results table contents, init global application data. - -: 583: */ - -: 584: - -: 585: /* lc_platform_cfg.h */ - -: 586: #ifdef LC_SAVE_TO_CDS - -: 587: LC_OperData.HaveActiveCDS = TRUE; - -: 588: #endif - -: 589: - -: 590: /* - -: 591: ** Maintain a detailed record of table initialization results - -: 592: */ - 11: 593: if (LC_OperData.HaveActiveCDS) - -: 594: { - #####: 595: LC_OperData.TableResults |= LC_CDS_ENABLED; - -: 596: } - -: 597: - -: 598: /* - -: 599: ** Create watchpoint and actionpoint result tables - -: 600: */ - 11: 601: if ((Result = LC_CreateResultTables()) != CFE_SUCCESS) - -: 602: { - 8: 603: return(Result); - -: 604: } - -: 605: - -: 606: /* - -: 607: ** If CDS is enabled - create the 3 CDS areas managed by the LC task - -: 608: ** (continue with init, but disable CDS if unable to create all 3) - -: 609: */ - 3: 610: if (LC_OperData.HaveActiveCDS) - -: 611: { - #####: 612: if (LC_CreateTaskCDS() != CFE_SUCCESS) - -: 613: { - #####: 614: LC_OperData.HaveActiveCDS = FALSE; - -: 615: } - -: 616: } - -: 617: - -: 618: /* - -: 619: ** Create wp/ap definition tables - critical if CDS enabled - -: 620: */ - 3: 621: if ((Result = LC_CreateDefinitionTables()) != CFE_SUCCESS) - -: 622: { - 1: 623: return(Result); - -: 624: } - -: 625: - -: 626: /* - -: 627: ** CDS still active only if we created 3 CDS areas and 2 critical tables - -: 628: */ - 2: 629: if (LC_OperData.HaveActiveCDS) - -: 630: { - #####: 631: LC_OperData.TableResults |= LC_CDS_CREATED; - -: 632: } - -: 633: - -: 634: /* - -: 635: ** If any CDS area or critical table is not restored - initialize everything. - -: 636: ** (might be due to reset type, CDS disabled or corrupt, table restore error) - -: 637: */ - 2: 638: if (((LC_OperData.TableResults & LC_WRT_CDS_RESTORED) == LC_WRT_CDS_RESTORED) && - -: 639: ((LC_OperData.TableResults & LC_ART_CDS_RESTORED) == LC_ART_CDS_RESTORED) && - -: 640: ((LC_OperData.TableResults & LC_APP_CDS_RESTORED) == LC_APP_CDS_RESTORED) && - -: 641: ((LC_OperData.TableResults & LC_WDT_TBL_RESTORED) == LC_WDT_TBL_RESTORED) && - -: 642: ((LC_OperData.TableResults & LC_ADT_TBL_RESTORED) == LC_ADT_TBL_RESTORED)) - -: 643: { - #####: 644: LC_OperData.TableResults |= LC_CDS_RESTORED; - -: 645: - -: 646: /* - -: 647: ** Get a pointer to the watchpoint definition table data... - -: 648: */ - #####: 649: Result = CFE_TBL_GetAddress((void *)&LC_OperData.WDTPtr, LC_OperData.WDTHandle); - -: 650: - #####: 651: if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) - -: 652: { - #####: 653: CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 654: "Error getting WDT address, RC=0x%08X", Result); - #####: 655: return(Result); - -: 656: } - -: 657: - -: 658: /* - -: 659: ** Get a pointer to the actionpoint definition table data - -: 660: */ - #####: 661: Result = CFE_TBL_GetAddress((void *)&LC_OperData.ADTPtr, LC_OperData.ADTHandle); - -: 662: - #####: 663: if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) - -: 664: { - #####: 665: CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 666: "Error getting ADT address, RC=0x%08X", Result); - #####: 667: return(Result); - -: 668: } - -: 669: } - -: 670: else - -: 671: { - 2: 672: if ((Result = LC_LoadDefaultTables()) != CFE_SUCCESS) - -: 673: { - #####: 674: return(Result); - -: 675: } - -: 676: } - -: 677: - -: 678: /* - -: 679: ** Create watchpoint hash tables -- also subscribes to watchpoint packets - -: 680: */ - 2: 681: LC_CreateHashTable(); - -: 682: - -: 683: /* - -: 684: ** Display results of CDS initialization (if enabled at startup) - -: 685: */ - 2: 686: if ((LC_OperData.TableResults & LC_CDS_ENABLED) == LC_CDS_ENABLED) - -: 687: { - #####: 688: if ((LC_OperData.TableResults & LC_CDS_RESTORED) == LC_CDS_RESTORED) - -: 689: { - #####: 690: CFE_EVS_SendEvent(LC_CDS_RESTORED_INF_EID, CFE_EVS_INFORMATION, - -: 691: "Previous state restored from Critical Data Store"); - -: 692: } - #####: 693: else if ((LC_OperData.TableResults & LC_CDS_UPDATED) == LC_CDS_UPDATED) - -: 694: { - #####: 695: CFE_EVS_SendEvent(LC_CDS_UPDATED_INF_EID, CFE_EVS_INFORMATION, - -: 696: "Default state loaded and written to CDS, activity mask = 0x%08X", - -: 697: LC_OperData.TableResults); - -: 698: } - -: 699: else - -: 700: { - #####: 701: CFE_EVS_SendEvent(LC_CDS_DISABLED_INF_EID, CFE_EVS_INFORMATION, - -: 702: "LC use of Critical Data Store disabled, activity mask = 0x%08X", - -: 703: LC_OperData.TableResults); - -: 704: } - -: 705: } - -: 706: - 2: 707: return(CFE_SUCCESS); - -: 708: - -: 709:} /* LC_TableInit() */ - -: 710: - -: 711: - -: 712:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 713:/* */ - -: 714:/* Startup initialization - create WP and AP results tables */ - -: 715:/* */ - -: 716:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 717: - -: 718:int32 LC_CreateResultTables(void) - 14: 719:{ - -: 720: int32 Result; - -: 721: uint32 DataSize; - -: 722: uint32 OptionFlags; - -: 723: - -: 724: /* - -: 725: ** Set "dump only" table option flags - -: 726: */ - 14: 727: OptionFlags = CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_DUMP_ONLY; - -: 728: - -: 729: /* - -: 730: ** Register the Watchpoint Results Table (WRT) - "dump only" tables - -: 731: ** cannot be critical with CDS use managed by CFE Table Services. - -: 732: */ - 14: 733: DataSize = LC_MAX_WATCHPOINTS * sizeof(LC_WRTEntry_t); - 14: 734: Result = CFE_TBL_Register(&LC_OperData.WRTHandle, LC_WRT_TABLENAME, - -: 735: DataSize, OptionFlags, NULL); - 14: 736: if (Result != CFE_SUCCESS) - -: 737: { - 1: 738: CFE_EVS_SendEvent(LC_WRT_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 739: "Error registering WRT, RC=0x%08X", Result); - 1: 740: return(Result); - -: 741: } - -: 742: - 13: 743: Result = CFE_TBL_GetAddress((void *)&LC_OperData.WRTPtr, LC_OperData.WRTHandle); - -: 744: - 13: 745: if (Result != CFE_SUCCESS) - -: 746: { - 7: 747: CFE_EVS_SendEvent(LC_WRT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 748: "Error getting WRT address, RC=0x%08X", Result); - 7: 749: return(Result); - -: 750: } - -: 751: - 6: 752: LC_OperData.TableResults |= LC_WRT_TBL_CREATED; - -: 753: - -: 754: /* - -: 755: ** Register the Actionpoint Results Table (ART) - "dump only" tables - -: 756: ** cannot be critical with CDS use managed by CFE Table Services. - -: 757: */ - 6: 758: DataSize = LC_MAX_ACTIONPOINTS * sizeof (LC_ARTEntry_t); - 6: 759: Result = CFE_TBL_Register(&LC_OperData.ARTHandle, LC_ART_TABLENAME, - -: 760: DataSize, OptionFlags, NULL); - 6: 761: if (Result != CFE_SUCCESS) - -: 762: { - 1: 763: CFE_EVS_SendEvent(LC_ART_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 764: "Error registering ART, RC=0x%08X", Result); - 1: 765: return(Result); - -: 766: } - -: 767: - 5: 768: Result = CFE_TBL_GetAddress((void *)&LC_OperData.ARTPtr, LC_OperData.ARTHandle); - -: 769: - 5: 770: if (Result != CFE_SUCCESS) - -: 771: { - 1: 772: CFE_EVS_SendEvent(LC_ART_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 773: "Error getting ART address, RC=0x%08X", Result); - 1: 774: return(Result); - -: 775: } - -: 776: - 4: 777: LC_OperData.TableResults |= LC_ART_TBL_CREATED; - -: 778: - 4: 779: return(CFE_SUCCESS); - -: 780: - -: 781:} /* LC_CreateResultTables() */ - -: 782: - -: 783: - -: 784:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 785:/* */ - -: 786:/* Startup initialization - create WP and AP definition tables */ - -: 787:/* */ - -: 788:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 789: - -: 790:int32 LC_CreateDefinitionTables(void) - 7: 791:{ - -: 792: int32 Result; - -: 793: uint32 DataSize; - -: 794: uint32 OptionFlags; - -: 795: boolean HadActiveCDS; - -: 796: - -: 797: /* - -: 798: ** Initial state of table restoration - -: 799: */ - 7: 800: HadActiveCDS = LC_OperData.HaveActiveCDS; - -: 801: - -: 802: /* - -: 803: ** If CDS is still enabled, try to register the 2 definition tables as critical - -: 804: ** (if error, continue with init - but disable CDS and re-register as non-critical) - -: 805: */ - 7: 806: if (LC_OperData.HaveActiveCDS) - -: 807: { - 2: 808: OptionFlags = CFE_TBL_OPT_DEFAULT | CFE_TBL_OPT_CRITICAL; - -: 809: } - -: 810: else - -: 811: { - 5: 812: OptionFlags = CFE_TBL_OPT_DEFAULT; - -: 813: } - -: 814: - -: 815: /* - -: 816: ** Register the Watchpoint Definition Table (WDT) - -: 817: */ - 7: 818: DataSize = LC_MAX_WATCHPOINTS * sizeof (LC_WDTEntry_t); - 7: 819: Result = CFE_TBL_Register(&LC_OperData.WDTHandle, LC_WDT_TABLENAME, - -: 820: DataSize, OptionFlags, LC_ValidateWDT); - -: 821: - 7: 822: if ((LC_OperData.HaveActiveCDS) && - -: 823: ((Result != CFE_TBL_INFO_RECOVERED_TBL) && (Result != CFE_SUCCESS))) - -: 824: { - 1: 825: LC_OperData.HaveActiveCDS = FALSE; - 1: 826: OptionFlags = CFE_TBL_OPT_DEFAULT; - -: 827: - -: 828: /* - -: 829: ** Re-register the Watchpoint Definition Table (WDT) non-critical - -: 830: */ - 1: 831: Result = CFE_TBL_Register(&LC_OperData.WDTHandle, LC_WDT_TABLENAME, - -: 832: DataSize, OptionFlags, LC_ValidateWDT); - -: 833: } - -: 834: - 7: 835: if (Result == CFE_TBL_INFO_RECOVERED_TBL) - -: 836: { - #####: 837: LC_OperData.TableResults |= LC_WDT_CRITICAL_TBL; - #####: 838: LC_OperData.TableResults |= LC_WDT_TBL_RESTORED; - -: 839: } - 7: 840: else if (Result == CFE_SUCCESS) - -: 841: { - 4: 842: if (LC_OperData.HaveActiveCDS) - -: 843: { - 1: 844: LC_OperData.TableResults |= LC_WDT_CRITICAL_TBL; - -: 845: } - -: 846: else - -: 847: { - 3: 848: LC_OperData.TableResults |= LC_WDT_NOT_CRITICAL; - -: 849: } - -: 850: } - -: 851: else - -: 852: { - -: 853: /* - -: 854: ** Task initialization fails without this table - -: 855: */ - 3: 856: CFE_EVS_SendEvent(LC_WDT_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 857: "Error registering WDT, RC=0x%08X", Result); - 3: 858: return(Result); - -: 859: } - -: 860: - -: 861: /* - -: 862: ** Register the Actionpoint Definition Table (ADT) - -: 863: */ - 4: 864: DataSize = LC_MAX_ACTIONPOINTS * sizeof (LC_ADTEntry_t); - 4: 865: Result = CFE_TBL_Register(&LC_OperData.ADTHandle, LC_ADT_TABLENAME, - -: 866: DataSize, OptionFlags, LC_ValidateADT); - -: 867: - 4: 868: if ((LC_OperData.HaveActiveCDS) && - -: 869: ((Result != CFE_TBL_INFO_RECOVERED_TBL) && (Result != CFE_SUCCESS))) - -: 870: { - #####: 871: LC_OperData.HaveActiveCDS = FALSE; - #####: 872: OptionFlags = CFE_TBL_OPT_DEFAULT; - -: 873: - -: 874: /* - -: 875: ** Re-register the Actionpoint Definition Table (ADT) non-critical - -: 876: */ - #####: 877: Result = CFE_TBL_Register(&LC_OperData.ADTHandle, LC_ADT_TABLENAME, - -: 878: DataSize, OptionFlags, LC_ValidateADT); - -: 879: } - -: 880: - 4: 881: if (Result == CFE_TBL_INFO_RECOVERED_TBL) - -: 882: { - #####: 883: LC_OperData.TableResults |= LC_ADT_CRITICAL_TBL; - #####: 884: LC_OperData.TableResults |= LC_ADT_TBL_RESTORED; - -: 885: } - 4: 886: else if (Result == CFE_SUCCESS) - -: 887: { - 3: 888: if (LC_OperData.HaveActiveCDS) - -: 889: { - 1: 890: LC_OperData.TableResults |= LC_ADT_CRITICAL_TBL; - -: 891: } - -: 892: else - -: 893: { - 2: 894: LC_OperData.TableResults |= LC_ADT_NOT_CRITICAL; - -: 895: } - -: 896: } - -: 897: else - -: 898: { - -: 899: /* - -: 900: ** Task initialization fails without this table - -: 901: */ - 1: 902: CFE_EVS_SendEvent(LC_ADT_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 903: "Error registering ADT, RC=0x%08X", Result); - 1: 904: return(Result); - -: 905: } - -: 906: - -: 907: /* - -: 908: ** In case we created a critical WDT and then created a non-critical ADT - -: 909: */ - 3: 910: if (((LC_OperData.TableResults & LC_WDT_CRITICAL_TBL) == LC_WDT_CRITICAL_TBL) && - -: 911: ((LC_OperData.TableResults & LC_ADT_NOT_CRITICAL) == LC_ADT_NOT_CRITICAL)) - -: 912: { - -: 913: /* - -: 914: ** Un-register the critical watchpoint Definition Table (WDT) - -: 915: */ - 1: 916: CFE_TBL_Unregister(LC_OperData.WDTHandle); - -: 917: - -: 918: /* - -: 919: ** Re-register the Watchpoint Definition Table (WDT) non-critical - -: 920: */ - 1: 921: DataSize = LC_MAX_WATCHPOINTS * sizeof (LC_WDTEntry_t); - 1: 922: OptionFlags = CFE_TBL_OPT_DEFAULT; - 1: 923: Result = CFE_TBL_Register(&LC_OperData.WDTHandle, LC_WDT_TABLENAME, - -: 924: DataSize, OptionFlags, LC_ValidateWDT); - 1: 925: if (Result == CFE_SUCCESS) - -: 926: { - 1: 927: LC_OperData.TableResults |= LC_WDT_NOT_CRITICAL; - -: 928: } - -: 929: else - -: 930: { - -: 931: /* - -: 932: ** Task initialization fails without this table - -: 933: */ - #####: 934: CFE_EVS_SendEvent(LC_WDT_REREGISTER_ERR_EID, CFE_EVS_ERROR, - -: 935: "Error re-registering WDT, RC=0x%08X", Result); - #####: 936: return(Result); - -: 937: } - -: 938: } - -: 939: - 3: 940: return(CFE_SUCCESS); - -: 941: - -: 942:} /* LC_CreateDefinitionTables() */ - -: 943: - -: 944: - -: 945:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 946:/* */ - -: 947:/* Startup initialization - create Critical Data Store (CDS) */ - -: 948:/* */ - -: 949:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 950: - -: 951:int32 LC_CreateTaskCDS(void) - #####: 952:{ - -: 953: int32 Result; - -: 954: uint32 DataSize; - -: 955: uint8 RestoredLCState; - -: 956: - -: 957: /* - -: 958: ** Create CDS and try to restore Watchpoint Results Table (WRT) data - -: 959: */ - #####: 960: DataSize = LC_MAX_WATCHPOINTS * sizeof(LC_WRTEntry_t); - #####: 961: Result = CFE_ES_RegisterCDS(&LC_OperData.WRTDataCDSHandle, DataSize, LC_WRT_CDSNAME); - -: 962: - #####: 963: if (Result == CFE_SUCCESS) - -: 964: { - -: 965: /* - -: 966: ** Normal result after a power on reset (cold boot) - continue with next CDS area - -: 967: */ - #####: 968: LC_OperData.TableResults |= LC_WRT_CDS_CREATED; - -: 969: } - #####: 970: else if (Result == CFE_ES_CDS_ALREADY_EXISTS) - -: 971: { - -: 972: /* - -: 973: ** Normal result after a processor reset (warm boot) - try to restore previous data - -: 974: */ - #####: 975: LC_OperData.TableResults |= LC_WRT_CDS_CREATED; - -: 976: - #####: 977: Result = CFE_ES_RestoreFromCDS(LC_OperData.WRTPtr, LC_OperData.WRTDataCDSHandle); - -: 978: - #####: 979: if (Result == CFE_SUCCESS) - -: 980: { - #####: 981: LC_OperData.TableResults |= LC_WRT_CDS_RESTORED; - -: 982: } - -: 983: } - -: 984: else - -: 985: { - #####: 986: CFE_EVS_SendEvent(LC_WRT_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 987: "Error registering WRT CDS Area, RC=0x%08X", Result); - #####: 988: return(Result); - -: 989: } - -: 990: - -: 991: /* - -: 992: ** Create CDS and try to restore Actionpoint Results Table (ART) data - -: 993: */ - #####: 994: DataSize = LC_MAX_ACTIONPOINTS * sizeof(LC_ARTEntry_t); - #####: 995: Result = CFE_ES_RegisterCDS(&LC_OperData.ARTDataCDSHandle, DataSize, LC_ART_CDSNAME); - -: 996: - #####: 997: if (Result == CFE_SUCCESS) - -: 998: { - -: 999: /* - -: 1000: ** Normal result after a power on reset (cold boot) - continue with next CDS area - -: 1001: */ - #####: 1002: LC_OperData.TableResults |= LC_ART_CDS_CREATED; - -: 1003: } - #####: 1004: else if (Result == CFE_ES_CDS_ALREADY_EXISTS) - -: 1005: { - -: 1006: /* - -: 1007: ** Normal result after a processor reset (warm boot) - try to restore previous data - -: 1008: */ - #####: 1009: LC_OperData.TableResults |= LC_ART_CDS_CREATED; - -: 1010: - #####: 1011: Result = CFE_ES_RestoreFromCDS(LC_OperData.ARTPtr, LC_OperData.ARTDataCDSHandle); - -: 1012: - #####: 1013: if (Result == CFE_SUCCESS) - -: 1014: { - #####: 1015: LC_OperData.TableResults |= LC_ART_CDS_RESTORED; - -: 1016: } - -: 1017: } - -: 1018: else - -: 1019: { - #####: 1020: CFE_EVS_SendEvent(LC_ART_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 1021: "Error registering ART CDS Area, RC=0x%08X", Result); - #####: 1022: return(Result); - -: 1023: } - -: 1024: - -: 1025: /* - -: 1026: ** Create CDS and try to restore Application (APP) data - -: 1027: */ - #####: 1028: DataSize = sizeof(LC_AppData_t); - #####: 1029: Result = CFE_ES_RegisterCDS(&LC_OperData.AppDataCDSHandle, DataSize, LC_APPDATA_CDSNAME); - -: 1030: - #####: 1031: if (Result == CFE_SUCCESS) - -: 1032: { - -: 1033: /* - -: 1034: ** Normal result after a power on reset (cold boot) - continue with next CDS area - -: 1035: */ - #####: 1036: LC_OperData.TableResults |= LC_APP_CDS_CREATED; - -: 1037: } - #####: 1038: else if (Result == CFE_ES_CDS_ALREADY_EXISTS) - -: 1039: { - -: 1040: /* - -: 1041: ** Normal result after a processor reset (warm boot) - try to restore previous data - -: 1042: */ - #####: 1043: LC_OperData.TableResults |= LC_APP_CDS_CREATED; - -: 1044: - #####: 1045: Result = CFE_ES_RestoreFromCDS(&LC_AppData, LC_OperData.AppDataCDSHandle); - -: 1046: - #####: 1047: if ((Result == CFE_SUCCESS) && (LC_AppData.CDSSavedOnExit == LC_CDS_SAVED)) - -: 1048: { - -: 1049: /* - -: 1050: ** Success - only if previous session saved CDS data at least once - -: 1051: */ - #####: 1052: LC_OperData.TableResults |= LC_APP_CDS_RESTORED; - -: 1053: - -: 1054: /* - -: 1055: ** May need to override the restored application state - -: 1056: */ - #####: 1057: RestoredLCState = LC_STATE_WHEN_CDS_RESTORED; - #####: 1058: if (RestoredLCState != LC_STATE_FROM_CDS) - -: 1059: { - #####: 1060: LC_AppData.CurrentLCState = RestoredLCState; - -: 1061: } - -: 1062: } - -: 1063: } - -: 1064: else - -: 1065: { - #####: 1066: CFE_EVS_SendEvent(LC_APP_CDS_REGISTER_ERR_EID, CFE_EVS_ERROR, - -: 1067: "Error registering application data CDS Area, RC=0x%08X", Result); - #####: 1068: return(Result); - -: 1069: } - -: 1070: - #####: 1071: return(CFE_SUCCESS); - -: 1072: - -: 1073:} /* LC_CreateTaskCDS() */ - -: 1074: - -: 1075: - -: 1076:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1077:/* */ - -: 1078:/* Startup initialization - load default WP/AP definition tables */ - -: 1079:/* */ - -: 1080:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1081: - -: 1082:int32 LC_LoadDefaultTables(void) - 7: 1083:{ - -: 1084: int32 Result; - -: 1085: - -: 1086: /* - -: 1087: ** Load default watchpoint definition table (WDT) - -: 1088: */ - 7: 1089: Result = CFE_TBL_Load(LC_OperData.WDTHandle, CFE_TBL_SRC_FILE, LC_WDT_FILENAME); - -: 1090: - 7: 1091: if (Result == CFE_SUCCESS) - -: 1092: { - 6: 1093: LC_OperData.TableResults |= LC_WDT_DEFAULT_TBL; - -: 1094: } - -: 1095: else - -: 1096: { - -: 1097: /* - -: 1098: ** Task initialization fails without this table - -: 1099: */ - 1: 1100: CFE_EVS_SendEvent(LC_WDT_LOAD_ERR_EID, CFE_EVS_ERROR, - -: 1101: "Error (RC=0x%08X) Loading WDT with '%s'", Result, LC_WDT_FILENAME); - 1: 1102: return(Result); - -: 1103: } - -: 1104: - -: 1105: /* - -: 1106: ** Get a pointer to the watchpoint definition table data... - -: 1107: */ - 6: 1108: Result = CFE_TBL_GetAddress((void *)&LC_OperData.WDTPtr, LC_OperData.WDTHandle); - -: 1109: - 7: 1110: if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) - -: 1111: { - 1: 1112: CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 1113: "Error getting WDT address, RC=0x%08X", Result); - 1: 1114: return(Result); - -: 1115: } - -: 1116: - -: 1117: /* - -: 1118: ** Load default actionpoint definition table (ADT) - -: 1119: */ - 5: 1120: Result = CFE_TBL_Load(LC_OperData.ADTHandle, CFE_TBL_SRC_FILE, LC_ADT_FILENAME); - -: 1121: - 5: 1122: if (Result == CFE_SUCCESS) - -: 1123: { - 4: 1124: LC_OperData.TableResults |= LC_ADT_DEFAULT_TBL; - -: 1125: } - -: 1126: else - -: 1127: { - -: 1128: /* - -: 1129: ** Task initialization fails without this table - -: 1130: */ - 1: 1131: CFE_EVS_SendEvent(LC_ADT_LOAD_ERR_EID, CFE_EVS_ERROR, - -: 1132: "Error (RC=0x%08X) Loading ADT with '%s'", Result, LC_ADT_FILENAME); - 1: 1133: return(Result); - -: 1134: } - -: 1135: - -: 1136: /* - -: 1137: ** Get a pointer to the actionpoint definition table data - -: 1138: */ - 4: 1139: Result = CFE_TBL_GetAddress((void *)&LC_OperData.ADTPtr, LC_OperData.ADTHandle); - -: 1140: - 5: 1141: if ((Result != CFE_SUCCESS) && (Result != CFE_TBL_INFO_UPDATED)) - -: 1142: { - 1: 1143: CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 1144: "Error getting ADT address, RC=0x%08X", Result); - 1: 1145: return(Result); - -: 1146: } - -: 1147: - -: 1148: /* - -: 1149: ** Initialize the watchpoint and actionpoint result table data - -: 1150: */ - 3: 1151: LC_ResetResultsWP(0, LC_MAX_WATCHPOINTS - 1, FALSE); - 3: 1152: LC_OperData.TableResults |= LC_WRT_DEFAULT_DATA; - -: 1153: - 3: 1154: LC_ResetResultsAP(0, LC_MAX_ACTIONPOINTS - 1, FALSE); - 3: 1155: LC_OperData.TableResults |= LC_ART_DEFAULT_DATA; - -: 1156: - -: 1157: /* - -: 1158: ** Reset application data counters reported in housekeeping - -: 1159: */ - 3: 1160: LC_ResetCounters(); - -: 1161: - -: 1162: /* - -: 1163: ** Set LC operational state to configured startup value - -: 1164: */ - 3: 1165: LC_AppData.CurrentLCState = LC_STATE_POWER_ON_RESET; - 3: 1166: LC_OperData.TableResults |= LC_APP_DEFAULT_DATA; - -: 1167: - -: 1168: /* - -: 1169: ** If CDS is enabled - try to update the 3 CDS areas managed by the LC task - -: 1170: ** (continue, but disable CDS if unable to update all 3) - -: 1171: */ - 3: 1172: if (LC_OperData.HaveActiveCDS) - -: 1173: { - #####: 1174: if (LC_UpdateTaskCDS() == CFE_SUCCESS) - -: 1175: { - #####: 1176: LC_OperData.TableResults |= LC_CDS_UPDATED; - -: 1177: } - -: 1178: else - -: 1179: { - #####: 1180: LC_OperData.HaveActiveCDS = FALSE; - -: 1181: } - -: 1182: } - -: 1183: - 3: 1184: return(CFE_SUCCESS); - -: 1185: - -: 1186:} /* LC_LoadDefaultTables() */ - -: 1187: - -: 1188: - -: 1189:/************************/ - -: 1190:/* End of File Comment */ - -: 1191:/************************/ diff --git a/fsw/unit_test/output_noCDS/lc_cmds.c.gcov b/fsw/unit_test/output_noCDS/lc_cmds.c.gcov deleted file mode 100644 index 6a47010..0000000 --- a/fsw/unit_test/output_noCDS/lc_cmds.c.gcov +++ /dev/null @@ -1,1429 +0,0 @@ - -: 0:Source:../src/lc_cmds.c - -: 0:Graph:lc_cmds.gcno - -: 0:Data:lc_cmds.gcda - -: 0:Runs:1 - -: 0:Programs:2 - -: 1:/************************************************************************ - -: 2:** File: - -: 3:** $Id: lc_cmds.c.gcov 1.1.1.1 2012/10/01 18:48:32EDT lwalling Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** CFS Limit Checker (LC) command handling routines - -: 7:** - -: 8:** $Log: lc_cmds.c.gcov $ - -: 8:** Revision 1.1.1.1 2012/10/01 18:48:32EDT lwalling - -: 8:** Apply unit test output file updates to branch - -: 8:** Revision 1.3 2012/10/01 13:57:39PDT lwalling - -: 8:** Updates to output files after fix compile warnings - -: 9:** Revision 1.5 2012/08/22 14:17:02PDT lwalling - -: 10:** Modified true to false transition monitor to also accept stale to false - -: 11:** Revision 1.4 2012/08/01 14:03:03PDT lwalling - -: 12:** Add age WP results option to AP sample command - -: 13:** Revision 1.3 2012/08/01 12:40:48PDT lwalling - -: 14:** Add STALE counters to watchpoint definition and result tables - -: 15:** Revision 1.2 2012/08/01 11:20:12PDT lwalling - -: 16:** Change NOT_MEASURED to STALE - -: 17:** Revision 1.1 2012/07/31 13:53:37PDT nschweis - -: 18:** Initial revision - -: 19:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj - -: 20:** Revision 1.15 2011/06/08 16:11:29EDT lwalling - -: 21:** Changed call from LC_SubscribeWP() to LC_CreateHashTable(), removed function LC_SubscribeWP() - -: 22:** Revision 1.14 2011/03/02 10:53:35EST lwalling - -: 23:** Explicitly state return value when known to be CFE_SUCCESS - -: 24:** Revision 1.13 2011/03/01 15:42:08EST lwalling - -: 25:** Fix typo in manage function, move LC_SubscribeWP() and LC_UpdateTaskCDS() to lc_cmds.c - -: 26:** Revision 1.12 2011/03/01 09:37:34EST lwalling - -: 27:** Modified table management logic and updates to CDS - -: 28:** Revision 1.11 2011/02/14 16:53:21EST lwalling - -: 29:** Created LC_ResetResultsAP() and LC_ResetResultsWP(), modified reset stats cmd handlers to call them - -: 30:** Revision 1.10 2011/02/07 17:58:12EST lwalling - -: 31:** Modify sample AP commands to target groups of AP's - -: 32:** Revision 1.9 2011/01/19 11:32:07EST jmdagost - -: 33:** Moved mission revision number from lc_version.h to lc_platform_cfg.h. - -: 34:** Revision 1.8 2010/03/01 11:12:10EST lwalling - -: 35:** Set data saved state flag whenever critical data is stored - -: 36:** Revision 1.7 2010/02/23 12:12:01EST lwalling - -: 37:** Add PassiveAPCount to list of AP results cleared by command - -: 38:** Revision 1.6 2010/01/04 14:10:03EST lwalling - -: 39:** Update CDS when report housekeeping - -: 40:** Revision 1.5 2009/01/15 15:36:14EST dahardis - -: 41:** Unit test fixes - -: 42:** Revision 1.4 2009/01/09 11:34:53EST dahardis - -: 43:** Fixed call to CFE_TBL_GetAddress for the Actionpoint Definition Table that was - -: 44:** passing in the wrong table handle, causing the Actionpoint Results Table to be - -: 45:** initialized incorrectly. - -: 46:** Revision 1.3 2008/12/10 09:38:36EST dahardis - -: 47:** Fixed calls to CFE_TBL_GetAddress (DCR #4699) - -: 48:** Revision 1.2 2008/12/03 13:59:34EST dahardis - -: 49:** Corrections from peer code review - -: 50:** Revision 1.1 2008/10/29 14:19:03EDT dahardison - -: 51:** Initial revision - -: 52:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 53:** - -: 54:*************************************************************************/ - -: 55: - -: 56:/************************************************************************ - -: 57:** Includes - -: 58:*************************************************************************/ - -: 59:#include "lc_app.h" - -: 60:#include "lc_cmds.h" - -: 61:#include "lc_msgids.h" - -: 62:#include "lc_events.h" - -: 63:#include "lc_version.h" - -: 64:#include "lc_action.h" - -: 65:#include "lc_watch.h" - -: 66:#include "lc_platform_cfg.h" - -: 67: - -: 68:/************************************************************************ - -: 69:** Local function prototypes - -: 70:*************************************************************************/ - -: 71:/************************************************************************/ - -: 72:/** \brief Sample actionpoints request - -: 73:** - -: 74:** \par Description - -: 75:** Processes an on-board sample actionpoints request message. - -: 76:** - -: 77:** \par Assumptions, External Events, and Notes: - -: 78:** This message does not affect the command execution counter - -: 79:** - -: 80:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 81:** references the software bus message - -: 82:** - -: 83:*************************************************************************/ - -: 84:void LC_SampleAPReq(CFE_SB_MsgPtr_t MessagePtr); - -: 85: - -: 86:/************************************************************************/ - -: 87:/** \brief Housekeeping request - -: 88:** - -: 89:** \par Description - -: 90:** Processes an on-board housekeeping request message. - -: 91:** - -: 92:** \par Assumptions, External Events, and Notes: - -: 93:** This message does not affect the command execution counter - -: 94:** - -: 95:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 96:** references the software bus message - -: 97:** - -: 98:** \returns - -: 99:** \retcode #CFE_SUCCESS \retdesc \copydoc CFE_SUCCESS \endcode - -: 100:** \retstmt Return codes from #LC_AcquirePointers \endcode - -: 101:** \endreturns - -: 102:** - -: 103:*************************************************************************/ - -: 104:int32 LC_HousekeepingReq(CFE_SB_MsgPtr_t MessagePtr); - -: 105: - -: 106:/************************************************************************/ - -: 107:/** \brief Noop command - -: 108:** - -: 109:** \par Description - -: 110:** Processes a noop ground command. - -: 111:** - -: 112:** \par Assumptions, External Events, and Notes: - -: 113:** None - -: 114:** - -: 115:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 116:** references the software bus message - -: 117:** - -: 118:** \sa #LC_NOOP_CC - -: 119:** - -: 120:*************************************************************************/ - -: 121:void LC_NoopCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 122: - -: 123:/************************************************************************/ - -: 124:/** \brief Reset counters command - -: 125:** - -: 126:** \par Description - -: 127:** Processes a reset counters ground command which will reset - -: 128:** the following LC application counters to zero: - -: 129:** - Command counter - -: 130:** - Command error counter - -: 131:** - Actionpoint sample counter - -: 132:** - Monitored message counter - -: 133:** - RTS execution counter - -: 134:** - Passive RTS execution counter - -: 135:** - -: 136:** \par Assumptions, External Events, and Notes: - -: 137:** None - -: 138:** - -: 139:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 140:** references the software bus message - -: 141:** - -: 142:** \sa #LC_RESET_CC - -: 143:** - -: 144:*************************************************************************/ - -: 145:void LC_ResetCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 146: - -: 147:/************************************************************************/ - -: 148:/** \brief Set LC state command - -: 149:** - -: 150:** \par Description - -: 151:** Processes a set LC application state ground command. - -: 152:** - -: 153:** \par Assumptions, External Events, and Notes: - -: 154:** None - -: 155:** - -: 156:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 157:** references the software bus message - -: 158:** - -: 159:** \sa #LC_SET_LC_STATE_CC - -: 160:** - -: 161:*************************************************************************/ - -: 162:void LC_SetLCStateCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 163: - -: 164:/************************************************************************/ - -: 165:/** \brief Set AP state command - -: 166:** - -: 167:** \par Description - -: 168:** Processes a set actionpoint state ground command. - -: 169:** - -: 170:** \par Assumptions, External Events, and Notes: - -: 171:** None - -: 172:** - -: 173:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 174:** references the software bus message - -: 175:** - -: 176:** \sa #LC_SET_AP_STATE_CC - -: 177:** - -: 178:*************************************************************************/ - -: 179:void LC_SetAPStateCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 180: - -: 181:/************************************************************************/ - -: 182:/** \brief Set AP permanently off command - -: 183:** - -: 184:** \par Description - -: 185:** Processes a set actionpoint permanently off ground command. - -: 186:** - -: 187:** \par Assumptions, External Events, and Notes: - -: 188:** None - -: 189:** - -: 190:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 191:** references the software bus message - -: 192:** - -: 193:** \sa #LC_SET_AP_PERMOFF_CC - -: 194:** - -: 195:*************************************************************************/ - -: 196:void LC_SetAPPermOffCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 197: - -: 198:/************************************************************************/ - -: 199:/** \brief Reset AP statistics command - -: 200:** - -: 201:** \par Description - -: 202:** Processes a reset actionpoint statistics ground command. - -: 203:** - -: 204:** \par Assumptions, External Events, and Notes: - -: 205:** None - -: 206:** - -: 207:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 208:** references the software bus message - -: 209:** - -: 210:** \sa #LC_RESET_AP_STATS_CC - -: 211:** - -: 212:*************************************************************************/ - -: 213:void LC_ResetAPStatsCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 214: - -: 215:/************************************************************************/ - -: 216:/** \brief Reset WP statistics command - -: 217:** - -: 218:** \par Description - -: 219:** Processes a reset watchpoint statistics ground command. - -: 220:** - -: 221:** \par Assumptions, External Events, and Notes: - -: 222:** None - -: 223:** - -: 224:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 225:** references the software bus message - -: 226:** - -: 227:** \sa #LC_RESET_WP_STATS_CC - -: 228:** - -: 229:*************************************************************************/ - -: 230:void LC_ResetWPStatsCmd(CFE_SB_MsgPtr_t MessagePtr); - -: 231: - -: 232:/************************************************************************/ - -: 233:/** \brief Verify message length - -: 234:** - -: 235:** \par Description - -: 236:** Checks if the actual length of a software bus message matches - -: 237:** the expected length and sends an error event if a mismatch - -: 238:** occures - -: 239:** - -: 240:** \par Assumptions, External Events, and Notes: - -: 241:** None - -: 242:** - -: 243:** \param [in] msg A #CFE_SB_MsgPtr_t pointer that - -: 244:** references the software bus message - -: 245:** - -: 246:** \param [in] ExpectedLength The expected length of the message - -: 247:** based upon the command code - -: 248:** - -: 249:** \returns - -: 250:** \retstmt Returns TRUE if the length is as expected \endcode - -: 251:** \retstmt Returns FALSE if the length is not as expected \endcode - -: 252:** \endreturns - -: 253:** - -: 254:** \sa #LC_LEN_ERR_EID - -: 255:** - -: 256:*************************************************************************/ - -: 257:boolean LC_VerifyMsgLength(CFE_SB_MsgPtr_t msg, - -: 258: uint16 ExpectedLength); - -: 259: - -: 260:int32 LC_ManageTables(void); - -: 261: - -: 262: - -: 263: - -: 264:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 265:/* */ - -: 266:/* Process a command pipe message */ - -: 267:/* */ - -: 268:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 269:int32 LC_AppPipe(CFE_SB_MsgPtr_t MessagePtr) - 33: 270:{ - 33: 271: int32 Status = CFE_SUCCESS; - 33: 272: CFE_SB_MsgId_t MessageID = 0; - 33: 273: uint16 CommandCode = 0; - -: 274: - 33: 275: MessageID = CFE_SB_GetMsgId(MessagePtr); - 33: 276: switch (MessageID) - -: 277: { - -: 278: /* - -: 279: ** Sample actionpoints request - -: 280: */ - -: 281: case LC_SAMPLE_AP_MID: - 4: 282: LC_SampleAPReq(MessagePtr); - 4: 283: break; - -: 284: - -: 285: /* - -: 286: ** Housekeeping telemetry request - -: 287: ** (only routine that can return a critical error indicator) - -: 288: */ - -: 289: case LC_SEND_HK_MID: - 2: 290: Status = LC_HousekeepingReq(MessagePtr); - 2: 291: break; - -: 292: - -: 293: /* - -: 294: ** LC application commands... - -: 295: */ - -: 296: case LC_CMD_MID: - -: 297: - 26: 298: CommandCode = CFE_SB_GetCmdCode(MessagePtr); - 26: 299: switch (CommandCode) - -: 300: { - -: 301: case LC_NOOP_CC: - 2: 302: LC_NoopCmd(MessagePtr); - 2: 303: break; - -: 304: - -: 305: case LC_RESET_CC: - 2: 306: LC_ResetCmd(MessagePtr); - 2: 307: break; - -: 308: - -: 309: case LC_SET_LC_STATE_CC: - 5: 310: LC_SetLCStateCmd(MessagePtr); - 5: 311: break; - -: 312: - -: 313: case LC_SET_AP_STATE_CC: - 6: 314: LC_SetAPStateCmd(MessagePtr); - 6: 315: break; - -: 316: - -: 317: case LC_SET_AP_PERMOFF_CC: - 2: 318: LC_SetAPPermOffCmd(MessagePtr); - 2: 319: break; - -: 320: - -: 321: case LC_RESET_AP_STATS_CC: - 4: 322: LC_ResetAPStatsCmd(MessagePtr); - 4: 323: break; - -: 324: - -: 325: case LC_RESET_WP_STATS_CC: - 4: 326: LC_ResetWPStatsCmd(MessagePtr); - 4: 327: break; - -: 328: - -: 329: default: - 1: 330: CFE_EVS_SendEvent(LC_CC_ERR_EID, CFE_EVS_ERROR, - -: 331: "Invalid command code: ID = 0x%04X, CC = %d", - -: 332: MessageID, CommandCode); - -: 333: - 1: 334: LC_AppData.CmdErrCount++; - -: 335: break; - -: 336: - -: 337: } /* end CommandCode switch */ - 26: 338: break; - -: 339: - -: 340: /* - -: 341: ** All other message ID's should be monitor - -: 342: ** packets - -: 343: */ - -: 344: default: - 1: 345: LC_CheckMsgForWPs(MessageID, MessagePtr); - -: 346: break; - -: 347: - -: 348: } /* end MessageID switch */ - -: 349: - 33: 350: return (Status); - -: 351: - -: 352:} /* End LC_AppPipe */ - -: 353: - -: 354:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 355:/* */ - -: 356:/* Sample Actionpoints Request */ - -: 357:/* */ - -: 358:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 359:void LC_SampleAPReq(CFE_SB_MsgPtr_t MessagePtr) - 19: 360:{ - 19: 361: LC_SampleAP_t *LC_SampleAP = (LC_SampleAP_t *) MessagePtr; - 19: 362: uint16 ExpectedLength = sizeof(LC_SampleAP_t); - -: 363: uint16 WatchIndex; - 19: 364: boolean ValidSampleCmd = FALSE; - -: 365: - -: 366: /* - -: 367: ** Verify message packet length - -: 368: */ - 19: 369: if (LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 370: { - -: 371: /* - -: 372: ** Ignore AP sample requests if disabled at the application level - -: 373: */ - 18: 374: if (LC_AppData.CurrentLCState != LC_STATE_DISABLED) - -: 375: { - -: 376: /* - -: 377: ** Range check the actionpoint array index arguments - -: 378: */ - 19: 379: if ((LC_SampleAP->StartIndex == LC_ALL_ACTIONPOINTS) && - -: 380: (LC_SampleAP->EndIndex == LC_ALL_ACTIONPOINTS)) - -: 381: { - -: 382: /* - -: 383: ** Allow special "sample all" heritage values - -: 384: */ - 1: 385: LC_SampleAPs(0, LC_MAX_ACTIONPOINTS - 1); - 1: 386: ValidSampleCmd = TRUE; - -: 387: } - 31: 388: else if ((LC_SampleAP->StartIndex <= LC_SampleAP->EndIndex) && - -: 389: (LC_SampleAP->EndIndex < LC_MAX_ACTIONPOINTS)) - -: 390: { - -: 391: /* - -: 392: ** Start is less or equal to end, and end is within the array - -: 393: */ - 14: 394: LC_SampleAPs(LC_SampleAP->StartIndex, LC_SampleAP->EndIndex); - 14: 395: ValidSampleCmd = TRUE; - -: 396: } - -: 397: else - -: 398: { - -: 399: /* - -: 400: ** At least one actionpoint array index is out of range - -: 401: */ - 3: 402: CFE_EVS_SendEvent(LC_APSAMPLE_APNUM_ERR_EID, CFE_EVS_ERROR, - -: 403: "Sample AP error: invalid AP number, start = %d, end = %d", - -: 404: LC_SampleAP->StartIndex, LC_SampleAP->EndIndex); - -: 405: } - -: 406: - -: 407: /* - -: 408: ** Optionally update the age of watchpoint results - -: 409: */ - 18: 410: if ((LC_SampleAP->UpdateAge != 0) && (ValidSampleCmd)) - -: 411: { - 177: 412: for (WatchIndex = 0; WatchIndex < LC_MAX_WATCHPOINTS; WatchIndex++) - -: 413: { - 176: 414: if (LC_OperData.WRTPtr[WatchIndex].CountdownToStale != 0) - -: 415: { - 1: 416: LC_OperData.WRTPtr[WatchIndex].CountdownToStale--; - -: 417: - 1: 418: if (LC_OperData.WRTPtr[WatchIndex].CountdownToStale == 0) - -: 419: { - 1: 420: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_STALE; - -: 421: } - -: 422: } - -: 423: } - -: 424: } - -: 425: } - -: 426: } - -: 427: - -: 428: return; - -: 429: - -: 430:} /* end LC_SampleAPReq */ - -: 431: - -: 432:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 433:/* */ - -: 434:/* Housekeeping request */ - -: 435:/* */ - -: 436:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 437:int32 LC_HousekeepingReq(CFE_SB_MsgPtr_t MessagePtr) - 4: 438:{ - -: 439: int32 Result; - 4: 440: uint16 ExpectedLength = sizeof(LC_NoArgsCmd_t); - -: 441: uint16 TableIndex; - -: 442: uint16 HKIndex; - -: 443: uint8 ByteData; - -: 444: - -: 445: /* - -: 446: ** Verify message packet length - -: 447: */ - 4: 448: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 449: { - -: 450: /* - -: 451: ** Update HK variables - -: 452: */ - 3: 453: LC_OperData.HkPacket.CmdCount = LC_AppData.CmdCount; - 3: 454: LC_OperData.HkPacket.CmdErrCount = LC_AppData.CmdErrCount; - 3: 455: LC_OperData.HkPacket.APSampleCount = LC_AppData.APSampleCount; - 3: 456: LC_OperData.HkPacket.MonitoredMsgCount = LC_AppData.MonitoredMsgCount; - 3: 457: LC_OperData.HkPacket.RTSExecCount = LC_AppData.RTSExecCount; - 3: 458: LC_OperData.HkPacket.PassiveRTSExecCount = LC_AppData.PassiveRTSExecCount; - 3: 459: LC_OperData.HkPacket.CurrentLCState = LC_AppData.CurrentLCState; - 3: 460: LC_OperData.HkPacket.WPsInUse = LC_OperData.WatchpointCount; - -: 461: - -: 462: /* - -: 463: ** Clear out the active actionpoint count, it will get - -: 464: ** recomputed below - -: 465: */ - 3: 466: LC_OperData.HkPacket.ActiveAPs = 0; - -: 467: - -: 468: /* - -: 469: ** Update packed watch results - -: 470: ** (4 watch results in one 8-bit byte) - -: 471: */ - 135: 472: for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex += 4) - -: 473: { - 132: 474: HKIndex = TableIndex / 4; - -: 475: - -: 476: /* - -: 477: ** Pack in first result - -: 478: */ - 132: 479: switch (LC_OperData.WRTPtr[TableIndex + 3].WatchResult) - -: 480: { - -: 481: case LC_WATCH_STALE: - 48: 482: ByteData = LC_HKWR_STALE << 6; - 48: 483: break; - -: 484: - -: 485: case LC_WATCH_FALSE: - 78: 486: ByteData = LC_HKWR_FALSE << 6; - 78: 487: break; - -: 488: - -: 489: case LC_WATCH_TRUE: - 3: 490: ByteData = LC_HKWR_TRUE << 6; - 3: 491: break; - -: 492: - -: 493: /* - -: 494: ** We should never get an undefined watch result, - -: 495: ** but we'll set an error result if we do - -: 496: */ - -: 497: case LC_WATCH_ERROR: - -: 498: default: - 3: 499: ByteData = LC_HKWR_ERROR << 6; - -: 500: break; - -: 501: } - -: 502: - -: 503: /* - -: 504: ** Pack in second result - -: 505: */ - 132: 506: switch (LC_OperData.WRTPtr[TableIndex + 2].WatchResult) - -: 507: { - -: 508: case LC_WATCH_STALE: - 46: 509: ByteData = (ByteData | (LC_HKWR_STALE << 4)); - 46: 510: break; - -: 511: - -: 512: case LC_WATCH_FALSE: - 80: 513: ByteData = (ByteData | (LC_HKWR_FALSE << 4)); - 80: 514: break; - -: 515: - -: 516: case LC_WATCH_TRUE: - 4: 517: ByteData = (ByteData | (LC_HKWR_TRUE << 4)); - 4: 518: break; - -: 519: - -: 520: case LC_WATCH_ERROR: - -: 521: default: - 2: 522: ByteData = (ByteData | (LC_HKWR_ERROR << 4)); - -: 523: break; - -: 524: } - -: 525: - -: 526: /* - -: 527: ** Pack in third result - -: 528: */ - 132: 529: switch (LC_OperData.WRTPtr[TableIndex + 1].WatchResult) - -: 530: { - -: 531: case LC_WATCH_STALE: - 47: 532: ByteData = (ByteData | (LC_HKWR_STALE << 2)); - 47: 533: break; - -: 534: - -: 535: case LC_WATCH_FALSE: - 78: 536: ByteData = (ByteData | (LC_HKWR_FALSE << 2)); - 78: 537: break; - -: 538: - -: 539: case LC_WATCH_TRUE: - 5: 540: ByteData = (ByteData | (LC_HKWR_TRUE << 2)); - 5: 541: break; - -: 542: - -: 543: case LC_WATCH_ERROR: - -: 544: default: - 2: 545: ByteData = (ByteData | (LC_HKWR_ERROR << 2)); - -: 546: break; - -: 547: } - -: 548: - -: 549: /* - -: 550: ** Pack in fourth and last result - -: 551: */ - 132: 552: switch (LC_OperData.WRTPtr[TableIndex].WatchResult) - -: 553: { - -: 554: case LC_WATCH_STALE: - 47: 555: ByteData = (ByteData | LC_HKWR_STALE); - 47: 556: break; - -: 557: - -: 558: case LC_WATCH_FALSE: - 80: 559: ByteData = (ByteData | LC_HKWR_FALSE); - 80: 560: break; - -: 561: - -: 562: case LC_WATCH_TRUE: - 3: 563: ByteData = (ByteData | LC_HKWR_TRUE); - 3: 564: break; - -: 565: - -: 566: case LC_WATCH_ERROR: - -: 567: default: - 2: 568: ByteData = (ByteData | LC_HKWR_ERROR); - -: 569: break; - -: 570: } - -: 571: - -: 572: /* - -: 573: ** Update houskeeping watch results array - -: 574: */ - 132: 575: LC_OperData.HkPacket.WPResults[HKIndex] = ByteData; - -: 576: - -: 577: } /* end watch results for loop */ - -: 578: - -: 579: /* - -: 580: ** Update packed action results - -: 581: ** (2 action state/result pairs (4 bits each) in one 8-bit byte) - -: 582: */ - 267: 583: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex += 2) - -: 584: { - 264: 585: HKIndex = TableIndex / 2; - -: 586: - -: 587: /* - -: 588: ** Pack in first actionpoint, current state - -: 589: */ - 264: 590: switch (LC_OperData.ARTPtr[TableIndex + 1].CurrentState) - -: 591: { - -: 592: case LC_ACTION_NOT_USED: - 95: 593: ByteData = LC_HKAR_STATE_NOT_USED << 6; - 95: 594: break; - -: 595: - -: 596: case LC_APSTATE_ACTIVE: - 83: 597: ByteData = LC_HKAR_STATE_ACTIVE << 6; - 83: 598: LC_OperData.HkPacket.ActiveAPs++; - 83: 599: break; - -: 600: - -: 601: case LC_APSTATE_PASSIVE: - 1: 602: ByteData = LC_HKAR_STATE_PASSIVE << 6; - 1: 603: break; - -: 604: - -: 605: case LC_APSTATE_DISABLED: - 1: 606: ByteData = LC_HKAR_STATE_DISABLED << 6; - 1: 607: break; - -: 608: - -: 609: /* - -: 610: ** Permanantly disabled actionpoints get reported - -: 611: ** as unused. We should never get an undefined - -: 612: ** action state, but we'll set to not used if we do. - -: 613: */ - -: 614: case LC_APSTATE_PERMOFF: - -: 615: default: - 84: 616: ByteData = LC_HKAR_STATE_NOT_USED << 6; - -: 617: break; - -: 618: } - -: 619: - -: 620: /* - -: 621: ** Pack in first actionpoint, action result - -: 622: */ - 264: 623: switch (LC_OperData.ARTPtr[TableIndex + 1].ActionResult) - -: 624: { - -: 625: case LC_ACTION_STALE: - 90: 626: ByteData = (ByteData | (LC_HKAR_STALE << 4)); - 90: 627: break; - -: 628: - -: 629: case LC_ACTION_PASS: - 172: 630: ByteData = (ByteData | (LC_HKAR_PASS << 4)); - 172: 631: break; - -: 632: - -: 633: case LC_ACTION_FAIL: - 1: 634: ByteData = (ByteData | (LC_HKAR_FAIL << 4)); - 1: 635: break; - -: 636: - -: 637: /* - -: 638: ** We should never get an undefined action result, - -: 639: ** but we'll set an error result if we do - -: 640: */ - -: 641: case LC_ACTION_ERROR: - -: 642: default: - 1: 643: ByteData = (ByteData | (LC_HKAR_ERROR << 4)); - -: 644: break; - -: 645: } - -: 646: - -: 647: /* - -: 648: ** Pack in second actionpoint, current state - -: 649: */ - 264: 650: switch (LC_OperData.ARTPtr[TableIndex].CurrentState) - -: 651: { - -: 652: case LC_ACTION_NOT_USED: - 95: 653: ByteData = (ByteData | (LC_HKAR_STATE_NOT_USED << 2)); - 95: 654: break; - -: 655: - -: 656: case LC_APSTATE_ACTIVE: - 83: 657: ByteData = (ByteData | (LC_HKAR_STATE_ACTIVE << 2)); - 83: 658: LC_OperData.HkPacket.ActiveAPs++; - 83: 659: break; - -: 660: - -: 661: case LC_APSTATE_PASSIVE: - 1: 662: ByteData = (ByteData | (LC_HKAR_STATE_PASSIVE << 2)); - 1: 663: break; - -: 664: - -: 665: case LC_APSTATE_DISABLED: - 1: 666: ByteData = (ByteData | (LC_HKAR_STATE_DISABLED << 2)); - 1: 667: break; - -: 668: - -: 669: case LC_APSTATE_PERMOFF: - -: 670: default: - 84: 671: ByteData = (ByteData | (LC_HKAR_STATE_NOT_USED << 2)); - -: 672: break; - -: 673: } - -: 674: - -: 675: /* - -: 676: ** Pack in second actionpoint, action result - -: 677: */ - 264: 678: switch (LC_OperData.ARTPtr[TableIndex].ActionResult) - -: 679: { - -: 680: case LC_ACTION_STALE: - 89: 681: ByteData = (ByteData | LC_HKAR_STALE); - 89: 682: break; - -: 683: - -: 684: case LC_ACTION_PASS: - 173: 685: ByteData = (ByteData | LC_HKAR_PASS); - 173: 686: break; - -: 687: - -: 688: case LC_ACTION_FAIL: - 1: 689: ByteData = (ByteData | LC_HKAR_FAIL); - 1: 690: break; - -: 691: - -: 692: case LC_ACTION_ERROR: - -: 693: default: - 1: 694: ByteData = (ByteData | LC_HKAR_ERROR); - -: 695: break; - -: 696: } - -: 697: - -: 698: /* - -: 699: ** Update houskeeping action results array - -: 700: */ - 264: 701: LC_OperData.HkPacket.APResults[HKIndex] = ByteData; - -: 702: - -: 703: } /* end action results for loop */ - -: 704: - -: 705: /* - -: 706: ** Timestamp and send housekeeping packet - -: 707: */ - 3: 708: CFE_SB_TimeStampMsg((CFE_SB_Msg_t *) &LC_OperData.HkPacket); - 3: 709: CFE_SB_SendMsg((CFE_SB_Msg_t *) &LC_OperData.HkPacket); - -: 710: - -: 711: } /* end LC_VerifyMsgLength if */ - -: 712: - -: 713: /* - -: 714: ** Manage tables - allow cFE to perform dump, update, etc. - -: 715: ** (an error here is fatal - LC must be able to access its tables) - -: 716: */ - 4: 717: if ((Result = LC_ManageTables()) != CFE_SUCCESS) - -: 718: { - 3: 719: return(Result); - -: 720: } - -: 721: - -: 722: /* - -: 723: ** A somewhat arbitrary decision was made to update the CDS only - -: 724: ** as often as we report housekeeping, thus we do it here. One - -: 725: ** alternative was to do the update every time the results tables - -: 726: ** were modified - but that would result in the update occurring - -: 727: ** several times per second. By doing the update now we cut down - -: 728: ** on the update frequency at the cost of the stored data being - -: 729: ** a couple of seconds old when a processor reset does occur. - -: 730: */ - 1: 731: if (LC_OperData.HaveActiveCDS) - -: 732: { - -: 733: /* - -: 734: ** If CDS is enabled - update the 3 CDS areas managed by LC - -: 735: ** (continue, but disable CDS if unable to update all 3) - -: 736: */ - #####: 737: if (LC_UpdateTaskCDS() != CFE_SUCCESS) - -: 738: { - #####: 739: LC_OperData.HaveActiveCDS = FALSE; - -: 740: } - -: 741: } - -: 742: - 1: 743: return(CFE_SUCCESS); - -: 744: - -: 745:} /* end LC_HousekeepingCmd */ - -: 746: - -: 747:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 748:/* */ - -: 749:/* Noop command */ - -: 750:/* */ - -: 751:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 752:void LC_NoopCmd(CFE_SB_MsgPtr_t MessagePtr) - 2: 753:{ - 2: 754: uint16 ExpectedLength = sizeof(LC_NoArgsCmd_t); - -: 755: - -: 756: /* - -: 757: ** Verify message packet length - -: 758: */ - 2: 759: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 760: { - 1: 761: LC_AppData.CmdCount++; - -: 762: - 1: 763: CFE_EVS_SendEvent(LC_NOOP_INF_EID, CFE_EVS_INFORMATION, - -: 764: "No-op command: Version %d.%d.%d.%d", - -: 765: LC_MAJOR_VERSION, - -: 766: LC_MINOR_VERSION, - -: 767: LC_REVISION, - -: 768: LC_MISSION_REV); - -: 769: } - -: 770: - -: 771: return; - -: 772: - -: 773:} /* end LC_NoopCmd */ - -: 774: - -: 775:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 776:/* */ - -: 777:/* Reset counters command */ - -: 778:/* */ - -: 779:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 780:void LC_ResetCmd(CFE_SB_MsgPtr_t MessagePtr) - 2: 781:{ - 2: 782: uint16 ExpectedLength = sizeof(LC_NoArgsCmd_t); - -: 783: - -: 784: /* - -: 785: ** Verify message packet length - -: 786: */ - 2: 787: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 788: { - 1: 789: LC_ResetCounters(); - -: 790: - 1: 791: CFE_EVS_SendEvent(LC_RESET_DBG_EID, CFE_EVS_DEBUG, - -: 792: "Reset counters command"); - -: 793: } - -: 794: - -: 795: return; - -: 796: - -: 797:} /* end LC_ResetCmd */ - -: 798: - -: 799:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 800:/* */ - -: 801:/* Reset housekeeping counters */ - -: 802:/* */ - -: 803:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 804:void LC_ResetCounters(void) - 4: 805:{ - 4: 806: LC_AppData.CmdCount = 0; - 4: 807: LC_AppData.CmdErrCount = 0; - -: 808: - 4: 809: LC_AppData.APSampleCount = 0; - 4: 810: LC_AppData.MonitoredMsgCount = 0; - 4: 811: LC_AppData.RTSExecCount = 0; - 4: 812: LC_AppData.PassiveRTSExecCount = 0; - -: 813: - -: 814: return; - -: 815: - -: 816:} /* end LC_ResetCounters */ - -: 817: - -: 818:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 819:/* */ - -: 820:/* Set LC state command */ - -: 821:/* */ - -: 822:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 823:void LC_SetLCStateCmd(CFE_SB_MsgPtr_t MessagePtr) - 5: 824:{ - 5: 825: uint16 ExpectedLength = sizeof(LC_SetLCState_t); - -: 826: LC_SetLCState_t *CmdPtr; - -: 827: - -: 828: /* - -: 829: ** Verify message packet length - -: 830: */ - 5: 831: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 832: { - 4: 833: CmdPtr = ((LC_SetLCState_t *)MessagePtr); - -: 834: - 4: 835: switch (CmdPtr -> NewLCState) - -: 836: { - -: 837: case LC_STATE_ACTIVE: - -: 838: case LC_STATE_PASSIVE: - -: 839: case LC_STATE_DISABLED: - 3: 840: LC_AppData.CurrentLCState = CmdPtr -> NewLCState; - 3: 841: LC_AppData.CmdCount++; - -: 842: - 3: 843: CFE_EVS_SendEvent(LC_LCSTATE_INF_EID, CFE_EVS_INFORMATION, - -: 844: "Set LC state command: new state = %d", - -: 845: CmdPtr -> NewLCState); - 3: 846: break; - -: 847: - -: 848: default: - 1: 849: CFE_EVS_SendEvent(LC_LCSTATE_ERR_EID, CFE_EVS_ERROR, - -: 850: "Set LC state error: invalid state = %d", - -: 851: CmdPtr -> NewLCState); - -: 852: - 1: 853: LC_AppData.CmdErrCount++; - -: 854: break; - -: 855: } - -: 856: } - -: 857: - -: 858: return; - -: 859: - -: 860:} /* end LC_SetLCStateCmd */ - -: 861: - -: 862:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 863:/* */ - -: 864:/* Set actionpoint state command */ - -: 865:/* */ - -: 866:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 867:void LC_SetAPStateCmd(CFE_SB_MsgPtr_t MessagePtr) - 11: 868:{ - 11: 869: uint16 ExpectedLength = sizeof(LC_SetAPState_t); - -: 870: LC_SetAPState_t *CmdPtr; - -: 871: uint32 TableIndex; - -: 872: uint8 CurrentAPState; - 11: 873: boolean ValidState = TRUE; - 11: 874: boolean CmdSuccess = FALSE; - -: 875: - -: 876: /* - -: 877: ** Verify message packet length - -: 878: */ - 11: 879: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 880: { - 10: 881: CmdPtr = ((LC_SetAPState_t *)MessagePtr); - -: 882: - -: 883: /* - -: 884: ** Do a sanity check on the new actionpoint state - -: 885: ** specified. - -: 886: */ - 10: 887: switch (CmdPtr -> NewAPState) - -: 888: { - -: 889: case LC_APSTATE_ACTIVE: - -: 890: case LC_APSTATE_PASSIVE: - -: 891: case LC_APSTATE_DISABLED: - 8: 892: break; - -: 893: - -: 894: default: - 2: 895: ValidState = FALSE; - 2: 896: CFE_EVS_SendEvent(LC_APSTATE_NEW_ERR_EID, CFE_EVS_ERROR, - -: 897: "Set AP state error: AP = %d, Invalid new state = %d", - -: 898: CmdPtr -> APNumber, CmdPtr -> NewAPState); - -: 899: - 2: 900: LC_AppData.CmdErrCount++; - -: 901: break; - -: 902: } - -: 903: - -: 904: /* - -: 905: ** Do the rest based on the actionpoint ID we were given - -: 906: */ - 10: 907: if (ValidState == TRUE) - -: 908: { - 8: 909: if ((CmdPtr -> APNumber) == LC_ALL_ACTIONPOINTS) - -: 910: { - -: 911: /* - -: 912: ** Set all actionpoints to the new state except those that are not - -: 913: ** used or set permanently off - -: 914: */ - 177: 915: for (TableIndex = 0; TableIndex < LC_MAX_ACTIONPOINTS; TableIndex++) - -: 916: { - 176: 917: CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState; - -: 918: - 176: 919: if ((CurrentAPState != LC_ACTION_NOT_USED) && - -: 920: (CurrentAPState != LC_APSTATE_PERMOFF)) - -: 921: { - 166: 922: LC_OperData.ARTPtr[TableIndex].CurrentState = CmdPtr -> NewAPState; - -: 923: } - -: 924: } - -: 925: - -: 926: /* - -: 927: ** Set flag that we succeeded - -: 928: */ - 1: 929: CmdSuccess = TRUE; - -: 930: } - -: 931: else - -: 932: { - 7: 933: if ((CmdPtr -> APNumber) < LC_MAX_ACTIONPOINTS) - -: 934: { - 5: 935: TableIndex = CmdPtr -> APNumber; - 5: 936: CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState; - -: 937: - 9: 938: if ((CurrentAPState != LC_ACTION_NOT_USED) && - -: 939: (CurrentAPState != LC_APSTATE_PERMOFF)) - -: 940: { - -: 941: /* - -: 942: ** Update state for single actionpoint specified - -: 943: */ - 4: 944: LC_OperData.ARTPtr[TableIndex].CurrentState = CmdPtr -> NewAPState; - -: 945: - 4: 946: CmdSuccess = TRUE; - -: 947: } - -: 948: else - -: 949: { - -: 950: /* - -: 951: ** Actionpoints that are not used or set permanently - -: 952: ** off can only be changed by a table load - -: 953: */ - 1: 954: CFE_EVS_SendEvent(LC_APSTATE_CURR_ERR_EID, CFE_EVS_ERROR, - -: 955: "Set AP state error: AP = %d, Invalid current AP state = %d", - -: 956: CmdPtr -> APNumber, CurrentAPState); - -: 957: - 1: 958: LC_AppData.CmdErrCount++; - -: 959: } - -: 960: } - -: 961: else - -: 962: { - -: 963: /* - -: 964: ** Actionpoint number is out of range - -: 965: ** (it's zero based, since it's a table index) - -: 966: */ - 2: 967: CFE_EVS_SendEvent(LC_APSTATE_APNUM_ERR_EID, CFE_EVS_ERROR, - -: 968: "Set AP state error: Invalid AP number = %d", - -: 969: CmdPtr -> APNumber); - -: 970: - 2: 971: LC_AppData.CmdErrCount++; - -: 972: } - -: 973: } - -: 974: - -: 975: /* - -: 976: ** Update the command counter and send out event if command - -: 977: ** executed - -: 978: */ - 8: 979: if (CmdSuccess == TRUE) - -: 980: { - 5: 981: LC_AppData.CmdCount++; - -: 982: - 5: 983: CFE_EVS_SendEvent(LC_APSTATE_INF_EID, CFE_EVS_INFORMATION, - -: 984: "Set AP state command: AP = %d, New state = %d", - -: 985: CmdPtr -> APNumber, CmdPtr -> NewAPState); - -: 986: } - -: 987: - -: 988: } /* end ValidState if */ - -: 989: - -: 990: } /* end LC_VerifyMsgLength if */ - -: 991: - -: 992: return; - -: 993: - -: 994:} /* end LC_SetAPStateCmd */ - -: 995: - -: 996:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 997:/* */ - -: 998:/* Set actionpoint permanently off command */ - -: 999:/* */ - -: 1000:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1001:void LC_SetAPPermOffCmd(CFE_SB_MsgPtr_t MessagePtr) - 5: 1002:{ - 5: 1003: uint16 ExpectedLength = sizeof(LC_SetAPPermOff_t); - -: 1004: LC_SetAPPermOff_t *CmdPtr; - -: 1005: uint32 TableIndex; - -: 1006: uint8 CurrentAPState; - -: 1007: - -: 1008: /* - -: 1009: ** Verify message packet length - -: 1010: */ - 5: 1011: if(LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 1012: { - 4: 1013: CmdPtr = ((LC_SetAPPermOff_t *)MessagePtr); - -: 1014: - 6: 1015: if (((CmdPtr -> APNumber) == LC_ALL_ACTIONPOINTS) || - -: 1016: ((CmdPtr -> APNumber) >= LC_MAX_ACTIONPOINTS)) - -: 1017: { - -: 1018: /* - -: 1019: ** Invalid actionpoint number - -: 1020: ** (This command can't be invoked for all actionpoints) - -: 1021: */ - 2: 1022: CFE_EVS_SendEvent(LC_APOFF_APNUM_ERR_EID, CFE_EVS_ERROR, - -: 1023: "Set AP perm off error: Invalid AP number = %d", - -: 1024: CmdPtr -> APNumber); - -: 1025: - 2: 1026: LC_AppData.CmdErrCount++; - -: 1027: - -: 1028: } - -: 1029: else - -: 1030: { - 2: 1031: TableIndex = CmdPtr -> APNumber; - 2: 1032: CurrentAPState = LC_OperData.ARTPtr[TableIndex].CurrentState; - -: 1033: - 2: 1034: if (CurrentAPState != LC_APSTATE_DISABLED) - -: 1035: { - -: 1036: /* - -: 1037: ** Actionpoints can only be turned permanently off if - -: 1038: ** they are currently disabled - -: 1039: */ - 1: 1040: CFE_EVS_SendEvent(LC_APOFF_CURR_ERR_EID, CFE_EVS_ERROR, - -: 1041: "Set AP perm off error, AP NOT Disabled: AP = %d, Current state = %d", - -: 1042: CmdPtr -> APNumber, CurrentAPState); - -: 1043: - 1: 1044: LC_AppData.CmdErrCount++; - -: 1045: } - -: 1046: else - -: 1047: { - -: 1048: /* - -: 1049: ** Update state for actionpoint specified - -: 1050: */ - 1: 1051: LC_OperData.ARTPtr[TableIndex].CurrentState = LC_APSTATE_PERMOFF; - -: 1052: - 1: 1053: LC_AppData.CmdCount++; - -: 1054: - 1: 1055: CFE_EVS_SendEvent(LC_APOFF_INF_EID, CFE_EVS_INFORMATION, - -: 1056: "Set AP permanently off command: AP = %d", - -: 1057: CmdPtr -> APNumber); - -: 1058: } - -: 1059: - -: 1060: } /* end CmdPtr -> APNumber else */ - -: 1061: - -: 1062: } /* end LC_VerifyMsgLength if */ - -: 1063: - -: 1064: return; - -: 1065: - -: 1066:} /* end LC_SetAPPermOffCmd */ - -: 1067: - -: 1068:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1069:/* */ - -: 1070:/* Reset actionpoint statistics command */ - -: 1071:/* */ - -: 1072:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1073:void LC_ResetAPStatsCmd(CFE_SB_MsgPtr_t MessagePtr) - 4: 1074:{ - 4: 1075: uint16 ExpectedLength = sizeof(LC_ResetAPStats_t); - 4: 1076: LC_ResetAPStats_t *CmdPtr = (LC_ResetAPStats_t *) MessagePtr; - 4: 1077: boolean CmdSuccess = FALSE; - -: 1078: - -: 1079: /* verify message packet length */ - 4: 1080: if (LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 1081: { - -: 1082: /* arg may be one or all AP's */ - 3: 1083: if (CmdPtr->APNumber == LC_ALL_ACTIONPOINTS) - -: 1084: { - 1: 1085: LC_ResetResultsAP(0, LC_MAX_ACTIONPOINTS - 1, TRUE); - 1: 1086: CmdSuccess = TRUE; - -: 1087: } - 2: 1088: else if (CmdPtr->APNumber < LC_MAX_ACTIONPOINTS) - -: 1089: { - 1: 1090: LC_ResetResultsAP(CmdPtr->APNumber, CmdPtr->APNumber, TRUE); - 1: 1091: CmdSuccess = TRUE; - -: 1092: } - -: 1093: else - -: 1094: { - -: 1095: /* arg is out of range (zero based table index) */ - 1: 1096: LC_AppData.CmdErrCount++; - -: 1097: - 1: 1098: CFE_EVS_SendEvent(LC_APSTATS_APNUM_ERR_EID, CFE_EVS_ERROR, - -: 1099: "Reset AP stats error: invalid AP number = %d", CmdPtr->APNumber); - -: 1100: } - -: 1101: - 3: 1102: if (CmdSuccess == TRUE) - -: 1103: { - 2: 1104: LC_AppData.CmdCount++; - -: 1105: - 2: 1106: CFE_EVS_SendEvent(LC_APSTATS_INF_EID, CFE_EVS_INFORMATION, - -: 1107: "Reset AP stats command: AP = %d", CmdPtr->APNumber); - -: 1108: } - -: 1109: } - -: 1110: - -: 1111: return; - -: 1112: - -: 1113:} /* end LC_ResetAPStatsCmd */ - -: 1114: - -: 1115:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1116:/* */ - -: 1117:/* Reset selected AP statistics (utility function) */ - -: 1118:/* */ - -: 1119:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1120:void LC_ResetResultsAP(uint32 StartIndex, uint32 EndIndex, boolean ResetStatsCmd) - 7: 1121:{ - -: 1122: uint32 TableIndex; - -: 1123: - -: 1124: /* reset selected entries in actionpoint results table */ - 889: 1125: for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++) - -: 1126: { - 882: 1127: if (!ResetStatsCmd) - -: 1128: { - -: 1129: /* reset AP stats command does not modify AP state or most recent test result */ - 705: 1130: LC_OperData.ARTPtr[TableIndex].ActionResult = LC_ACTION_STALE; - 705: 1131: LC_OperData.ARTPtr[TableIndex].CurrentState = LC_OperData.ADTPtr[TableIndex].DefaultState; - -: 1132: } - -: 1133: - 882: 1134: LC_OperData.ARTPtr[TableIndex].PassiveAPCount = 0; - 882: 1135: LC_OperData.ARTPtr[TableIndex].FailToPassCount = 0; - 882: 1136: LC_OperData.ARTPtr[TableIndex].PassToFailCount = 0; - -: 1137: - 882: 1138: LC_OperData.ARTPtr[TableIndex].ConsecutiveFailCount = 0; - 882: 1139: LC_OperData.ARTPtr[TableIndex].CumulativeFailCount = 0; - 882: 1140: LC_OperData.ARTPtr[TableIndex].CumulativeRTSExecCount = 0; - -: 1141: } - -: 1142: - -: 1143: return; - -: 1144: - -: 1145:} /* end LC_ResetResultsAP */ - -: 1146: - -: 1147:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1148:/* */ - -: 1149:/* Reset watchpoint statistics command */ - -: 1150:/* */ - -: 1151:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1152:void LC_ResetWPStatsCmd(CFE_SB_MsgPtr_t MessagePtr) - 4: 1153:{ - 4: 1154: uint16 ExpectedLength = sizeof(LC_ResetWPStats_t); - 4: 1155: LC_ResetWPStats_t *CmdPtr = (LC_ResetWPStats_t *) MessagePtr; - 4: 1156: boolean CmdSuccess = FALSE; - -: 1157: - -: 1158: /* verify message packet length */ - 4: 1159: if (LC_VerifyMsgLength(MessagePtr, ExpectedLength)) - -: 1160: { - -: 1161: /* arg may be one or all WP's */ - 3: 1162: if (CmdPtr->WPNumber == LC_ALL_WATCHPOINTS) - -: 1163: { - 1: 1164: LC_ResetResultsWP(0, LC_MAX_WATCHPOINTS - 1, TRUE); - 1: 1165: CmdSuccess = TRUE; - -: 1166: } - 2: 1167: else if (CmdPtr->WPNumber < LC_MAX_WATCHPOINTS) - -: 1168: { - 1: 1169: LC_ResetResultsWP(CmdPtr->WPNumber, CmdPtr->WPNumber, TRUE); - 1: 1170: CmdSuccess = TRUE; - -: 1171: } - -: 1172: else - -: 1173: { - -: 1174: /* arg is out of range (zero based table index) */ - 1: 1175: LC_AppData.CmdErrCount++; - -: 1176: - 1: 1177: CFE_EVS_SendEvent(LC_WPSTATS_WPNUM_ERR_EID, CFE_EVS_ERROR, - -: 1178: "Reset WP stats error: invalid WP number = %d", CmdPtr->WPNumber); - -: 1179: } - -: 1180: - 3: 1181: if (CmdSuccess == TRUE) - -: 1182: { - 2: 1183: LC_AppData.CmdCount++; - -: 1184: - 2: 1185: CFE_EVS_SendEvent(LC_WPSTATS_INF_EID, CFE_EVS_INFORMATION, - -: 1186: "Reset WP stats command: WP = %d", CmdPtr->WPNumber); - -: 1187: } - -: 1188: } - -: 1189: - -: 1190: return; - -: 1191: - -: 1192:} /* end LC_ResetWPStatsCmd */ - -: 1193: - -: 1194:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1195:/* */ - -: 1196:/* Reset selected WP statistics (utility function) */ - -: 1197:/* */ - -: 1198:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1199:void LC_ResetResultsWP(uint32 StartIndex, uint32 EndIndex, boolean ResetStatsCmd) - 7: 1200:{ - -: 1201: uint32 TableIndex; - -: 1202: - -: 1203: /* reset selected entries in watchoint results table */ - 889: 1204: for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++) - -: 1205: { - 882: 1206: if (!ResetStatsCmd) - -: 1207: { - -: 1208: /* reset WP stats command does not modify most recent test result */ - 705: 1209: LC_OperData.WRTPtr[TableIndex].WatchResult = LC_WATCH_STALE; - 705: 1210: LC_OperData.WRTPtr[TableIndex].CountdownToStale = 0; - -: 1211: } - -: 1212: - 882: 1213: LC_OperData.WRTPtr[TableIndex].EvaluationCount = 0; - 882: 1214: LC_OperData.WRTPtr[TableIndex].FalseToTrueCount = 0; - 882: 1215: LC_OperData.WRTPtr[TableIndex].ConsecutiveTrueCount = 0; - 882: 1216: LC_OperData.WRTPtr[TableIndex].CumulativeTrueCount = 0; - -: 1217: - 882: 1218: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Value = 0; - 882: 1219: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Seconds = 0; - 882: 1220: LC_OperData.WRTPtr[TableIndex].LastFalseToTrue.Timestamp.Subseconds = 0; - -: 1221: - 882: 1222: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Value = 0; - 882: 1223: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Seconds = 0; - 882: 1224: LC_OperData.WRTPtr[TableIndex].LastTrueToFalse.Timestamp.Subseconds = 0; - -: 1225: } - -: 1226: - -: 1227: return; - -: 1228: - -: 1229:} /* end LC_ResetResultsWP */ - -: 1230: - -: 1231:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1232:/* */ - -: 1233:/* Verify message packet length */ - -: 1234:/* */ - -: 1235:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1236:boolean LC_VerifyMsgLength(CFE_SB_MsgPtr_t msg, - -: 1237: uint16 ExpectedLength) - 56: 1238:{ - 56: 1239: boolean result = TRUE; - -: 1240: uint16 CommandCode; - -: 1241: uint16 ActualLength; - -: 1242: CFE_SB_MsgId_t MessageID; - -: 1243: - -: 1244: /* - -: 1245: ** Verify the message packet length... - -: 1246: */ - 56: 1247: ActualLength = CFE_SB_GetTotalMsgLength(msg); - 56: 1248: if (ExpectedLength != ActualLength) - -: 1249: { - 9: 1250: MessageID = CFE_SB_GetMsgId(msg); - 9: 1251: CommandCode = CFE_SB_GetCmdCode(msg); - -: 1252: - 9: 1253: if (MessageID == LC_SEND_HK_MID) - -: 1254: { - -: 1255: /* - -: 1256: ** For a bad HK request, just send the event. We only increment - -: 1257: ** the error counter for ground commands and not internal messages. - -: 1258: */ - 1: 1259: CFE_EVS_SendEvent(LC_HKREQ_LEN_ERR_EID, CFE_EVS_ERROR, - -: 1260: "Invalid HK request msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d", - -: 1261: MessageID, CommandCode, ActualLength, ExpectedLength); - -: 1262: } - 8: 1263: else if (MessageID == LC_SAMPLE_AP_MID) - -: 1264: { - -: 1265: /* - -: 1266: ** Same thing as previous for a bad actionpoint sample request - -: 1267: */ - 1: 1268: CFE_EVS_SendEvent(LC_APSAMPLE_LEN_ERR_EID, CFE_EVS_ERROR, - -: 1269: "Invalid AP sample msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d", - -: 1270: MessageID, CommandCode, ActualLength, ExpectedLength); - -: 1271: } - -: 1272: else - -: 1273: { - -: 1274: /* - -: 1275: ** All other cases, increment error counter - -: 1276: */ - 7: 1277: CFE_EVS_SendEvent(LC_LEN_ERR_EID, CFE_EVS_ERROR, - -: 1278: "Invalid msg length: ID = 0x%04X, CC = %d, Len = %d, Expected = %d", - -: 1279: MessageID, CommandCode, ActualLength, ExpectedLength); - 7: 1280: LC_AppData.CmdErrCount++; - -: 1281: } - -: 1282: - 9: 1283: result = FALSE; - -: 1284: } - -: 1285: - 56: 1286: return(result); - -: 1287: - -: 1288:} /* End of LC_VerifyMsgLength */ - -: 1289: - -: 1290: - -: 1291:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1292:/* */ - -: 1293:/* Manage tables - chance to be dumped, reloaded, etc. */ - -: 1294:/* */ - -: 1295:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1296: - -: 1297:int32 LC_ManageTables(void) - 7: 1298:{ - -: 1299: int32 Result; - -: 1300: - -: 1301: /* - -: 1302: ** It is not necessary to release dump only table pointers before - -: 1303: ** calling cFE Table Services to manage the table - -: 1304: */ - 7: 1305: CFE_TBL_Manage(LC_OperData.WRTHandle); - 7: 1306: CFE_TBL_Manage(LC_OperData.ARTHandle); - -: 1307: - -: 1308: /* - -: 1309: ** Must release loadable table pointers before allowing updates - -: 1310: */ - 7: 1311: CFE_TBL_ReleaseAddress(LC_OperData.WDTHandle); - 7: 1312: CFE_TBL_ReleaseAddress(LC_OperData.ADTHandle); - -: 1313: - 7: 1314: CFE_TBL_Manage(LC_OperData.WDTHandle); - 7: 1315: CFE_TBL_Manage(LC_OperData.ADTHandle); - -: 1316: - -: 1317: /* - -: 1318: ** Re-acquire the pointers and check for new table data - -: 1319: */ - 7: 1320: Result = CFE_TBL_GetAddress((void *)&LC_OperData.WDTPtr, LC_OperData.WDTHandle); - -: 1321: - 7: 1322: if (Result == CFE_TBL_INFO_UPDATED) - -: 1323: { - -: 1324: /* - -: 1325: ** Clear watchpoint results for previous table - -: 1326: */ - 1: 1327: LC_ResetResultsWP(0, LC_MAX_WATCHPOINTS - 1, FALSE); - -: 1328: - -: 1329: /* - -: 1330: ** Create watchpoint hash tables -- also subscribes to watchpoint packets - -: 1331: */ - 1: 1332: LC_CreateHashTable(); - -: 1333: } - 6: 1334: else if (Result != CFE_SUCCESS) - -: 1335: { - 3: 1336: CFE_EVS_SendEvent(LC_WDT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 1337: "Error getting WDT address, RC=0x%08X", Result); - 3: 1338: return(Result); - -: 1339: } - -: 1340: - 4: 1341: Result = CFE_TBL_GetAddress((void *)&LC_OperData.ADTPtr, LC_OperData.ADTHandle); - -: 1342: - 4: 1343: if (Result == CFE_TBL_INFO_UPDATED) - -: 1344: { - -: 1345: /* - -: 1346: ** Clear actionpoint results for previous table - -: 1347: */ - 1: 1348: LC_ResetResultsAP(0, LC_MAX_ACTIONPOINTS - 1, FALSE); - -: 1349: } - 3: 1350: else if (Result != CFE_SUCCESS) - -: 1351: { - 1: 1352: CFE_EVS_SendEvent(LC_ADT_GETADDR_ERR_EID, CFE_EVS_ERROR, - -: 1353: "Error getting ADT address, RC=0x%08X", Result); - 1: 1354: return(Result); - -: 1355: } - -: 1356: - 3: 1357: return(CFE_SUCCESS); - -: 1358: - -: 1359:} /* LC_ManageTables() */ - -: 1360: - -: 1361: - -: 1362:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1363:/* */ - -: 1364:/* Update Critical Data Store (CDS) */ - -: 1365:/* */ - -: 1366:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1367: - -: 1368:int32 LC_UpdateTaskCDS(void) - #####: 1369:{ - -: 1370: int32 Result; - -: 1371: - -: 1372: /* - -: 1373: ** Copy the watchpoint results table (WRT) data to CDS - -: 1374: */ - #####: 1375: Result = CFE_ES_CopyToCDS(LC_OperData.WRTDataCDSHandle, LC_OperData.WRTPtr); - -: 1376: - #####: 1377: if (Result != CFE_SUCCESS) - -: 1378: { - #####: 1379: CFE_EVS_SendEvent(LC_WRT_NO_SAVE_ERR_EID, CFE_EVS_ERROR, - -: 1380: "Unable to update watchpoint results in CDS, RC=0x%08X", Result); - #####: 1381: return(Result); - -: 1382: } - -: 1383: - -: 1384: /* - -: 1385: ** Copy the actionpoint results table (ART) data to CDS - -: 1386: */ - #####: 1387: Result = CFE_ES_CopyToCDS(LC_OperData.ARTDataCDSHandle, LC_OperData.ARTPtr); - -: 1388: - #####: 1389: if (Result != CFE_SUCCESS) - -: 1390: { - #####: 1391: CFE_EVS_SendEvent(LC_ART_NO_SAVE_ERR_EID, CFE_EVS_ERROR, - -: 1392: "Unable to update actionpoint results in CDS, RC=0x%08X", Result); - #####: 1393: return(Result); - -: 1394: } - -: 1395: - -: 1396: /* - -: 1397: ** Set the "data has been saved" indicator - -: 1398: */ - #####: 1399: LC_AppData.CDSSavedOnExit = LC_CDS_SAVED; - -: 1400: - -: 1401: /* - -: 1402: ** Copy the global application data structure to CDS - -: 1403: */ - #####: 1404: Result = CFE_ES_CopyToCDS(LC_OperData.AppDataCDSHandle, &LC_AppData); - -: 1405: - #####: 1406: if (Result != CFE_SUCCESS) - -: 1407: { - #####: 1408: CFE_EVS_SendEvent(LC_APP_NO_SAVE_START_ERR_EID, CFE_EVS_ERROR, - -: 1409: "Unable to update application data in CDS, RC=0x%08X", Result); - #####: 1410: return(Result); - -: 1411: } - -: 1412: - #####: 1413: return(CFE_SUCCESS); - -: 1414: - -: 1415:} /* LC_UpdateTaskCDS() */ - -: 1416: - -: 1417: - -: 1418:/************************/ - -: 1419:/* End of File Comment */ - -: 1420:/************************/ diff --git a/fsw/unit_test/output_noCDS/lc_custom.c.gcov b/fsw/unit_test/output_noCDS/lc_custom.c.gcov deleted file mode 100644 index b5d96ce..0000000 --- a/fsw/unit_test/output_noCDS/lc_custom.c.gcov +++ /dev/null @@ -1,126 +0,0 @@ - -: 0:Source:../src/lc_custom.c - -: 0:Graph:lc_custom.gcno - -: 0:Data:lc_custom.gcda - -: 0:Runs:1 - -: 0:Programs:5 - -: 1:/************************************************************************* - -: 2:** File: - -: 3:** $Id: lc_custom.c.gcov 1.1.1.1 2012/10/01 18:48:32EDT lwalling Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** CFS Limit Checker (LC) mission specific code, including the - -: 7:** custom function template. - -: 8:** - -: 9:** $Log: lc_custom.c.gcov $ - -: 9:** Revision 1.1.1.1 2012/10/01 18:48:32EDT lwalling - -: 9:** Apply unit test output file updates to branch - -: 9:** Revision 1.3 2012/10/01 13:57:40PDT lwalling - -: 9:** Updates to output files after fix compile warnings - -: 10:** Revision 1.1 2012/07/31 13:53:38PDT nschweis - -: 11:** Initial revision - -: 12:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj - -: 13:** Revision 1.3 2009/12/18 14:48:28EST lwalling - -: 14:** Update local copy of SC start RTS command packet - -: 15:** Revision 1.2 2008/12/03 13:59:43EST dahardis - -: 16:** Corrections from peer code review - -: 17:** Revision 1.1 2008/10/29 14:19:08EDT dahardison - -: 18:** Initial revision - -: 19:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 20:** - -: 21:*************************************************************************/ - -: 22: - -: 23:/************************************************************************* - -: 24:** Includes - -: 25:*************************************************************************/ - -: 26:#include "lc_custom.h" - -: 27:#include "lc_tbldefs.h" - -: 28:#include "lc_events.h" - -: 29:#include "lc_mission_cfg.h" - -: 30: - -: 31:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 32:/* */ - -: 33:/* Initiate an RTS request */ - -: 34:/* */ - -: 35:/* NOTE: For complete prolog information, see 'lc_custom.h' */ - -: 36:/* */ - -: 37:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 38:void LC_ExecuteRTS(uint16 RTSId) - 1: 39:{ - -: 40: /*************************************************************** - -: 41: ** This is a local declaration of the command message structure - -: 42: ** to initiate an RTS and has been placed here to allow the - -: 43: ** the LC application to be built without including headers from - -: 44: ** any other applications (like Stored Commanding). - -: 45: ** A mission may choose to remove this and use a message - -: 46: ** structure declared elsewhere instead. - -: 47: ** - -: 48: ** This also applies to the LC_RTS_REQ_MID and LC_RTS_REQ_CC - -: 49: ** constants (see lc_mission_cfg.h). - -: 50: */ - -: 51: typedef struct { - -: 52: uint8 CmdHeader[CFE_SB_CMD_HDR_SIZE]; - -: 53: - -: 54: uint16 RTSId; - -: 55: - -: 56: } LC_RTSRequest_t; - -: 57: - -: 58: LC_RTSRequest_t RTSRequest; - -: 59: /**************************************************************/ - -: 60: - 1: 61: CFE_SB_InitMsg((CFE_SB_Msg_t *) ((uint32) &RTSRequest), - -: 62: LC_RTS_REQ_MID, sizeof(LC_RTSRequest_t), TRUE); - -: 63: - 1: 64: CFE_SB_SetCmdCode((CFE_SB_Msg_t *) ((uint32) &RTSRequest), - -: 65: LC_RTS_REQ_CC); - -: 66: - 1: 67: RTSRequest.RTSId = RTSId; - -: 68: - 1: 69: CFE_SB_SendMsg((CFE_SB_Msg_t *) ((uint32) &RTSRequest)); - -: 70: - -: 71: return; - -: 72: - -: 73:} /* end LC_ExecuteRTS */ - -: 74: - -: 75:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 76:/* */ - -: 77:/* Mission specific custom function entry point */ - -: 78:/* */ - -: 79:/* NOTE: For complete prolog information, see 'lc_custom.h' */ - -: 80:/* */ - -: 81:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 82:uint8 LC_CustomFunction(uint16 WatchIndex, - -: 83: uint32 ProcessedWPData, - -: 84: CFE_SB_MsgPtr_t MessagePtr, - -: 85: uint32 WDTCustomFuncArg) - 1: 86:{ - 1: 87: uint8 EvalResult = LC_WATCH_FALSE; - -: 88: - -: 89: /* - -: 90: ** This function is the entry point for all watchpoints where - -: 91: ** the OperatorID in the watchpoint definition table entry - -: 92: ** is set to LC_OPER_CUSTOM. - -: 93: ** - -: 94: ** For this reason The first step would normally be to - -: 95: ** switch on the WatchIndex to figure out what watchpoint got - -: 96: ** us here. As an alternate, a mission may choose to use the - -: 97: ** WDTCustomFuncArg for this instead. - -: 98: */ - 1: 99: switch (WatchIndex) - -: 100: { - -: 101: case 0x0000: - -: 102: case 0x0001: - -: 103: default: - 1: 104: CFE_EVS_SendEvent(LC_CFCALL_ERR_EID, CFE_EVS_ERROR, - -: 105: "Unexpected LC_CustomFunction call: WP = %d", - -: 106: WatchIndex); - -: 107: break; - -: 108: - -: 109: } /* end WatchIndex switch */ - -: 110: - 1: 111: return (EvalResult); - -: 112: - -: 113:} /* end LC_CustomFunction */ - -: 114: - -: 115:/************************/ - -: 116:/* End of File Comment */ - -: 117:/************************/ diff --git a/fsw/unit_test/output_noCDS/lc_utest.exe b/fsw/unit_test/output_noCDS/lc_utest.exe deleted file mode 100644 index 0c50d7d..0000000 Binary files a/fsw/unit_test/output_noCDS/lc_utest.exe and /dev/null differ diff --git a/fsw/unit_test/output_noCDS/lc_utest.out b/fsw/unit_test/output_noCDS/lc_utest.out deleted file mode 100644 index a37b9f6..0000000 --- a/fsw/unit_test/output_noCDS/lc_utest.out +++ /dev/null @@ -1,571 +0,0 @@ -UTF Info: Task added to Task Tbl. -SysLog:1980-001-00:00:00.00000 ES Startup: LC loaded and created -UTF Info: App added to App Tbl. - -************************************ -* Application Initialization Tests * -************************************ - -Test CFE_EVS_Register call error ---------------------------------- -UTF Info: Return value for CFE EVS Api #0 set to c2000003 -SysLog:1980-001-00:00:00.00000 LC App: Error Registering For Event Services, RC = 0xC2000003 -CRITICAL EVENT ID=1 Task terminating, err = 0xC2000003 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xC2000003 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp -UTF Info: Return code for CFE EVS Api #0 returned to default - -Test CFE_SB_CreatePipe call error ---------------------------------- -UTF Info: Return value for CFE SB Api #0 set to ca000004 -ERROR EVENT ID=3 Error Creating LC Pipe, RC=0xCA000004 -CRITICAL EVENT ID=1 Task terminating, err = 0xCA000004 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCA000004 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp -UTF Info: Return code for CFE SB Api #0 returned to default - -Test CFE_SB_Subscribe call 1 error ------------------------------------ -ERROR EVENT ID=4 Error Subscribing to HK Request, MID=0x18A5, RC=0xCA000009 -CRITICAL EVENT ID=1 Task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_SB_Subscribe call 2 error ------------------------------------ -ERROR EVENT ID=5 Error Subscribing to GND CMD, MID=0x18A4, RC=0xCA000009 -CRITICAL EVENT ID=1 Task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_SB_Subscribe call 3 error ------------------------------------ -ERROR EVENT ID=6 Error Subscribing to Sample CMD, MID=0x18A6, RC=0xCA000009 -CRITICAL EVENT ID=1 Task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCA000009 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - - -************************************************ -* Application Initialization With NO CDS Tests * -************************************************ - -Test CFE_TBL_Register call 1 error ------------------------------------ -ERROR EVENT ID=10 Error registering WRT, RC=0xCC000003 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000003 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_TBL_Register call 2 error ------------------------------------ -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=17 Error getting WRT address, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_TBL_Register call 3 error ------------------------------------ -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=17 Error getting WRT address, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_TBL_Register call 4 error ------------------------------------ -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=17 Error getting WRT address, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -UTF Info: Return value for CFE TBL Api #0 set to 0 -Test CFE_TBL_Load call 1 error -------------------------------- -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=17 Error getting WRT address, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -Test CFE_TBL_Load call 2 error -------------------------------- -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=17 Error getting WRT address, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -UTF Info: Return value for CFE TBL Api #3 set to 0 -UTF Info: Return value for CFE TBL Api #10 set to 0 -UTF Info: Return value for CFE TBL Api #11 set to cc000001 -Test CFE_TBL_GetStatus call 1 error ------------------------------------- -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=17 Error getting WRT address, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -UTF Info: Return value for CFE TBL Api #11 set to 0 - -************************* -* LC Command Pipe Tests * -************************* - -UTF Info: Overwriting ES Task Table Record[0] -SysLog:1980-001-00:00:00.00000 ES Startup: LC loaded and created -UTF Info: App added to App Tbl. -UTF Info: Return value for CFE TBL Api #6 set to 0 -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=17 Error getting WRT address, RC=0xCC000001 -CRITICAL EVENT ID=1 Task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 LC task terminating, err = 0xCC000001 -SysLog:1980-001-00:00:00.00000 Application LC called CFE_ES_ExitApp - -********************************* -* LC Housekeeping Request Tests * -********************************* - - -LC HOUSEKEEPING DATA: - Command Count = 0 - Command Error Count = 0 - Actionpoint Sample Count = 0 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 0 - Active Actionpoints = 2 - Current LC State = 0 - -Watchpoint Results: -0x00 0x00 0x01 0x06 0x1B 0x6C 0xB0 0xC0 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 - -Actionpoint Results: -0x00 0x00 0x04 0x08 0x0C 0x00 0x40 0x80 0xC0 0x00 -0x00 0x00 0x01 0x02 0x00 0x13 0x20 0x00 0x30 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=19 Error getting WDT address, RC=0xCC000001 - -*************************** -* LC WDT Validation Tests * -*************************** - -Test WDT Validation with bad DataType -------------------------------------- -ERROR EVENT ID=55 WDT verify err: WP = 20, Err = 1, DType = 45, Oper = 255, MID = 0 -INFO EVENT ID=56 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with bad OperatorID ---------------------------------------- -ERROR EVENT ID=55 WDT verify err: WP = 20, Err = 2, DType = 6, Oper = 45, MID = 0 -INFO EVENT ID=56 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with bad MessageID --------------------------------------- -ERROR EVENT ID=55 WDT verify err: WP = 20, Err = 3, DType = 6, Oper = 3, MID = 8192 -INFO EVENT ID=56 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with floating point NAN comparison value ------------------------------------------------------------- -ERROR EVENT ID=54 WDT verify float err: WP = 20, Err = 4, ComparisonValue = 0xFFFFFFFF -INFO EVENT ID=56 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with floating point infinite comparison value ------------------------------------------------------------------ -ERROR EVENT ID=54 WDT verify float err: WP = 20, Err = 5, ComparisonValue = 0x7F800000 -INFO EVENT ID=56 WDT verify results: good = 0, bad = 1, unused = 175 - -Test WDT Validation with good non-floating point entry ------------------------------------------------------- -INFO EVENT ID=56 WDT verify results: good = 1, bad = 0, unused = 175 - -Test WDT Validation with good floating point entry --------------------------------------------------- -INFO EVENT ID=56 WDT verify results: good = 1, bad = 0, unused = 175 - - -*************************** -* LC ADT Validation Tests * -*************************** - -Test ADT Validation with bad DefaultState ------------------------------------------ -ERROR EVENT ID=65 ADT verify err: AP = 30, Err = 1, State = 10, RTS = 0, FailCnt = 0, EvtType = 2 -INFO EVENT ID=66 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad RTSId ----------------------------------- -ERROR EVENT ID=65 ADT verify err: AP = 30, Err = 2, State = 1, RTS = 65521, FailCnt = 0, EvtType = 2 -INFO EVENT ID=66 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad MaxFailsBeforeRTS ----------------------------------------------- -ERROR EVENT ID=65 ADT verify err: AP = 30, Err = 3, State = 1, RTS = 20, FailCnt = 0, EvtType = 2 -INFO EVENT ID=66 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad EventType --------------------------------------- -ERROR EVENT ID=65 ADT verify err: AP = 30, Err = 4, State = 1, RTS = 20, FailCnt = 5, EvtType = 10 -INFO EVENT ID=66 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad RPN expression -LC_RPN_NOT as the first symbol -------------------------------------------- -ERROR EVENT ID=64 ADT verify RPN err: AP = 30, Index = 0, StackDepth = 0 -INFO EVENT ID=66 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad RPN expression -Missing watchpoint ID -------------------------------------------- -ERROR EVENT ID=64 ADT verify RPN err: AP = 30, Index = 1, StackDepth = 0 -INFO EVENT ID=66 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with bad RPN expression -Not a valid polish symbol or watchpoint ID -------------------------------------------- -ERROR EVENT ID=64 ADT verify RPN err: AP = 30, Index = 1, StackDepth = 1 -INFO EVENT ID=66 ADT verify results: good = 0, bad = 1, unused = 175 - -Test ADT Validation with good entry ------------------------------------ -INFO EVENT ID=66 ADT verify results: good = 1, bad = 0, unused = 175 - - -********************************** -* LC Set Actionpoint State Tests * -********************************** - -Test set AP state command with invalid new state ------------------------------------------------- -ERROR EVENT ID=30 Set AP state error: AP = 100, Invalid new state = 100 - -Test set AP state command with invalid AP number ------------------------------------------------- -ERROR EVENT ID=32 Set AP state error: Invalid AP number = 177 - -Test set AP state command with invalid current AP state -------------------------------------------------------- -INFO EVENT ID=33 Set AP state command: AP = 100, New state = 2 - -Test good set AP state command for a single AP ----------------------------------------------- -INFO EVENT ID=33 Set AP state command: AP = 100, New state = 2 - -Test good set AP state command for all APs ------------------------------------------- -INFO EVENT ID=33 Set AP state command: AP = 65535, New state = 1 - - -********************************** -* LC Set Actionpoint Off Tests * -********************************** - -Test set AP off command with invalid AP number ----------------------------------------------- -ERROR EVENT ID=34 Set AP perm off error: Invalid AP number = 177 - -Test set AP off command with invalid current AP state ------------------------------------------------------ -ERROR EVENT ID=35 Set AP perm off error, AP NOT Disabled: AP = 100, Current state = 255 - -Test good set AP off command ----------------------------- -INFO EVENT ID=36 Set AP permanently off command: AP = 100 - - -******************************* -* LC Sample Actionpoint Tests * -******************************* - -Test sample AP message with invalid AP number ---------------------------------------------- -ERROR EVENT ID=25 Sample AP error: invalid AP number, start = 177, end = 177 - -Test sample single AP message with invalid current AP state ------------------------------------------------------------ - -Test sample all APs message ----------------------------- - -Test sample single AP message with watch not measured ------------------------------------------------------ - -Test sample single AP message with watch error ----------------------------------------------- -ERROR EVENT ID=62 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression terminated with LC_RPN_AND ------------------------------------------------------ -ERROR EVENT ID=63 AP has illegal RPN expression: AP = 75, LastOperand = 1, StackPtr = 1 -ERROR EVENT ID=62 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression terminated with LC_RPN_OR ------------------------------------------------------ -ERROR EVENT ID=63 AP has illegal RPN expression: AP = 75, LastOperand = 1, StackPtr = 1 -ERROR EVENT ID=62 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression terminated with LC_RPN_XOR ------------------------------------------------------ -ERROR EVENT ID=63 AP has illegal RPN expression: AP = 75, LastOperand = 1, StackPtr = 1 -ERROR EVENT ID=62 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression begins with LC_RPN_NOT ------------------------------------------------------ -ERROR EVENT ID=63 AP has illegal RPN expression: AP = 75, LastOperand = 0, StackPtr = 1 -ERROR EVENT ID=62 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Premature LC_RPN_EQUAL in expression ------------------------------------------------------ -ERROR EVENT ID=63 AP has illegal RPN expression: AP = 75, LastOperand = 2, StackPtr = 1 -ERROR EVENT ID=62 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message with bad RPN expression -Expression runs beyond LC_MAX_RPN_EQU_SIZE ------------------------------------------------------ -ERROR EVENT ID=63 AP has illegal RPN expression: AP = 75, LastOperand = 19, StackPtr = 20 -ERROR EVENT ID=62 AP evaluated to error: AP = 75, Result = 2 - -Test sample single AP message, PASS to FAIL Transition ------------------------------------------------------ -> CMD: APID:00a9 SEQ:0 LEN:10 FC:4 PKT:18a9 c000 0003 0400 0014 -INFO EVENT ID=455 Test event text: AP = 75, FailCount = 1, RTS = 20 - -LC ART DATA FOR ENTRY #75: - Action Result = LC_ACTION_FAIL - Current State = LC_APSTATE_PASSIVE - Fail To Pass Count = 0 - Pass To Fail Count = 1 - Consecutive Fail Count = 1 - Cumulative Fail Count = 1 - Cumulative RTS Exec Count = 1 - - -Test sample single AP message, PASS to FAIL Transition -While LC state = LC_STATE_PASSIVE ------------------------------------------------------ -DEBUG EVENT ID=59 AP failed while LC App passive: AP = 75, FailCount = 1, RTS = 20 - -LC ART DATA FOR ENTRY #75: - Action Result = LC_ACTION_FAIL - Current State = LC_APSTATE_PASSIVE - Fail To Pass Count = 0 - Pass To Fail Count = 1 - Consecutive Fail Count = 1 - Cumulative Fail Count = 1 - Cumulative RTS Exec Count = 0 - - -Test sample single AP message, PASS to FAIL Transition -While AP state = LC_APSTATE_PASSIVE ------------------------------------------------------ - -LC ART DATA FOR ENTRY #75: - Action Result = LC_ACTION_FAIL - Current State = LC_APSTATE_PASSIVE - Fail To Pass Count = 0 - Pass To Fail Count = 1 - Consecutive Fail Count = 1 - Cumulative Fail Count = 1 - Cumulative RTS Exec Count = 0 - - -Test sample single AP message, FAIL to PASS Transition ------------------------------------------------------- - -LC ART DATA FOR ENTRY #75: - Action Result = LC_ACTION_PASS - Current State = LC_APSTATE_ACTIVE - Fail To Pass Count = 1 - Pass To Fail Count = 0 - Consecutive Fail Count = 0 - Cumulative Fail Count = 0 - Cumulative RTS Exec Count = 0 - - -Test creation of WP hash table --------------------------------------------------- - -Test process TLM packet --------------------------------------------------- -ERROR EVENT ID=53 WP offset error: MID = 1024, WP = 23, Offset = 24, DataSize = 1, MsgLen = 24 -ERROR EVENT ID=67 Unexpected LC_CustomFunction call: WP = 61 -ERROR EVENT ID=50 WP has undefined data type: WP = 62, DataType = 99 -ERROR EVENT ID=51 WP has invalid operator ID: WP = 63, OperID = 99 -ERROR EVENT ID=51 WP has invalid operator ID: WP = 64, OperID = 99 -ERROR EVENT ID=51 WP has invalid operator ID: WP = 65, OperID = 99 - -INFO EVENT ID=49 Msg with unreferenced message ID rcvd: ID = 0x0700 - -ERROR EVENT ID=53 WP offset error: MID = 1024, WP = 23, Offset = 24, DataSize = 1, MsgLen = 24 -ERROR EVENT ID=42 Invalid AP sample msg length: ID = 0x18A6, CC = 0, Len = 48, Expected = 14 -ERROR EVENT ID=25 Sample AP error: invalid AP number, start = 176, end = 175 -ERROR EVENT ID=25 Sample AP error: invalid AP number, start = 175, end = 176 -ERROR EVENT ID=41 Invalid HK request msg length: ID = 0x18A5, CC = 0, Len = 48, Expected = 8 -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=19 Error getting WDT address, RC=0xCC000001 - -LC HOUSEKEEPING DATA: - Command Count = 4 - Command Error Count = 4 - Actionpoint Sample Count = 179 - Monitored Message Count = 6 - RTS Exec Count = 1 - Passive RTS Exec Count = 1 - Watchpoints In Use = 32 - Active Actionpoints = 164 - Current LC State = LC_STATE_ACTIVE - -Watchpoint Results: -0x00 0x0F 0x0F 0x54 0xD5 0x80 0xF0 0x40 0x04 0x00 -0x00 0x00 0x00 0x15 0x00 0xA0 0x0A 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -0x00 0x00 0x00 0xC0 - -Actionpoint Results: -0x44 0x44 0x40 0x40 0x40 0x40 0x04 0x00 0x04 0x04 -0x44 0x04 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 -0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 -0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x34 0x44 0x44 -0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 -0x40 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 -0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 -0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 -0x44 0x44 0x44 0x44 0x44 0x44 0x44 0x44 -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:GetAddressInternal-App(0) using invalid Tbl Handle=0 -ERROR EVENT ID=19 Error getting WDT address, RC=0xCC000001 -ERROR EVENT ID=24 Invalid command code: ID = 0x18A4, CC = 99 -ERROR EVENT ID=43 Invalid msg length: ID = 0x18A4, CC = 0, Len = 48, Expected = 8 -INFO EVENT ID=26 No-op command: Version 0.0.0.0 -ERROR EVENT ID=43 Invalid msg length: ID = 0x18A4, CC = 1, Len = 48, Expected = 8 -DEBUG EVENT ID=27 Reset counters command -ERROR EVENT ID=43 Invalid msg length: ID = 0x18A4, CC = 2, Len = 48, Expected = 12 -ERROR EVENT ID=29 Set LC state error: invalid state = 99 -INFO EVENT ID=28 Set LC state command: new state = 2 -INFO EVENT ID=28 Set LC state command: new state = 3 -INFO EVENT ID=28 Set LC state command: new state = 1 -ERROR EVENT ID=43 Invalid msg length: ID = 0x18A4, CC = 3, Len = 48, Expected = 12 -ERROR EVENT ID=30 Set AP state error: AP = 175, Invalid new state = 99 -ERROR EVENT ID=32 Set AP state error: Invalid AP number = 176 -INFO EVENT ID=33 Set AP state command: AP = 175, New state = 2 -ERROR EVENT ID=31 Set AP state error: AP = 175, Invalid current AP state = 4 -INFO EVENT ID=33 Set AP state command: AP = 175, New state = 1 -ERROR EVENT ID=43 Invalid msg length: ID = 0x18A4, CC = 4, Len = 48, Expected = 12 -ERROR EVENT ID=34 Set AP perm off error: Invalid AP number = 176 -ERROR EVENT ID=43 Invalid msg length: ID = 0x18A4, CC = 5, Len = 48, Expected = 12 -ERROR EVENT ID=37 Reset AP stats error: invalid AP number = 176 -INFO EVENT ID=38 Reset AP stats command: AP = 65535 -INFO EVENT ID=38 Reset AP stats command: AP = 175 -ERROR EVENT ID=43 Invalid msg length: ID = 0x18A4, CC = 6, Len = 48, Expected = 12 -ERROR EVENT ID=39 Reset WP stats error: invalid WP number = 176 -INFO EVENT ID=40 Reset WP stats command: WP = 65535 -INFO EVENT ID=40 Reset WP stats command: WP = 175 - -ERROR EVENT ID=57 Sample AP error, invalid current AP state: AP = 0, State = 255 -ERROR EVENT ID=57 Sample AP error, invalid current AP state: AP = 0, State = 4 -INFO EVENT ID=58 AP state change from PASS to FAIL: AP = 0 -INFO EVENT ID=58 AP state change from PASS to FAIL: AP = 0 -INFO EVENT ID=60 AP failed while passive: AP = 0, FailCount = 1, RTS = 0 -INFO EVENT ID=61 AP state change from FAIL to PASS: AP = 0 -ERROR EVENT ID=63 AP has illegal RPN expression: AP = 0, LastOperand = 0, StackPtr = 0 -ERROR EVENT ID=50 WP has undefined data type: WP = 0, DataType = 99 -ERROR EVENT ID=52 WP data value is a float NAN: WP = 0, Value = 0x7F800001 -UTF Info: Return value for CFE TBL Api #6 set to 0 -UTF Info: Return value for CFE TBL Api #10 set to 0 -UTF Info: Return value for CFE TBL Api #5 set to 4c00000e -UTF Info: Return value for CFE TBL Api #5 set to 0 -ERROR EVENT ID=20 Error getting ADT address, RC=0xCC000001 -UTF Info: Return value for CFE TBL Api #5 set to 0 -UTF Info: Return value for CFE TBL Api #6 set to 0 -UTF Info: Return value for CFE TBL Api #10 set to 0 - -LC HOUSEKEEPING DATA: - Command Count = 9 - Command Error Count = 12 - Actionpoint Sample Count = 3 - Monitored Message Count = 0 - RTS Exec Count = 0 - Passive RTS Exec Count = 0 - Watchpoints In Use = 32 - Active Actionpoints = 0 - Current LC State = LC_STATE_ACTIVE - -Watchpoint Results: -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF -0xFF 0xFF 0xFF 0xFF - -Actionpoint Results: -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -0x33 0x33 0x33 0x33 0x33 0x33 0x33 0x33 -UTF Info: Return value for CFE SB Api #2 set to ca000003 -UTF Info: Return value for CFE SB Api #3 set to ca00000b -ERROR EVENT ID=44 Error unsubscribing watchpoint: MID=0x0400, RC=0xCA00000B -ERROR EVENT ID=44 Error unsubscribing watchpoint: MID=0x0401, RC=0xCA00000B -ERROR EVENT ID=44 Error unsubscribing watchpoint: MID=0x0500, RC=0xCA00000B -ERROR EVENT ID=44 Error unsubscribing watchpoint: MID=0x0501, RC=0xCA00000B -ERROR EVENT ID=44 Error unsubscribing watchpoint: MID=0x0600, RC=0xCA00000B -ERROR EVENT ID=45 Error subscribing watchpoint: MID=0x0400, RC=0xCA000003 -ERROR EVENT ID=45 Error subscribing watchpoint: MID=0x0401, RC=0xCA000003 -ERROR EVENT ID=45 Error subscribing watchpoint: MID=0x0500, RC=0xCA000003 -ERROR EVENT ID=45 Error subscribing watchpoint: MID=0x0501, RC=0xCA000003 -ERROR EVENT ID=45 Error subscribing watchpoint: MID=0x0600, RC=0xCA000003 -ERROR EVENT ID=50 WP has undefined data type: WP = 0, DataType = 99 -ERROR EVENT ID=15 Error (RC=0xCC000001) Loading WDT with '/cf/apps/lc_def_wdt.tbl' -ERROR EVENT ID=19 Error getting WDT address, RC=0xCC000001 -ERROR EVENT ID=16 Error (RC=0xCC000001) Loading ADT with '/cf/apps/lc_def_adt.tbl' -ERROR EVENT ID=20 Error getting ADT address, RC=0xCC000001 -ERROR EVENT ID=7 Error registering WDT, RC=0xCC000003 -ERROR EVENT ID=7 Error registering WDT, RC=0xCC000003 -ERROR EVENT ID=9 Error registering ADT, RC=0xCC000003 -ERROR EVENT ID=11 Error registering ART, RC=0xCC000003 -ERROR EVENT ID=18 Error getting ART address, RC=0xCC000001 -ERROR EVENT ID=7 Error registering WDT, RC=0xCC000003 -UTF Info: Return value for CFE TBL Api #3 set to 0 -UTF Info: Return value for CFE TBL Api #0 set to 0 -UTF Info: Return value for CFE SB Api #2 set to 0 -UTF Info: Return value for CFE SB Api #3 set to 0 -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateHandle-Table Handle=0 is for unused Table Handle -SysLog:1980-001-00:00:00.00000 CFE_TBL:ValidateAccess-Invalid Tbl Handle=0 -SysLog:1980-001-00:00:00.00000 CFE_TBL:Unregister-App(0) does not have access to Tbl Handle=0 -ERROR EVENT ID=92 LC Failed to Unregister '?', Status=0xCC000001 -INFO EVENT ID=2 LC Initialized. Version 0.0.0.0 diff --git a/fsw/unit_test/output_noCDS/lc_watch.c.gcov b/fsw/unit_test/output_noCDS/lc_watch.c.gcov deleted file mode 100644 index 359c244..0000000 --- a/fsw/unit_test/output_noCDS/lc_watch.c.gcov +++ /dev/null @@ -1,1639 +0,0 @@ - -: 0:Source:../src/lc_watch.c - -: 0:Graph:lc_watch.gcno - -: 0:Data:lc_watch.gcda - -: 0:Runs:1 - -: 0:Programs:4 - -: 1:/************************************************************************* - -: 2:** File: - -: 3:** $Id: lc_watch.c.gcov 1.1.1.1 2012/10/01 18:48:45EDT lwalling Exp $ - -: 4:** - -: 5:** Purpose: - -: 6:** Functions used for CFS Limit Checker watchpoint processing - -: 7:** - -: 8:** $Log: lc_watch.c.gcov $ - -: 8:** Revision 1.1.1.1 2012/10/01 18:48:45EDT lwalling - -: 8:** Apply unit test output file updates to branch - -: 8:** Revision 1.3 2012/10/01 13:58:04PDT lwalling - -: 8:** Updates to output files after fix compile warnings - -: 9:** Revision 1.4 2012/08/22 14:19:06PDT lwalling - -: 10:** Modified true to false transition monitor to also accept stale to false - -: 11:** Revision 1.3 2012/08/01 12:42:12PDT lwalling - -: 12:** Add STALE counters to watchpoint definition and result tables - -: 13:** Revision 1.2 2012/08/01 11:19:54PDT lwalling - -: 14:** Change NOT_MEASURED to STALE - -: 15:** Revision 1.1 2012/07/31 13:53:40PDT nschweis - -: 16:** Initial revision - -: 17:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lcx/fsw/src/project.pj - -: 18:** Revision 1.7 2011/06/08 16:17:16EDT lwalling - -: 19:** Added hash table functions, modified LC_CheckMsgForWPs() to use hash table functions - -: 20:** Revision 1.6 2011/01/19 12:43:11EST jmdagost - -: 21:** Added lc_watch.h to include list. - -: 22:** Revision 1.5 2011/01/19 11:38:40EST jmdagost - -: 23:** Initialize local variables per IV&V. - -: 24:** Revision 1.4 2009/02/26 11:01:01EST dahardis - -: 25:** Modified so a watchponit transition from Not Measured to True - -: 26:** will get treated the same as a transition from False to True (DCR #7097) - -: 27:** Revision 1.3 2009/01/15 15:36:17EST dahardis - -: 28:** Unit test fixes - -: 29:** Revision 1.2 2008/12/03 13:59:46EST dahardis - -: 30:** Corrections from peer code review - -: 31:** Revision 1.1 2008/10/29 14:19:52EDT dahardison - -: 32:** Initial revision - -: 33:** Member added to project c:/MKSDATA/MKS-REPOSITORY/CFS-REPOSITORY/lc/fsw/src/project.pj - -: 34:** - -: 35:*************************************************************************/ - -: 36: - -: 37:/************************************************************************* - -: 38:** Includes - -: 39:*************************************************************************/ - -: 40:#include "lc_app.h" - -: 41:#include "lc_watch.h" - -: 42:#include "lc_events.h" - -: 43:#include "lc_custom.h" - -: 44:#include "lc_perfids.h" - -: 45: - -: 46:/************************************************************************ - -: 47:** Local Macro Definitions - -: 48:*************************************************************************/ - -: 49:/** - -: 50:** \name LC Byte Order Identifiers */ - -: 51:/** \{ */ - -: 52:#define LC_BIG_ENDIAN 1 - -: 53:#define LC_LITTLE_ENDIAN 2 - -: 54:/** \} */ - -: 55: - -: 56:/************************************************************************* - -: 57:** Local Function Prototypes - -: 58:*************************************************************************/ - -: 59:/************************************************************************/ - -: 60:/** \brief Process a single watchpoint - -: 61:** - -: 62:** \par Description - -: 63:** Support function for watchpoint processing that will - -: 64:** evaluate a single watchpoint - -: 65:** - -: 66:** \par Assumptions, External Events, and Notes: - -: 67:** None - -: 68:** - -: 69:** \param [in] WatchIndex The watchpoint number to evaluate (zero - -: 70:** based watchpoint definition table index) - -: 71:** - -: 72:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 73:** references the software bus message that - -: 74:** contains the watchpoint data - -: 75:** - -: 76:** \param [in] Timestamp A #CFE_TIME_SysTime_t timestamp to use - -: 77:** to update the watchpoint results data - -: 78:** if a state transition is detected - -: 79:** - -: 80:*************************************************************************/ - -: 81:void LC_ProcessWP(uint16 WatchIndex, - -: 82: CFE_SB_MsgPtr_t MessagePtr, - -: 83: CFE_TIME_SysTime_t Timestamp); - -: 84: - -: 85:/************************************************************************/ - -: 86:/** \brief Operator comparison - -: 87:** - -: 88:** \par Description - -: 89:** Support function for watchpoint processing that will perform - -: 90:** the watchpoint data comparison based upon the operator and - -: 91:** data type specified in the watchpoint definition table - -: 92:** - -: 93:** \par Assumptions, External Events, and Notes: - -: 94:** None - -: 95:** - -: 96:** \param [in] WatchIndex The watchpoint number to compare (zero - -: 97:** based watchpoint definition table index) - -: 98:** - -: 99:** \param [in] ProcessedWPData The watchpoint data extracted from - -: 100:** the message that it was contained - -: 101:** in. This is the data after any - -: 102:** sizing, bit-masking, and endianess - -: 103:** fixing that LC might have done - -: 104:** according to the watchpoint definition - -: 105:** - -: 106:** \returns - -: 107:** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode - -: 108:** \retstmt Return codes from #LC_SignedCompare \endcode - -: 109:** \retstmt Return codes from #LC_UnsignedCompare \endcode - -: 110:** \retstmt Return codes from #LC_FloatCompare \endcode - -: 111:** \endreturns - -: 112:** - -: 113:*************************************************************************/ - -: 114:uint8 LC_OperatorCompare(uint16 WatchIndex, - -: 115: uint32 ProcessedWPData); - -: 116: - -: 117:/************************************************************************/ - -: 118:/** \brief Signed comparison - -: 119:** - -: 120:** \par Description - -: 121:** Support function for watchpoint processing that will perform - -: 122:** a signed watchpoint data comparison based upon the operator - -: 123:** specified in the watchpoint definition table - -: 124:** - -: 125:** \par Assumptions, External Events, and Notes: - -: 126:** None - -: 127:** - -: 128:** \param [in] WatchIndex The watchpoint number to compare (zero - -: 129:** based watchpoint definition table index) - -: 130:** - -: 131:** \param [in] WPValue The watchpoint data extracted from - -: 132:** the message that it was contained - -: 133:** in. This is the data after any - -: 134:** sizing, bit-masking, and endianess - -: 135:** fixing that LC might have done - -: 136:** according to the watchpoint definition - -: 137:** - -: 138:** \param [in] CompareValue The comparison value specified in the - -: 139:** watchpoint definition table (sign - -: 140:** extended, if needed, in an int32) - -: 141:** - -: 142:** \returns - -: 143:** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode - -: 144:** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode - -: 145:** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode - -: 146:** \endreturns - -: 147:** - -: 148:*************************************************************************/ - -: 149:uint8 LC_SignedCompare(uint16 WatchIndex, - -: 150: int32 WPValue, - -: 151: int32 CompareValue); - -: 152: - -: 153:/************************************************************************/ - -: 154:/** \brief Unsigned comparison - -: 155:** - -: 156:** \par Description - -: 157:** Support function for watchpoint processing that will perform - -: 158:** an unsigned watchpoint data comparison based upon the operator - -: 159:** specified in the watchpoint definition table - -: 160:** - -: 161:** \par Assumptions, External Events, and Notes: - -: 162:** None - -: 163:** - -: 164:** \param [in] WatchIndex The watchpoint number to compare (zero - -: 165:** based watchpoint definition table index) - -: 166:** - -: 167:** \param [in] WPValue The watchpoint data extracted from - -: 168:** the message that it was contained - -: 169:** in. This is the data after any - -: 170:** sizing, bit-masking, and endianess - -: 171:** fixing that LC might have done - -: 172:** according to the watchpoint definition - -: 173:** - -: 174:** \param [in] CompareValue The comparison value specified in the - -: 175:** watchpoint definition table (zero - -: 176:** extended, if needed, in an uint32) - -: 177:** - -: 178:** \returns - -: 179:** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode - -: 180:** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode - -: 181:** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode - -: 182:** \endreturns - -: 183:** - -: 184:*************************************************************************/ - -: 185:uint8 LC_UnsignedCompare(uint16 WatchIndex, - -: 186: uint32 WPValue, - -: 187: uint32 CompareValue); - -: 188: - -: 189:/************************************************************************/ - -: 190:/** \brief Float comparison - -: 191:** - -: 192:** \par Description - -: 193:** Support function for watchpoint processing that will perform - -: 194:** an floating point watchpoint data comparison based upon the operator - -: 195:** specified in the watchpoint definition table - -: 196:** - -: 197:** \par Assumptions, External Events, and Notes: - -: 198:** None - -: 199:** - -: 200:** \param [in] WatchIndex The watchpoint number to compare (zero - -: 201:** based watchpoint definition table index) - -: 202:** - -: 203:** \param [in] WPMultiType The watchpoint data extracted from - -: 204:** the message that it was contained - -: 205:** in. Stored in a multi-type union. - -: 206:** This is the data after any sizing, - -: 207:** bit-masking, and endianess fixing - -: 208:** that LC might have done according - -: 209:** to the watchpoint definition - -: 210:** - -: 211:** \param [in] CompareMultiType The comparison value specified in the - -: 212:** watchpoint definition table. Stored - -: 213:** in a muti-type union so it can easily - -: 214:** be accessed as a uint32 for validity - -: 215:** checks - -: 216:** - -: 217:** \returns - -: 218:** \retcode #LC_WATCH_TRUE \retdesc \copydoc LC_WATCH_TRUE \endcode - -: 219:** \retcode #LC_WATCH_FALSE \retdesc \copydoc LC_WATCH_FALSE \endcode - -: 220:** \retcode #LC_WATCH_ERROR \retdesc \copydoc LC_WATCH_ERROR \endcode - -: 221:** \endreturns - -: 222:** - -: 223:*************************************************************************/ - -: 224:uint8 LC_FloatCompare(uint16 WatchIndex, - -: 225: LC_MultiType_t WPMultiType, - -: 226: LC_MultiType_t CompareMultiType); - -: 227: - -: 228:/************************************************************************/ - -: 229:/** \brief Watchpoint offset valid - -: 230:** - -: 231:** \par Description - -: 232:** Support function for watchpoint processing that will check if - -: 233:** the watchpoint offset specified in the definition table would - -: 234:** extend past the message that contains the watchpoint data - -: 235:** - -: 236:** \par Assumptions, External Events, and Notes: - -: 237:** None - -: 238:** - -: 239:** \param [in] WatchIndex The watchpoint number to check (zero - -: 240:** based watchpoint definition table index) - -: 241:** - -: 242:** \param [in] MessagePtr A #CFE_SB_MsgPtr_t pointer that - -: 243:** references the software bus message that - -: 244:** contains the watchpoint data - -: 245:** - -: 246:** \returns - -: 247:** \retstmt Returns TRUE if the offset is within the message size \endcode - -: 248:** \retstmt Returns FALSE if the offset extends past message end \endcode - -: 249:** \endreturns - -: 250:** - -: 251:*************************************************************************/ - -: 252:boolean LC_WPOffsetValid(uint16 WatchIndex, - -: 253: CFE_SB_MsgPtr_t MessagePtr); - -: 254: - -: 255:/************************************************************************/ - -: 256:/** \brief Get sized data - -: 257:** - -: 258:** \par Description - -: 259:** Support function for watchpoint processing that will extract - -: 260:** the watchpoint data from a software bus message based upon the - -: 261:** data type specified in the watchpoint definition table and - -: 262:** store it in a uint32. If there are any endian differences between - -: 263:** LC and the watchpoint data, this is where it will get fixed up. - -: 264:** - -: 265:** \par Assumptions, External Events, and Notes: - -: 266:** None - -: 267:** - -: 268:** \param [in] WatchIndex The watchpoint number to extract (zero - -: 269:** based watchpoint definition table index) - -: 270:** - -: 271:** \param [in] WPDataPtr A pointer to the first byte of the - -: 272:** watchpoint data as it exists in the - -: 273:** software bus message it was received in - -: 274:** - -: 275:** \param [in] SizedDataPtr A pointer to where the extracted watchpoint - -: 276:* data should be stored - -: 277:** - -: 278:** \param [out] *SizedDataPtr Contains the extracted watchpoint data. - -: 279:** This will be set to zero on error - -: 280:** - -: 281:** \returns - -: 282:** \retstmt Returns TRUE if no error \endcode - -: 283:** \retstmt Returns FALSE if an error occurred \endcode - -: 284:** \endreturns - -: 285:** - -: 286:*************************************************************************/ - -: 287:boolean LC_GetSizedWPData(uint16 WatchIndex, - -: 288: uint8 *WPDataPtr, - -: 289: uint32 *SizedDataPtr); - -: 290: - -: 291:/************************************************************************/ - -: 292:/** \brief Check uint32 for float NAN - -: 293:** - -: 294:** \par Description - -: 295:** Utility function for watchpoint processing that will test if - -: 296:** a uint32 value would result in a NAN (not-a-number) value if - -: 297:** it was interpreted as a float. - -: 298:** - -: 299:** \par Assumptions, External Events, and Notes: - -: 300:** None - -: 301:** - -: 302:** \param [in] Data The uint32 value to check - -: 303:** - -: 304:** \returns - -: 305:** \retstmt Returns TRUE if value is a float NAN \endcode - -: 306:** \retstmt Returns FALSE if value is not a float NAN \endcode - -: 307:** \endreturns - -: 308:** - -: 309:*************************************************************************/ - -: 310:boolean LC_Uint32IsNAN(uint32 Data); - -: 311: - -: 312:/************************************************************************/ - -: 313:/** \brief Check uint32 for float infinite - -: 314:** - -: 315:** \par Description - -: 316:** Utility function for watchpoint processing that will test if - -: 317:** a uint32 value would result in an infinite value if - -: 318:** it was interpreted as a float. - -: 319:** - -: 320:** \par Assumptions, External Events, and Notes: - -: 321:** None - -: 322:** - -: 323:** \param [in] Data The uint32 value to check - -: 324:** - -: 325:** \returns - -: 326:** \retstmt Returns TRUE if value is an inifinite float \endcode - -: 327:** \retstmt Returns FALSE if value is not an inifinite float \endcode - -: 328:** \endreturns - -: 329:** - -: 330:*************************************************************************/ - -: 331:boolean LC_Uint32IsInfinite(uint32 Data); - -: 332: - -: 333:/************************************************************************/ - -: 334:/** \brief Convert messageID into hash table index - -: 335:** - -: 336:** \par Description - -: 337:** Utility function for watchpoint processing that converts a - -: 338:** messageID into an index into the watchpoint hash table. - -: 339:** - -: 340:** The following code supports use of the watchpoint hash table: - -: 341:** - -: 342:** 1) #LC_GetHashTableIndex - convert messageID to hash table index - -: 343:** 2) #LC_CreateHashTable - after load Watchpoint Definition Table - -: 344:** 3) #LC_AddWatchpoint - add one watchpoint to hash table - -: 345:** 4) #LC_CheckMsgForWPs - process all WP's that reference messageID - -: 346:** - -: 347:** The following data structures support the hash table: - -: 348:** - -: 349:** 1) Hash table (256 entries) - -: 350:** 2) Array of links for messageID linked lists (LC_MAX_WATCHPOINTS) - -: 351:** 3) Array of links for watchpoint linked lists (LC_MAX_WATCHPOINTS) - -: 352:** - -: 353:** Rather than search the entire Watchpoint Definition Table to find - -: 354:** the watchpoints that reference a particular messageID, LC does - -: 355:** the following: - -: 356:** - -: 357:** 1) Call hash table function (convert messageID to hash table index) - -: 358:** 2) Get messageID linked list from indexed hash table entry - -: 359:** 3) Search messageID list (max 8) for matching messageID - -: 360:** 4) Get watchpoint linked list from matching messageID link - -: 361:** 5) Done - only watchpoints that reference messageID are in list - -: 362:** - -: 363:** \par Assumptions, External Events, and Notes: - -: 364:** None - -: 365:** - -: 366:** \param [in] MessageID SoftwareBus packet message ID - -: 367:** - -: 368:** \returns - -: 369:** \retstmt Returns index into watchpoint hash table \endcode - -: 370:** \endreturns - -: 371:** - -: 372:*************************************************************************/ - -: 373:uint32 LC_GetHashTableIndex(CFE_SB_MsgId_t MessageID); - -: 374: - -: 375:/************************************************************************/ - -: 376:/** \brief Add one watchpoint linked list entry during creation of hash table - -: 377:** - -: 378:** \par Description - -: 379:** Utility function that adds another link to the watchpoint linked list - -: 380:** for the specified messageID. The function will also add a messageID - -: 381:** linked list entry to the hash table if this is the first reference - -: 382:** to that messageID. The function will also subscribe to the messageID - -: 383:** if this is the first reference to that messageID. The function will - -: 384:** return a pointer to the watchpoint linked list entry just added. - -: 385:** - -: 386:** The following code supports use of the watchpoint hash table: - -: 387:** - -: 388:** 1) #LC_GetHashTableIndex - convert messageID to hash table index - -: 389:** 2) #LC_CreateHashTable - after load Watchpoint Definition Table - -: 390:** 3) #LC_AddWatchpoint - add one watchpoint to hash table - -: 391:** 4) #LC_CheckMsgForWPs - process all WP's that reference messageID - -: 392:** - -: 393:** The following data structures support the hash table: - -: 394:** - -: 395:** 1) Hash table (256 entries) - -: 396:** 2) Array of links for messageID linked lists (LC_MAX_WATCHPOINTS) - -: 397:** 3) Array of links for watchpoint linked lists (LC_MAX_WATCHPOINTS) - -: 398:** - -: 399:** Rather than search the entire Watchpoint Definition Table to find - -: 400:** the watchpoints that reference a particular messageID, LC does - -: 401:** the following: - -: 402:** - -: 403:** 1) Call hash table function (convert messageID to hash table index) - -: 404:** 2) Get messageID linked list from indexed hash table entry - -: 405:** 3) Search messageID list (max 8) for matching messageID - -: 406:** 4) Get watchpoint linked list from matching messageID link - -: 407:** 5) Done - only watchpoints that reference messageID are in list - -: 408:** - -: 409:** \par Assumptions, External Events, and Notes: - -: 410:** None - -: 411:** - -: 412:** \param [in] MessageID SoftwareBus packet message ID - -: 413:** - -: 414:** \returns - -: 415:** \retstmt Returns pointer to the watchpoint linked list entry just added \endcode - -: 416:** \endreturns - -: 417:** - -: 418:*************************************************************************/ - -: 419:LC_WatchPtList_t *LC_AddWatchpoint(CFE_SB_MsgId_t MessageID); - -: 420: - -: 421: - -: 422:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 423:/* */ - -: 424:/* LC_GetHashTableIndex() - convert messageID to hash table index */ - -: 425:/* */ - -: 426:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 427: - -: 428:uint32 LC_GetHashTableIndex(CFE_SB_MsgId_t MessageID) - 93: 429:{ - -: 430: /* - -: 431: ** The purpose of a hash function is to take the input value - -: 432: ** and convert it to an index into the hash table. Assume that - -: 433: ** the range of input values is much different (larger) than - -: 434: ** the number of entries in the hash table. Then multiple input - -: 435: ** values must resolve to the same output table index. This is ok - -: 436: ** because each entry in the hash table is a linked list of all - -: 437: ** the inputs with the same hash function result. - -: 438: ** - -: 439: ** This particular hash function takes advantage of knowledge - -: 440: ** regarding the format of the input values (cFE MessageID). By - -: 441: ** ignoring the bits that define version number, packet type and - -: 442: ** secondary header (high 5 bits of 16) we are left with the bits - -: 443: ** (mask = 0x7FF) that can identify 2048 unique input telemetry - -: 444: ** packets. Also, by using a fixed hash table size of 256 entries - -: 445: ** and using only the lower 8 bits of the bitmask as the result - -: 446: ** of the hash function, no single hash table entry will have more - -: 447: ** than 8 elements in its linked list. - -: 448: */ - 93: 449: return((uint32) (MessageID & LC_HASH_TABLE_MASK)); - -: 450: - -: 451:} /* End of LC_GetHashTableIndex() */ - -: 452: - -: 453: - -: 454:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 455:/* */ - -: 456:/* LC_CreateHashTable() - create watchpoint hash table */ - -: 457:/* */ - -: 458:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 459: - -: 460:void LC_CreateHashTable(void) - 6: 461:{ - -: 462: LC_WatchPtList_t *WatchPtLink; - -: 463: CFE_SB_MsgId_t LastMessageID; - -: 464: CFE_SB_MsgId_t MessageID; - -: 465: int32 MessageLinkIndex; - -: 466: int32 WatchPtTblIndex; - -: 467: int32 Result; - -: 468: - -: 469: - -: 470: /* Un-subscribe to any MessageID's referenced in previous Watchpoint Definition Table */ - 26: 471: for (MessageLinkIndex = 0; MessageLinkIndex < LC_OperData.MessageIDsCount; MessageLinkIndex++) - -: 472: { - 20: 473: MessageID = LC_OperData.MessageLinks[MessageLinkIndex].MessageID; - -: 474: - 20: 475: if ((Result = CFE_SB_Unsubscribe(MessageID, LC_OperData.CmdPipe)) != CFE_SUCCESS) - -: 476: { - 5: 477: CFE_EVS_SendEvent(LC_UNSUB_WP_ERR_EID, CFE_EVS_ERROR, - -: 478: "Error unsubscribing watchpoint: MID=0x%04X, RC=0x%08X", - -: 479: MessageID, Result); - -: 480: } - -: 481: } - -: 482: - -: 483: /* Initialize hash table structures */ - 6: 484: CFE_PSP_MemSet(LC_OperData.HashTable, 0, (LC_HASH_TABLE_ENTRIES * sizeof(LC_MessageList_t *))); - 6: 485: CFE_PSP_MemSet(LC_OperData.MessageLinks, 0, (LC_MAX_WATCHPOINTS * sizeof(LC_MessageList_t))); - 6: 486: CFE_PSP_MemSet(LC_OperData.WatchPtLinks, 0, (LC_MAX_WATCHPOINTS * sizeof(LC_WatchPtList_t))); - -: 487: - 6: 488: LC_OperData.MessageIDsCount = 0; - 6: 489: LC_OperData.WatchpointCount = 0; - -: 490: - 6: 491: LastMessageID = 0xFFFF; - 6: 492: WatchPtLink = (LC_WatchPtList_t *) NULL; - -: 493: - -: 494: /* Process each entry in the Watchpoint Definition Table */ - 1062: 495: for (WatchPtTblIndex = 0; WatchPtTblIndex < LC_MAX_WATCHPOINTS; WatchPtTblIndex++) - -: 496: { - -: 497: /* Skip unused watchpoint table entries */ - 1056: 498: if (LC_OperData.WDTPtr[WatchPtTblIndex].DataType != LC_WATCH_NOT_USED) - -: 499: { - 194: 500: MessageID = LC_OperData.WDTPtr[WatchPtTblIndex].MessageID; - -: 501: - -: 502: /* Use optimized code path if same MessageID as last watchpoint */ - 302: 503: if ((LastMessageID == MessageID) && (WatchPtLink != (LC_WatchPtList_t *) NULL)) - -: 504: { - -: 505: /* WatchPtLink points to last link in list for this Message ID */ - 108: 506: WatchPtLink->Next = &LC_OperData.WatchPtLinks[LC_OperData.WatchpointCount++]; - -: 507: - -: 508: /* Add new link to end of list, point to new last link */ - 108: 509: WatchPtLink = WatchPtLink->Next; - -: 510: } - -: 511: else - -: 512: { - -: 513: /* May add message list link and subscribe to MessageID */ - 86: 514: WatchPtLink = LC_AddWatchpoint(MessageID); - -: 515: } - -: 516: - -: 517: /* Set watchpoint table index for this entry in list */ - 194: 518: WatchPtLink->WatchIndex = WatchPtTblIndex; - -: 519: - 194: 520: LastMessageID = MessageID; - -: 521: } - -: 522: } - -: 523: - -: 524: return; - -: 525: - -: 526:} /* End of LC_CreateHashTable() */ - -: 527: - -: 528: - -: 529:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 530:/* */ - -: 531:/* LC_AddWatchpoint() - add one watchpoint entry to hash table */ - -: 532:/* */ - -: 533:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 534: - -: 535:LC_WatchPtList_t *LC_AddWatchpoint(CFE_SB_MsgId_t MessageID) - 86: 536:{ - -: 537: LC_MessageList_t *MessageLink; - -: 538: LC_WatchPtList_t *WatchPtLink; - -: 539: boolean NeedSubscription; - -: 540: int32 HashTableIndex; - -: 541: int32 Result; - -: 542: - -: 543: /* Hash function converts MessageID into hash table index */ - 86: 544: HashTableIndex = LC_GetHashTableIndex(MessageID); - -: 545: - -: 546: /* Subscribe only for first reference to each MessageID */ - 86: 547: NeedSubscription = FALSE; - -: 548: - -: 549: /* Each hash table entry is a linked list of MessageID's with same hash result */ - 86: 550: if (LC_OperData.HashTable[HashTableIndex] == (LC_MessageList_t *) NULL) - -: 551: { - -: 552: /* Get next unused MessageID linked list entry */ - 12: 553: MessageLink = &LC_OperData.MessageLinks[LC_OperData.MessageIDsCount++]; - -: 554: - -: 555: /* Set first (and only) link in this hash table entry linked list */ - 12: 556: LC_OperData.HashTable[HashTableIndex] = MessageLink; - -: 557: - -: 558: /* Set the MessageID for this link */ - 12: 559: MessageLink->MessageID = MessageID; - -: 560: - -: 561: /* Subscribe to first link in list */ - 12: 562: NeedSubscription = TRUE; - -: 563: } - -: 564: else - -: 565: { - -: 566: /* Get start of linked list (all MID's with same hash result) */ - 74: 567: MessageLink = LC_OperData.HashTable[HashTableIndex]; - -: 568: - -: 569: /* Find the link for this MessageID */ - 194: 570: while (MessageLink->MessageID != MessageID) - -: 571: { - 46: 572: if (MessageLink->Next == (LC_MessageList_t *) NULL) - -: 573: { - -: 574: /* Reached end of list without finding MessageID */ - 20: 575: MessageLink->Next = &LC_OperData.MessageLinks[LC_OperData.MessageIDsCount++]; - 20: 576: MessageLink = MessageLink->Next; - -: 577: - -: 578: /* Add link with this MessageID (will exit loop) */ - 20: 579: MessageLink->MessageID = MessageID; - -: 580: - -: 581: /* Subscribe to new link in list */ - 20: 582: NeedSubscription = TRUE; - -: 583: } - -: 584: else - -: 585: { - -: 586: /* Try the next link in the list */ - 26: 587: MessageLink = MessageLink->Next; - -: 588: } - -: 589: } - -: 590: } - -: 591: - -: 592: /* Subscribe only once to each MessageID */ - 86: 593: if (NeedSubscription) - -: 594: { - 32: 595: if ((Result = CFE_SB_Subscribe(MessageID, LC_OperData.CmdPipe)) != CFE_SUCCESS) - -: 596: { - -: 597: /* Signal the error, but continue */ - 5: 598: CFE_EVS_SendEvent(LC_SUB_WP_ERR_EID, CFE_EVS_ERROR, - -: 599: "Error subscribing watchpoint: MID=0x%04X, RC=0x%08X", - -: 600: MessageID, Result); - -: 601: } - -: 602: } - -: 603: - -: 604: /* MessageLink points to the link for this MessageID */ - 86: 605: if (MessageLink->WatchPtList == (LC_WatchPtList_t *) NULL) - -: 606: { - -: 607: /* Get next unused watchpoint linked list entry */ - 32: 608: WatchPtLink = &LC_OperData.WatchPtLinks[LC_OperData.WatchpointCount++]; - -: 609: - -: 610: /* Set the start (and only) link in the watchpoint link list */ - 32: 611: MessageLink->WatchPtList = WatchPtLink; - -: 612: } - -: 613: else - -: 614: { - -: 615: /* Find the end of the watchpoint linked list */ - 54: 616: WatchPtLink = MessageLink->WatchPtList; - -: 617: - 228: 618: while (WatchPtLink->Next != (LC_WatchPtList_t *) NULL) - -: 619: { - 120: 620: WatchPtLink = WatchPtLink->Next; - -: 621: } - -: 622: - -: 623: /* Add the new watchpoint link to the end of the list */ - 54: 624: WatchPtLink->Next = &LC_OperData.WatchPtLinks[LC_OperData.WatchpointCount++]; - 54: 625: WatchPtLink = WatchPtLink->Next; - -: 626: } - -: 627: - -: 628: /* Return pointer to last link in watchpoint linked list */ - 86: 629: return(WatchPtLink); - -: 630: - -: 631:} /* End of LC_AddWatchpoint() */ - -: 632: - -: 633: - -: 634:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 635:/* */ - -: 636:/* Handle a message with possible watchpoints */ - -: 637:/* */ - -: 638:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 639:void LC_CheckMsgForWPs(CFE_SB_MsgId_t MessageID, CFE_SB_MsgPtr_t MessagePtr) - 7: 640:{ - -: 641: CFE_TIME_SysTime_t Timestamp; - -: 642: LC_MessageList_t *MessageList; - -: 643: LC_WatchPtList_t *WatchPtList; - 7: 644: boolean WatchPtFound = FALSE; - -: 645: - -: 646: /* Do nothing if disabled at the application level */ - 7: 647: if (LC_AppData.CurrentLCState != LC_STATE_DISABLED) - -: 648: { - -: 649: /* Use message timestamp - if none, use current time */ - 7: 650: Timestamp = CFE_SB_GetMsgTime(MessagePtr); - -: 651: - 7: 652: if ((Timestamp.Seconds == 0) && (Timestamp.Subseconds == 0)) - -: 653: { - 7: 654: Timestamp = CFE_TIME_GetTime(); - -: 655: } - -: 656: - -: 657: /* Performance Log (start time counter) */ - 7: 658: CFE_ES_PerfLogEntry(LC_WDT_SEARCH_PERF_ID); - -: 659: - -: 660: /* Get start of linked list (all MID's with same hash result) */ - 7: 661: MessageList = LC_OperData.HashTable[LC_GetHashTableIndex(MessageID)]; - -: 662: - -: 663: /* NULL when list is empty or end of list */ - 21: 664: while (MessageList != (LC_MessageList_t *) NULL) - -: 665: { - -: 666: /* Compare this linked list entry for matching MessageID */ - 13: 667: if (MessageList->MessageID == MessageID) - -: 668: { - -: 669: /* Stop the search - we found it */ - 6: 670: break; - -: 671: } - -: 672: - -: 673: /* Max of 8 links per design */ - 7: 674: MessageList = MessageList->Next; - -: 675: } - -: 676: - -: 677: /* Should be true - else wouldn't subscribe to MessageID */ - 7: 678: if (MessageList != (LC_MessageList_t *) NULL) - -: 679: { - -: 680: /* Get linked list of WP's that reference MessageID */ - 6: 681: WatchPtList = MessageList->WatchPtList; - -: 682: - -: 683: /* NULL when list is empty or end of list */ - 53: 684: while (WatchPtList != (LC_WatchPtList_t *) NULL) - -: 685: { - 41: 686: WatchPtFound = TRUE; - -: 687: - -: 688: /* Verify that WP packet offset is within actual packet */ - 41: 689: if (LC_WPOffsetValid(WatchPtList->WatchIndex, MessagePtr) == TRUE) - -: 690: { - 38: 691: LC_ProcessWP(WatchPtList->WatchIndex, MessagePtr, Timestamp); - -: 692: } - -: 693: - -: 694: /* No limit to how many WP's can reference one MessageID */ - 41: 695: WatchPtList = WatchPtList->Next; - -: 696: } - -: 697: } - -: 698: - -: 699: /* Performance Log (stop time counter) */ - 7: 700: CFE_ES_PerfLogExit(LC_WDT_SEARCH_PERF_ID); - -: 701: - 7: 702: if (WatchPtFound == TRUE) - -: 703: { - 6: 704: LC_AppData.MonitoredMsgCount++; - -: 705: } - -: 706: else - -: 707: { - -: 708: /* MessageID with no defined watchpoints */ - 1: 709: CFE_EVS_SendEvent(LC_MID_INF_EID, CFE_EVS_INFORMATION, - -: 710: "Msg with unreferenced message ID rcvd: ID = 0x%04X", MessageID); - -: 711: } - -: 712: } - -: 713: - -: 714: return; - -: 715: - -: 716:} /* end LC_CheckMsgForWPs */ - -: 717: - -: 718: - -: 719:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 720:/* */ - -: 721:/* Process a single watchpoint */ - -: 722:/* */ - -: 723:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 724:void LC_ProcessWP(uint16 WatchIndex, - -: 725: CFE_SB_MsgPtr_t MessagePtr, - -: 726: CFE_TIME_SysTime_t Timestamp) - 38: 727:{ - -: 728: uint8 *WPDataPtr; - -: 729: uint8 PreviousResult; - -: 730: uint8 WPEvalResult; - -: 731: uint32 SizedWPData; - -: 732: uint32 MaskedWPData; - -: 733: uint32 StaleCounter; - -: 734: boolean SizedDataValid; - -: 735: - -: 736: /* - -: 737: ** Setup the pointer and get the massaged data - -: 738: */ - 38: 739: WPDataPtr = ((uint8 *)MessagePtr) + - -: 740: LC_OperData.WDTPtr[WatchIndex].WatchpointOffset; - -: 741: - 38: 742: SizedDataValid = LC_GetSizedWPData(WatchIndex, - -: 743: WPDataPtr, - -: 744: &SizedWPData); - 38: 745: if (SizedDataValid == TRUE) - -: 746: { - -: 747: /* - -: 748: ** Get the last evalution result for this watchpoint - -: 749: */ - 38: 750: PreviousResult = LC_OperData.WRTPtr[WatchIndex].WatchResult; - -: 751: - -: 752: /* - -: 753: ** Apply the defined bitmask for this watchpoint and then - -: 754: ** call the mission defined custom function or do our own - -: 755: ** relational comparison. - -: 756: */ - 38: 757: MaskedWPData = SizedWPData & LC_OperData.WDTPtr[WatchIndex].BitMask; - -: 758: - 38: 759: if (LC_OperData.WDTPtr[WatchIndex].OperatorID == LC_OPER_CUSTOM) - -: 760: { - 1: 761: WPEvalResult = LC_CustomFunction(WatchIndex, - -: 762: MaskedWPData, - -: 763: MessagePtr, - -: 764: LC_OperData.WDTPtr[WatchIndex].CustomFuncArgument); - -: 765: } - -: 766: else - -: 767: { - 37: 768: WPEvalResult = LC_OperatorCompare(WatchIndex, MaskedWPData); - -: 769: } - -: 770: - -: 771: /* - -: 772: ** Update the watch result - -: 773: */ - 38: 774: LC_OperData.WRTPtr[WatchIndex].WatchResult = WPEvalResult; - -: 775: - -: 776: /* - -: 777: ** Update the watchpoint statistics based on the evaluation - -: 778: ** result - -: 779: */ - 38: 780: LC_OperData.WRTPtr[WatchIndex].EvaluationCount++; - -: 781: - 38: 782: if (WPEvalResult == LC_WATCH_TRUE) - -: 783: { - 15: 784: LC_OperData.WRTPtr[WatchIndex].CumulativeTrueCount++; - 15: 785: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount++; - 15: 786: StaleCounter = LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale; - 15: 787: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = StaleCounter; - -: 788: - 15: 789: if ((PreviousResult == LC_WATCH_FALSE) || - -: 790: (PreviousResult == LC_WATCH_STALE)) - -: 791: { - 11: 792: LC_OperData.WRTPtr[WatchIndex].FalseToTrueCount++; - -: 793: - 11: 794: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue - -: 795: .Value = MaskedWPData; - -: 796: - 11: 797: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue - -: 798: .Timestamp.Seconds = Timestamp.Seconds; - -: 799: - 11: 800: LC_OperData.WRTPtr[WatchIndex].LastFalseToTrue - -: 801: .Timestamp.Subseconds = Timestamp.Subseconds; - -: 802: } - -: 803: } - 23: 804: else if (WPEvalResult == LC_WATCH_FALSE) - -: 805: { - 20: 806: LC_OperData.WRTPtr[WatchIndex].ConsecutiveTrueCount = 0; - 20: 807: StaleCounter = LC_OperData.WDTPtr[WatchIndex].ResultAgeWhenStale; - 20: 808: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = StaleCounter; - -: 809: - 20: 810: if ((PreviousResult == LC_WATCH_TRUE) || - -: 811: (PreviousResult == LC_WATCH_STALE)) - -: 812: { - 3: 813: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse - -: 814: .Value = MaskedWPData; - -: 815: - 3: 816: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse - -: 817: .Timestamp.Seconds = Timestamp.Seconds; - -: 818: - 3: 819: LC_OperData.WRTPtr[WatchIndex].LastTrueToFalse - -: 820: .Timestamp.Subseconds = Timestamp.Subseconds; - -: 821: } - -: 822: } - -: 823: else - -: 824: { - -: 825: /* - -: 826: ** WPEvalResult is STALE or ERROR - -: 827: */ - 3: 828: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0; - -: 829: } - -: 830: - -: 831: } /* end SizedDataValid if */ - -: 832: - -: 833: return; - -: 834: - -: 835:} /* end LC_ProcessWP */ - -: 836: - -: 837:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 838:/* */ - -: 839:/* Perform a watchpoint relational comparison */ - -: 840:/* */ - -: 841:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 842:uint8 LC_OperatorCompare(uint16 WatchIndex, - -: 843: uint32 ProcessedWPData) - 38: 844:{ - -: 845: uint8 EvalResult; - -: 846: LC_MultiType_t WatchpointValue; - -: 847: LC_MultiType_t ComparisonValue; - -: 848: - 38: 849: WatchpointValue.Unsigned32 = ProcessedWPData; - 38: 850: ComparisonValue = LC_OperData.WDTPtr[WatchIndex].ComparisonValue; - -: 851: - -: 852: /* - -: 853: ** Handle the comparison appropriately depending on the data type - -: 854: ** Any endian difference was handled when the watchpoint - -: 855: ** data was extracted from the SB message - -: 856: */ - 38: 857: switch (LC_OperData.WDTPtr[WatchIndex].DataType) - -: 858: { - -: 859: /* - -: 860: ** Signed integer types will get sign extended - -: 861: */ - -: 862: case LC_DATA_BYTE: - 12: 863: EvalResult = LC_SignedCompare(WatchIndex, - -: 864: WatchpointValue.Signed8in32.Signed8, - -: 865: ComparisonValue.Signed8in32.Signed8); - 12: 866: break; - -: 867: - -: 868: case LC_DATA_WORD_BE: - -: 869: case LC_DATA_WORD_LE: - 4: 870: EvalResult = LC_SignedCompare(WatchIndex, - -: 871: WatchpointValue.Signed16in32.Signed16, - -: 872: ComparisonValue.Signed16in32.Signed16); - 4: 873: break; - -: 874: - -: 875: case LC_DATA_DWORD_BE: - -: 876: case LC_DATA_DWORD_LE: - 3: 877: EvalResult = LC_SignedCompare(WatchIndex, - -: 878: WatchpointValue.Signed32, - -: 879: ComparisonValue.Signed32); - 3: 880: break; - -: 881: - -: 882: /* - -: 883: ** Unsigned integer types will get zero extended - -: 884: */ - -: 885: case LC_DATA_UBYTE: - 6: 886: EvalResult = LC_UnsignedCompare(WatchIndex, - -: 887: WatchpointValue.Unsigned8in32.Unsigned8, - -: 888: ComparisonValue.Unsigned8in32.Unsigned8); - 6: 889: break; - -: 890: - -: 891: case LC_DATA_UWORD_BE: - -: 892: case LC_DATA_UWORD_LE: - 2: 893: EvalResult = LC_UnsignedCompare(WatchIndex, - -: 894: WatchpointValue.Unsigned16in32.Unsigned16, - -: 895: ComparisonValue.Unsigned16in32.Unsigned16); - 2: 896: break; - -: 897: - -: 898: case LC_DATA_UDWORD_BE: - -: 899: case LC_DATA_UDWORD_LE: - 3: 900: EvalResult = LC_UnsignedCompare(WatchIndex, - -: 901: WatchpointValue.Unsigned32, - -: 902: ComparisonValue.Unsigned32); - 3: 903: break; - -: 904: - -: 905: /* - -: 906: ** Floating point values are handled separately - -: 907: */ - -: 908: case LC_DATA_FLOAT_BE: - -: 909: case LC_DATA_FLOAT_LE: - 7: 910: EvalResult = LC_FloatCompare(WatchIndex, - -: 911: WatchpointValue, - -: 912: ComparisonValue); - 7: 913: break; - -: 914: - -: 915: default: - -: 916: /* - -: 917: ** This should have been caught before now, but we'll - -: 918: ** handle it just in case we ever get here. - -: 919: */ - 1: 920: CFE_EVS_SendEvent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, - -: 921: "WP has undefined data type: WP = %d, DataType = %d", - -: 922: WatchIndex, LC_OperData.WDTPtr[WatchIndex].DataType); - -: 923: - 1: 924: EvalResult = LC_WATCH_ERROR; - -: 925: break; - -: 926: } - -: 927: - 38: 928: return (EvalResult); - -: 929: - -: 930:} /* end LC_OperatorCompare */ - -: 931: - -: 932: - -: 933:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 934:/* */ - -: 935:/* Perform a watchpoint signed integer comparison */ - -: 936:/* */ - -: 937:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 938:uint8 LC_SignedCompare(uint16 WatchIndex, - -: 939: int32 WPValue, - -: 940: int32 CompareValue) - 19: 941:{ - -: 942: uint8 EvalResult; - -: 943: uint8 OperatorID; - -: 944: - 19: 945: OperatorID = LC_OperData.WDTPtr[WatchIndex].OperatorID; - -: 946: - 19: 947: switch (OperatorID) - -: 948: { - -: 949: case LC_OPER_LE: - 2: 950: EvalResult = (WPValue <= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 2: 951: break; - -: 952: - -: 953: case LC_OPER_LT: - 2: 954: EvalResult = (WPValue < CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 2: 955: break; - -: 956: - -: 957: case LC_OPER_EQ: - 5: 958: EvalResult = (WPValue == CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 5: 959: break; - -: 960: - -: 961: case LC_OPER_NE: - 5: 962: EvalResult = (WPValue != CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 5: 963: break; - -: 964: - -: 965: case LC_OPER_GT: - 2: 966: EvalResult = (WPValue > CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 2: 967: break; - -: 968: - -: 969: case LC_OPER_GE: - 2: 970: EvalResult = (WPValue >= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 2: 971: break; - -: 972: - -: 973: default: - -: 974: /* - -: 975: ** This should have been caught before now, but we'll - -: 976: ** handle it just in case we ever get here. - -: 977: */ - 1: 978: CFE_EVS_SendEvent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, - -: 979: "WP has invalid operator ID: WP = %d, OperID = %d", - -: 980: WatchIndex, OperatorID); - -: 981: - 1: 982: EvalResult = LC_WATCH_ERROR; - -: 983: break; - -: 984: } - -: 985: - 19: 986: return (EvalResult); - -: 987: - -: 988:} /* end LC_SignedCompare */ - -: 989: - -: 990:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 991:/* */ - -: 992:/* Perform a watchpoint unsigned integer comparison */ - -: 993:/* */ - -: 994:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 995:uint8 LC_UnsignedCompare(uint16 WatchIndex, - -: 996: uint32 WPValue, - -: 997: uint32 CompareValue) - 11: 998:{ - -: 999: uint8 EvalResult; - -: 1000: uint8 OperatorID; - -: 1001: - 11: 1002: OperatorID = LC_OperData.WDTPtr[WatchIndex].OperatorID; - -: 1003: - 11: 1004: switch (OperatorID) - -: 1005: { - -: 1006: case LC_OPER_LE: - 1: 1007: EvalResult = (WPValue <= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1008: break; - -: 1009: - -: 1010: case LC_OPER_LT: - 1: 1011: EvalResult = (WPValue < CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1012: break; - -: 1013: - -: 1014: case LC_OPER_EQ: - 3: 1015: EvalResult = (WPValue == CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 3: 1016: break; - -: 1017: - -: 1018: case LC_OPER_NE: - 3: 1019: EvalResult = (WPValue != CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 3: 1020: break; - -: 1021: - -: 1022: case LC_OPER_GT: - 1: 1023: EvalResult = (WPValue > CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1024: break; - -: 1025: - -: 1026: case LC_OPER_GE: - 1: 1027: EvalResult = (WPValue >= CompareValue) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1028: break; - -: 1029: - -: 1030: default: - -: 1031: /* - -: 1032: ** This should have been caught before now, but we'll - -: 1033: ** handle it just in case we ever get here. - -: 1034: */ - 1: 1035: CFE_EVS_SendEvent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, - -: 1036: "WP has invalid operator ID: WP = %d, OperID = %d", - -: 1037: WatchIndex, OperatorID); - -: 1038: - 1: 1039: EvalResult = LC_WATCH_ERROR; - -: 1040: break; - -: 1041: } - -: 1042: - 11: 1043: return (EvalResult); - -: 1044: - -: 1045:} /* end LC_UnsignedCompare */ - -: 1046: - -: 1047:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1048:/* */ - -: 1049:/* Perform a floating point number comparison */ - -: 1050:/* */ - -: 1051:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1052:uint8 LC_FloatCompare(uint16 WatchIndex, - -: 1053: LC_MultiType_t WPMultiType, - -: 1054: LC_MultiType_t CompareMultiType) - 8: 1055:{ - -: 1056: uint8 EvalResult; - -: 1057: uint8 OperatorID; - -: 1058: float WPFloat; - -: 1059: float CompareFloat; - -: 1060: float Diff; - -: 1061: - 8: 1062: OperatorID = LC_OperData.WDTPtr[WatchIndex].OperatorID; - -: 1063: - -: 1064: /* - -: 1065: ** Before we do any comparison, check the watchpoint value for - -: 1066: ** a floating point NAN (not-a-number). NAN comparisons don't - -: 1067: ** work and can generate floating point exceptions. By contrast - -: 1068: ** comparisons with infinite numbers will behave as they should - -: 1069: ** so we don't try to catch those (we would rather they generate - -: 1070: ** watchpoint violations). - -: 1071: ** - -: 1072: ** The comparison (threshold) value comes from the Watchpoint - -: 1073: ** Definition Table (WDT) and any weird values should get nailed - -: 1074: ** during table validation. - -: 1075: */ - 8: 1076: if (LC_Uint32IsNAN(WPMultiType.Unsigned32) == FALSE) - -: 1077: { - 7: 1078: WPFloat = WPMultiType.Float32; - 7: 1079: CompareFloat = CompareMultiType.Float32; - -: 1080: - 7: 1081: switch (OperatorID) - -: 1082: { - -: 1083: case LC_OPER_LE: - 1: 1084: EvalResult = (WPFloat <= CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1085: break; - -: 1086: - -: 1087: case LC_OPER_LT: - 1: 1088: EvalResult = (WPFloat < CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1089: break; - -: 1090: - -: 1091: case LC_OPER_EQ: - 1: 1092: Diff = (WPFloat > CompareFloat) ? (WPFloat - CompareFloat) : (CompareFloat - WPFloat); - 1: 1093: EvalResult = (Diff <= (float) LC_FLOAT_TOLERANCE) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1094: break; - -: 1095: - -: 1096: case LC_OPER_NE: - 1: 1097: Diff = (WPFloat > CompareFloat) ? (WPFloat - CompareFloat) : (CompareFloat - WPFloat); - 1: 1098: EvalResult = (Diff > (float) LC_FLOAT_TOLERANCE) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1099: break; - -: 1100: - -: 1101: case LC_OPER_GT: - 1: 1102: EvalResult = (WPFloat > CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1103: break; - -: 1104: - -: 1105: case LC_OPER_GE: - 1: 1106: EvalResult = (WPFloat >= CompareFloat) ? LC_WATCH_TRUE : LC_WATCH_FALSE; - 1: 1107: break; - -: 1108: - -: 1109: default: - -: 1110: /* - -: 1111: ** This should have been caught before now, but we'll - -: 1112: ** handle it just in case we ever get here. - -: 1113: */ - 1: 1114: CFE_EVS_SendEvent(LC_WP_OPERID_ERR_EID, CFE_EVS_ERROR, - -: 1115: "WP has invalid operator ID: WP = %d, OperID = %d", - -: 1116: WatchIndex, OperatorID); - -: 1117: - 1: 1118: EvalResult = LC_WATCH_ERROR; - -: 1119: break; - -: 1120: - -: 1121: } /* end of switch */ - -: 1122: - -: 1123: } /* end LC_WPIsNAN if */ - -: 1124: else - -: 1125: { - 1: 1126: CFE_EVS_SendEvent(LC_WP_NAN_ERR_EID, CFE_EVS_ERROR, - -: 1127: "WP data value is a float NAN: WP = %d, Value = 0x%08X", - -: 1128: WatchIndex, WPMultiType.Unsigned32); - -: 1129: - 1: 1130: EvalResult = LC_WATCH_ERROR; - -: 1131: } - -: 1132: - 8: 1133: return (EvalResult); - -: 1134: - -: 1135:} /* end LC_FloatCompare */ - -: 1136: - -: 1137:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1138:/* */ - -: 1139:/* Checks if a defined watchpoint offset will send us past the */ - -: 1140:/* end of the received message */ - -: 1141:/* */ - -: 1142:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1143:boolean LC_WPOffsetValid(uint16 WatchIndex, - -: 1144: CFE_SB_MsgPtr_t MessagePtr) - 41: 1145:{ - -: 1146: uint16 MsgLength; - -: 1147: uint32 Offset; - 41: 1148: uint32 NumOfDataBytes = 0; - 41: 1149: boolean OffsetValid = TRUE; - 41: 1150: CFE_SB_MsgId_t MessageID = 0; - -: 1151: - -: 1152: /* - -: 1153: ** Check the message length against the watchpoint - -: 1154: ** offset and data type to make sure we won't - -: 1155: ** try to read past it. - -: 1156: */ - 41: 1157: switch (LC_OperData.WDTPtr[WatchIndex].DataType) - -: 1158: { - -: 1159: case LC_DATA_BYTE: - -: 1160: case LC_DATA_UBYTE: - 20: 1161: NumOfDataBytes = sizeof (uint8); - 20: 1162: break; - -: 1163: - -: 1164: case LC_DATA_WORD_BE: - -: 1165: case LC_DATA_WORD_LE: - -: 1166: case LC_DATA_UWORD_BE: - -: 1167: case LC_DATA_UWORD_LE: - 6: 1168: NumOfDataBytes = sizeof (uint16); - 6: 1169: break; - -: 1170: - -: 1171: case LC_DATA_DWORD_BE: - -: 1172: case LC_DATA_DWORD_LE: - -: 1173: case LC_DATA_UDWORD_BE: - -: 1174: case LC_DATA_UDWORD_LE: - 7: 1175: NumOfDataBytes = sizeof (uint32); - 7: 1176: break; - -: 1177: - -: 1178: case LC_DATA_FLOAT_BE: - -: 1179: case LC_DATA_FLOAT_LE: - 7: 1180: NumOfDataBytes = sizeof (float); - 7: 1181: break; - -: 1182: - -: 1183: default: - -: 1184: /* - -: 1185: ** This should have been caught before now, but we'll - -: 1186: ** handle it just in case we ever get here. - -: 1187: */ - 1: 1188: CFE_EVS_SendEvent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, - -: 1189: "WP has undefined data type: WP = %d, DataType = %d", - -: 1190: WatchIndex, LC_OperData.WDTPtr[WatchIndex].DataType); - -: 1191: - 1: 1192: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; - 1: 1193: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0; - -: 1194: - 1: 1195: return (FALSE); - -: 1196: break; - -: 1197: - -: 1198: } /* end switch */ - -: 1199: - 40: 1200: MsgLength = CFE_SB_GetTotalMsgLength(MessagePtr); - -: 1201: - 40: 1202: Offset = LC_OperData.WDTPtr[WatchIndex].WatchpointOffset; - -: 1203: - 40: 1204: if ((Offset + NumOfDataBytes) > MsgLength) - -: 1205: { - 2: 1206: OffsetValid = FALSE; - -: 1207: - 2: 1208: MessageID = CFE_SB_GetMsgId(MessagePtr); - -: 1209: - 2: 1210: CFE_EVS_SendEvent(LC_WP_OFFSET_ERR_EID, CFE_EVS_ERROR, - -: 1211: "WP offset error: MID = %d, WP = %d, Offset = %d, DataSize = %d, MsgLen = %d", - -: 1212: MessageID, WatchIndex, Offset, NumOfDataBytes, MsgLength); - -: 1213: - 2: 1214: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; - 2: 1215: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0; - -: 1216: } - -: 1217: - 40: 1218: return (OffsetValid); - -: 1219: - -: 1220:} /* end LC_WPOffsetValid */ - -: 1221: - -: 1222:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1223:/* */ - -: 1224:/* Get sized watchpoint data */ - -: 1225:/* */ - -: 1226:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1227:boolean LC_GetSizedWPData(uint16 WatchIndex, - -: 1228: uint8 *WPDataPtr, - -: 1229: uint32 *SizedDataPtr) - 39: 1230:{ - 39: 1231: boolean Success = TRUE; - 39: 1232: uint32 uint32Data = 0; - 39: 1233: uint16 uint16Data = 0; - -: 1234: - 39: 1235: int32 int32Data = 0; - 39: 1236: int16 int16Data = 0; - 39: 1237: int8 int8Data = 0; - -: 1238: - -: 1239: uint8 *uint8Ptr; - 39: 1240: uint8 *RawBytePtr = WPDataPtr; - -: 1241: - -: 1242: /* - -: 1243: ** Use these OSAL compiler flags to figure out what - -: 1244: ** the target's byte order is that LC was compiled for. - -: 1245: ** We define these this way so if neither (or both) are - -: 1246: ** defined, we'll get a build error - -: 1247: */ - -: 1248:#ifdef _STRUCT_HIGH_BIT_FIRST_ - -: 1249: int32 OurByteOrder = LC_BIG_ENDIAN; - -: 1250:#endif - -: 1251: - -: 1252:#ifdef _STRUCT_LOW_BIT_FIRST_ - 39: 1253: int32 OurByteOrder = LC_LITTLE_ENDIAN; - -: 1254:#endif - -: 1255: - -: 1256: /* - -: 1257: ** Get the watchpoint data value (which may be on a misaligned - -: 1258: ** address boundary) and put it into an unsigned 32 properly - -: 1259: ** handling endian and sign extension issues - -: 1260: */ - 39: 1261: switch (LC_OperData.WDTPtr[WatchIndex].DataType) - -: 1262: { - -: 1263: case LC_DATA_BYTE: - 12: 1264: int8Data = (int8) RawBytePtr[0]; - 12: 1265: int32Data = (int32) int8Data; - 12: 1266: uint32Data = (uint32) int32Data; - 12: 1267: break; - -: 1268: - -: 1269: case LC_DATA_UBYTE: - 6: 1270: uint32Data = (uint32) RawBytePtr[0]; - 6: 1271: break; - -: 1272: - -: 1273: case LC_DATA_WORD_BE: - 2: 1274: uint8Ptr = (uint8 *) &int16Data; - 2: 1275: if (OurByteOrder == LC_BIG_ENDIAN) - -: 1276: { - #####: 1277: uint8Ptr[0] = RawBytePtr[0]; - #####: 1278: uint8Ptr[1] = RawBytePtr[1]; - -: 1279: } - -: 1280: else - -: 1281: { - 2: 1282: uint8Ptr[0] = RawBytePtr[1]; - 2: 1283: uint8Ptr[1] = RawBytePtr[0]; - -: 1284: } - 2: 1285: int32Data = (int32) int16Data; - 2: 1286: uint32Data = (uint32) int32Data; - 2: 1287: break; - -: 1288: - -: 1289: case LC_DATA_WORD_LE: - 2: 1290: uint8Ptr = (uint8 *) &int16Data; - 2: 1291: if (OurByteOrder == LC_LITTLE_ENDIAN) - -: 1292: { - 2: 1293: uint8Ptr[0] = RawBytePtr[0]; - 2: 1294: uint8Ptr[1] = RawBytePtr[1]; - -: 1295: } - -: 1296: else - -: 1297: { - #####: 1298: uint8Ptr[0] = RawBytePtr[1]; - #####: 1299: uint8Ptr[1] = RawBytePtr[0]; - -: 1300: } - 2: 1301: int32Data = (int32) int16Data; - 2: 1302: uint32Data = (uint32) int32Data; - 2: 1303: break; - -: 1304: - -: 1305: case LC_DATA_UWORD_BE: - 1: 1306: uint8Ptr = (uint8 *) &uint16Data; - 1: 1307: if (OurByteOrder == LC_BIG_ENDIAN) - -: 1308: { - #####: 1309: uint8Ptr[0] = RawBytePtr[0]; - #####: 1310: uint8Ptr[1] = RawBytePtr[1]; - -: 1311: } - -: 1312: else - -: 1313: { - 1: 1314: uint8Ptr[0] = RawBytePtr[1]; - 1: 1315: uint8Ptr[1] = RawBytePtr[0]; - -: 1316: } - 1: 1317: uint32Data = (uint32) uint16Data; - 1: 1318: break; - -: 1319: - -: 1320: case LC_DATA_UWORD_LE: - 1: 1321: uint8Ptr = (uint8 *) &uint16Data; - 1: 1322: if (OurByteOrder == LC_LITTLE_ENDIAN) - -: 1323: { - 1: 1324: uint8Ptr[0] = RawBytePtr[0]; - 1: 1325: uint8Ptr[1] = RawBytePtr[1]; - -: 1326: } - -: 1327: else - -: 1328: { - #####: 1329: uint8Ptr[0] = RawBytePtr[1]; - #####: 1330: uint8Ptr[1] = RawBytePtr[0]; - -: 1331: } - 1: 1332: uint32Data = (uint32) uint16Data; - 1: 1333: break; - -: 1334: - -: 1335: case LC_DATA_DWORD_BE: - -: 1336: case LC_DATA_UDWORD_BE: - -: 1337: case LC_DATA_FLOAT_BE: - 12: 1338: uint8Ptr = (uint8 *) &uint32Data; - 12: 1339: if (OurByteOrder == LC_BIG_ENDIAN) - -: 1340: { - #####: 1341: uint8Ptr[0] = RawBytePtr[0]; - #####: 1342: uint8Ptr[1] = RawBytePtr[1]; - #####: 1343: uint8Ptr[2] = RawBytePtr[2]; - #####: 1344: uint8Ptr[3] = RawBytePtr[3]; - -: 1345: } - -: 1346: else - -: 1347: { - 12: 1348: uint8Ptr[0] = RawBytePtr[3]; - 12: 1349: uint8Ptr[1] = RawBytePtr[2]; - 12: 1350: uint8Ptr[2] = RawBytePtr[1]; - 12: 1351: uint8Ptr[3] = RawBytePtr[0]; - -: 1352: } - 12: 1353: break; - -: 1354: - -: 1355: case LC_DATA_DWORD_LE: - -: 1356: case LC_DATA_UDWORD_LE: - -: 1357: case LC_DATA_FLOAT_LE: - 2: 1358: uint8Ptr = (uint8 *) &uint32Data; - 2: 1359: if (OurByteOrder == LC_LITTLE_ENDIAN) - -: 1360: { - 2: 1361: uint8Ptr[0] = RawBytePtr[0]; - 2: 1362: uint8Ptr[1] = RawBytePtr[1]; - 2: 1363: uint8Ptr[2] = RawBytePtr[2]; - 2: 1364: uint8Ptr[3] = RawBytePtr[3]; - -: 1365: } - -: 1366: else - -: 1367: { - #####: 1368: uint8Ptr[0] = RawBytePtr[3]; - #####: 1369: uint8Ptr[1] = RawBytePtr[2]; - #####: 1370: uint8Ptr[2] = RawBytePtr[1]; - #####: 1371: uint8Ptr[3] = RawBytePtr[0]; - -: 1372: } - 2: 1373: break; - -: 1374: - -: 1375: default: - -: 1376: /* - -: 1377: ** This should have been caught before now, but we'll - -: 1378: ** handle it just in case we ever get here. - -: 1379: */ - 1: 1380: CFE_EVS_SendEvent(LC_WP_DATATYPE_ERR_EID, CFE_EVS_ERROR, - -: 1381: "WP has undefined data type: WP = %d, DataType = %d", - -: 1382: WatchIndex, LC_OperData.WDTPtr[WatchIndex].DataType); - -: 1383: - 1: 1384: LC_OperData.WRTPtr[WatchIndex].WatchResult = LC_WATCH_ERROR; - 1: 1385: LC_OperData.WRTPtr[WatchIndex].CountdownToStale = 0; - -: 1386: - 1: 1387: Success = FALSE; - -: 1388: break; - -: 1389: - -: 1390: } /* end switch */ - -: 1391: - -: 1392: /* - -: 1393: ** Set result value - -: 1394: */ - 39: 1395: *SizedDataPtr = uint32Data; - -: 1396: - -: 1397: /* - -: 1398: ** Return success flag - -: 1399: */ - 39: 1400: return (Success); - -: 1401: - -: 1402:} /* end LC_GetSizedWPData */ - -: 1403: - -: 1404:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1405:/* */ - -: 1406:/* Validate the watchpoint definition table (WDT) */ - -: 1407:/* */ - -: 1408:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1409:int32 LC_ValidateWDT(void *TableData) - 7: 1410:{ - 7: 1411: LC_WDTEntry_t *TableArray = (LC_WDTEntry_t *) TableData; - -: 1412: - 7: 1413: int32 EntryResult = LC_WDTVAL_NO_ERR; - 7: 1414: int32 TableResult = CFE_SUCCESS; - -: 1415: int32 TableIndex; - -: 1416: - -: 1417: uint8 DataType; - -: 1418: uint8 OperatorID; - -: 1419: uint16 MessageID; - -: 1420: uint32 CompareValue; - -: 1421: - 7: 1422: int32 GoodCount = 0; - 7: 1423: int32 BadCount = 0; - 7: 1424: int32 UnusedCount = 0; - -: 1425: - -: 1426: /* - -: 1427: ** Verify each entry in the pending watchpoint definition table - -: 1428: */ - 1239: 1429: for (TableIndex = 0; TableIndex < LC_MAX_WATCHPOINTS; TableIndex++ ) - -: 1430: { - 1232: 1431: DataType = TableArray[TableIndex].DataType; - 1232: 1432: OperatorID = TableArray[TableIndex].OperatorID; - 1232: 1433: MessageID = TableArray[TableIndex].MessageID; - 1232: 1434: CompareValue = TableArray[TableIndex].ComparisonValue.Unsigned32; - -: 1435: - 1232: 1436: if (DataType == LC_WATCH_NOT_USED) - -: 1437: { - -: 1438: /* - -: 1439: ** Unused table entry - -: 1440: */ - 1225: 1441: UnusedCount++; - -: 1442: } - 8: 1443: else if ((DataType != LC_DATA_BYTE) && - -: 1444: (DataType != LC_DATA_UBYTE) && - -: 1445: (DataType != LC_DATA_BYTE) && - -: 1446: (DataType != LC_DATA_UBYTE) && - -: 1447: (DataType != LC_DATA_WORD_BE) && - -: 1448: (DataType != LC_DATA_WORD_LE) && - -: 1449: (DataType != LC_DATA_UWORD_BE) && - -: 1450: (DataType != LC_DATA_UWORD_LE) && - -: 1451: (DataType != LC_DATA_DWORD_BE) && - -: 1452: (DataType != LC_DATA_DWORD_LE) && - -: 1453: (DataType != LC_DATA_UDWORD_BE) && - -: 1454: (DataType != LC_DATA_UDWORD_LE) && - -: 1455: (DataType != LC_DATA_FLOAT_BE) && - -: 1456: (DataType != LC_DATA_FLOAT_LE)) - -: 1457: { - -: 1458: /* - -: 1459: ** Invalid data type - -: 1460: */ - 1: 1461: BadCount++; - 1: 1462: EntryResult = LC_WDTVAL_ERR_DATATYPE; - -: 1463: } - 7: 1464: else if ((OperatorID != LC_OPER_LT) && - -: 1465: (OperatorID != LC_OPER_LT) && - -: 1466: (OperatorID != LC_OPER_LE) && - -: 1467: (OperatorID != LC_OPER_NE) && - -: 1468: (OperatorID != LC_OPER_EQ) && - -: 1469: (OperatorID != LC_OPER_GE) && - -: 1470: (OperatorID != LC_OPER_GT) && - -: 1471: (OperatorID != LC_OPER_CUSTOM)) - -: 1472: { - -: 1473: /* - -: 1474: ** Invalid operator - -: 1475: */ - 1: 1476: BadCount++; - 1: 1477: EntryResult = LC_WDTVAL_ERR_OPER; - -: 1478: } - 5: 1479: else if (MessageID > CFE_SB_HIGHEST_VALID_MSGID) - -: 1480: { - -: 1481: /* - -: 1482: ** Bad message ID (limit set by configuration parameter, - -: 1483: ** see cfe_platform_cfg.h) - -: 1484: */ - 1: 1485: BadCount++; - 1: 1486: EntryResult = LC_WDTVAL_ERR_MID; - -: 1487: } - 7: 1488: else if ((DataType == LC_DATA_FLOAT_BE) || - -: 1489: (DataType == LC_DATA_FLOAT_LE)) - -: 1490: { - -: 1491: /* - -: 1492: ** Check the floating point comparison value for - -: 1493: ** NAN (not-a-number) or infinite values - -: 1494: */ - 3: 1495: if (LC_Uint32IsNAN(CompareValue) == TRUE) - -: 1496: { - 1: 1497: BadCount++; - 1: 1498: EntryResult = LC_WDTVAL_ERR_FPNAN; - -: 1499: } - 2: 1500: else if (LC_Uint32IsInfinite(CompareValue) == TRUE) - -: 1501: { - 1: 1502: BadCount++; - 1: 1503: EntryResult = LC_WDTVAL_ERR_FPINF; - -: 1504: } - -: 1505: else - -: 1506: { - -: 1507: /* - -: 1508: ** We passed all checks for this floating point entry - -: 1509: */ - 1: 1510: GoodCount++; - -: 1511: } - -: 1512: } - -: 1513: else - -: 1514: { - -: 1515: /* - -: 1516: ** We passed all checks for this non-floating point entry - -: 1517: */ - 1: 1518: GoodCount++; - -: 1519: } - -: 1520: - -: 1521: /* - -: 1522: ** Generate detailed event for "first" error - -: 1523: */ - 1232: 1524: if ((EntryResult != LC_WDTVAL_NO_ERR) && (TableResult == CFE_SUCCESS)) - -: 1525: { - 7: 1526: if ((EntryResult == LC_WDTVAL_ERR_FPNAN) || - -: 1527: (EntryResult == LC_WDTVAL_ERR_FPINF)) - -: 1528: { - 2: 1529: CFE_EVS_SendEvent(LC_WDTVAL_FPERR_EID, CFE_EVS_ERROR, - -: 1530: "WDT verify float err: WP = %d, Err = %d, ComparisonValue = 0x%08X", - -: 1531: TableIndex, EntryResult, CompareValue); - -: 1532: } - -: 1533: else - -: 1534: { - 3: 1535: CFE_EVS_SendEvent(LC_WDTVAL_ERR_EID, CFE_EVS_ERROR, - -: 1536: "WDT verify err: WP = %d, Err = %d, DType = %d, Oper = %d, MID = %d", - -: 1537: TableIndex, EntryResult, DataType, OperatorID, MessageID); - -: 1538: } - -: 1539: - 5: 1540: TableResult = EntryResult; - -: 1541: } - -: 1542: - -: 1543: } /* end TableIndex for */ - -: 1544: - -: 1545: /* - -: 1546: ** Generate informational event with error totals - -: 1547: */ - 7: 1548: CFE_EVS_SendEvent(LC_WDTVAL_INF_EID, CFE_EVS_INFORMATION, - -: 1549: "WDT verify results: good = %d, bad = %d, unused = %d", - -: 1550: GoodCount, BadCount, UnusedCount); - -: 1551: - 7: 1552: return(TableResult); - -: 1553: - -: 1554:} /* end LC_ValidateWDT */ - -: 1555: - -: 1556:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1557:/* */ - -: 1558:/* Test if a 32 bit integer's value would be a floating point */ - -: 1559:/* NAN (not-a-number). Assumes IEEE-754 floating point format */ - -: 1560:/* */ - -: 1561:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1562:boolean LC_Uint32IsNAN(uint32 Data) - 11: 1563:{ - 11: 1564: boolean Result = FALSE; - -: 1565: uint32 Exponent; - -: 1566: uint32 Fraction; - -: 1567: - -: 1568: /* - -: 1569: ** Check if the exponent field is all 1's - -: 1570: */ - 11: 1571: Exponent = Data & 0x7F800000; - -: 1572: - 11: 1573: if (Exponent == 0x7F800000) - -: 1574: { - -: 1575: /* - -: 1576: ** If the fraction field is also non-zero, - -: 1577: ** it's a NAN - -: 1578: */ - 3: 1579: Fraction = Data & 0x007FFFFF; - -: 1580: - 3: 1581: if (Fraction > 0) - -: 1582: { - 2: 1583: Result = TRUE; - -: 1584: } - -: 1585: } - -: 1586: - 11: 1587: return (Result); - -: 1588: - -: 1589:} /* end LC_Uint32IsNAN */ - -: 1590: - -: 1591:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1592:/* */ - -: 1593:/* Test if a 32 bit integer's value would be an infinite */ - -: 1594:/* (positive or negative) floating point number. Assumes */ - -: 1595:/* IEEE-754 floating point format */ - -: 1596:/* */ - -: 1597:/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -: 1598:boolean LC_Uint32IsInfinite(uint32 Data) - 2: 1599:{ - 2: 1600: boolean Result = FALSE; - -: 1601: uint32 Exponent; - -: 1602: uint32 Fraction; - -: 1603: - -: 1604: /* - -: 1605: ** Check if the exponent field is all 1's - -: 1606: */ - 2: 1607: Exponent = Data & 0x7F800000; - -: 1608: - 2: 1609: if (Exponent == 0x7F800000) - -: 1610: { - -: 1611: /* - -: 1612: ** If the fraction field is also zero, - -: 1613: ** it's infinite - -: 1614: */ - 1: 1615: Fraction = Data & 0x007FFFFF; - -: 1616: - 1: 1617: if (Fraction == 0) - -: 1618: { - 1: 1619: Result = TRUE; - -: 1620: } - -: 1621: } - -: 1622: - 2: 1623: return (Result); - -: 1624: - -: 1625:} /* end LC_Uint32IsInfinite */ - -: 1626: - -: 1627: - -: 1628:/************************/ - -: 1629:/* End of File Comment */ - -: 1630:/************************/ diff --git a/test_and_ground/asist/prc/template/template_lcx_adt1.prc b/test_and_ground/asist/prc/template/template_lc_adt1.prc similarity index 90% rename from test_and_ground/asist/prc/template/template_lcx_adt1.prc rename to test_and_ground/asist/prc/template/template_lc_adt1.prc index a5a1f64..976b72d 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt1.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt1.prc @@ -1,404 +1,379 @@ -PROC $sc_$cpu_lcx_adt1 -;******************************************************************************* -; Test Name: lcx_adt1 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate ActionPoint Definition -; Table (ADT) 1 BVT. -; NOTE: the message ids used are borrowed from the other CFS applications -; (MM, FM, MD, and SCH). -; -; ADT1: Used by GenCmds, Monitoring, WithAction, Initialization procedures. -; Contains 12 APs, uses all event types and RPN operators; -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 9/27/12 W.Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" -LOCAL entry -LOCAL i -LOCAL appid -LOCAL RTS1 -LOCAL RTS2 -LOCAL RTS3 -LOCAL RTS4 -LOCAL RTS5 -LOCAL RTS6 -LOCAL RTS7 -LOCAL RTS8 -LOCAL RTS9 -LOCAL RTS10 -local LCAppName = LC_APP_NAME -local ADTTblName = LCAppName & ".LC_ADT" - -;; Set up the default values to be CPU1 -appid = 0xfb6 -;; Use the CPU2 Message IDs -RTS1 = 0x99d -RTS2 = 0x99e -RTS3 = 0x99f -RTS4 = 0x9a0 -RTS5 = 0x9a1 -RTS6 = 0x9a2 -RTS7 = 0x9a3 -RTS8 = 0x9a4 -RTS9 = 0x9a5 -RTS10 = 0x9a6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 - ;; Use the CPU3 Message IDs - RTS1 = 0xa9d - RTS2 = 0xa9e - RTS3 = 0xa9f - RTS4 = 0xaa0 - RTS5 = 0xaa1 - RTS6 = 0xaa2 - RTS7 = 0xaa3 - RTS8 = 0xaa4 - RTS9 = 0xaa5 - RTS10 = 0xaa6 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 - ;; Use the CPU1 Message IDs - RTS1 = 0x89d - RTS2 = 0x89e - RTS3 = 0x89f - RTS4 = 0x8a0 - RTS5 = 0x8a1 - RTS6 = 0x8a2 - RTS7 = 0x8a3 - RTS8 = 0x8a4 - RTS9 = 0x8a5 - RTS10 = 0x8a6 -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Action Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS1 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 12 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 -$SC_$CPU_LC_ADT[entry].EventText = "AP 0 Fired RTS" - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS2 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 21 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL - -for i = 6 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 -$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" - -; Entry 3 -entry = entry +1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS3 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 25 -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL - -for i = 9 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 -$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" - -; Entry 4 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS4 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 8 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 -$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS5 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL - -for i = 4 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 -$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS6 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 24 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL - -for i = 7 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 -$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS7 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 18 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL - -for i = 7 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 -$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS8 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL - -for i = 6 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 -$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" - -; Entry 9 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL - -for i = 6 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 -$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" - -; Entry 10 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS10 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 -$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" - -; Entry 11 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 -$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" - -; Entry 12 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS10 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 11 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL - -for i = 4 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 -$SC_$CPU_LC_ADT[entry].EventText = "AP 11 Fired RTS" - -;zero out the rest of the table -for entry=12 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED - $SC_$CPU_LC_ADT[entry].RTSId = 0 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 - for i = 1 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - $SC_$CPU_LC_ADT[entry].EventType= 0 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID - $SC_$CPU_LC_ADT[entry].EventText = " " -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADTTable1","lc_def_adt1.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt1 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt1 +;******************************************************************************* +; Test Name: lc_adt1 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate ActionPoint Definition +; Table (ADT) 1 BVT. +; NOTE: the message ids used are borrowed from the other CFS applications +; (MM, FM, MD, and SCH). +; +; ADT1: Used by GenCmds, Monitoring, WithAction, Initialization procedures. +; Contains 12 APs, uses all event types and RPN operators; +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 9/27/12 W. Moleski Initial release for LCX +; 5/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" +LOCAL entry +LOCAL i +LOCAL appid +LOCAL RTS1 +LOCAL RTS2 +LOCAL RTS3 +LOCAL RTS4 +LOCAL RTS5 +LOCAL RTS6 +LOCAL RTS7 +LOCAL RTS8 +LOCAL RTS9 +LOCAL RTS10 +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; Set up the default values to be CPU1 +appid = 0xfb6 +;; Use the CPU2 Message IDs +RTS1 = 0x99d +RTS2 = 0x99e +RTS3 = 0x99f +RTS4 = 0x9a0 +RTS5 = 0x9a1 +RTS6 = 0x9a2 +RTS7 = 0x9a3 +RTS8 = 0x9a4 +RTS9 = 0x9a5 +RTS10 = 0x9a6 + +write ";*********************************************************************" +write "; Step 1.0: Define Action Point Definition Table 1. " +write ";*********************************************************************" + +; Entry 1 +entry = 0 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS1 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 12 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 +$SC_$CPU_LC_ADT[entry].EventText = "AP 0 Fired RTS" + +; Entry 2 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS2 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 21 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL + +for i = 6 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 +$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" + +; Entry 3 +entry = entry +1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS3 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 25 +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL + +for i = 9 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 +$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" + +; Entry 4 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS4 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 8 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 +$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" + +; Entry 5 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS5 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL + +for i = 4 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 +$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS6 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 24 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL + +for i = 7 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 +$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS7 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 18 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL + +for i = 7 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 +$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS8 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL + +for i = 6 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 +$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" + +; Entry 9 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL + +for i = 6 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 +$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" + +; Entry 10 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS10 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 +$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" + +; Entry 11 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 +$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" + +; Entry 12 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS10 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 11 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL + +for i = 4 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 +$SC_$CPU_LC_ADT[entry].EventText = "AP 11 Fired RTS" + +;zero out the rest of the table +for entry=12 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED + $SC_$CPU_LC_ADT[entry].RTSId = 0 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 + for i = 1 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + $SC_$CPU_LC_ADT[entry].EventType= 0 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + $SC_$CPU_LC_ADT[entry].EventText = " " +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADTTable1","lc_def_adt1.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt1 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_adt1a.prc b/test_and_ground/asist/prc/template/template_lc_adt1a.prc similarity index 91% rename from test_and_ground/asist/prc/template/template_lcx_adt1a.prc rename to test_and_ground/asist/prc/template/template_lc_adt1a.prc index a038328..2be67c6 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt1a.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt1a.prc @@ -1,363 +1,339 @@ -PROC $sc_$cpu_lcx_adt1a -;******************************************************************************* -; Test Name: lcx_adt1a -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate ActionPoint Definition -; Table (ADT) 1 BVT. -; NOTE: The message ids used are borrowed from the other CFS applications -; (MM, FM, MD, and SCH). -; -; ADT1: Used by NoAction procedure. -; Contains 10 APs, uses all event types and RPN operators; -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 9/27/12 W.Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL i -LOCAL appid -LOCAL RTS1 -LOCAL RTS2 -LOCAL RTS3 -LOCAL RTS4 -LOCAL RTS5 -LOCAL RTS6 -LOCAL RTS7 -LOCAL RTS8 -LOCAL RTS9 -LOCAL RTS10 -local ADTTblName = LC_APP_NAME & ".LC_ADT" - -;; Default to use CPU1 values -appid = 0xfb6 -;; Use the CPU2 Message IDs -RTS1 = 0x99d -RTS2 = 0x99e -RTS3 = 0x99f -RTS4 = 0x9a0 -RTS5 = 0x9a1 -RTS6 = 0x9a2 -RTS7 = 0x9a3 -RTS8 = 0x9a4 -RTS9 = 0x9a5 -RTS10 = 0x9a6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 - ;; Use the CPU3 Message IDs - RTS1 = 0xa9d - RTS2 = 0xa9e - RTS3 = 0xa9f - RTS4 = 0xaa0 - RTS5 = 0xaa1 - RTS6 = 0xaa2 - RTS7 = 0xaa3 - RTS8 = 0xaa4 - RTS9 = 0xaa5 - RTS10 = 0xaa6 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 - ;; Use the CPU1 Message IDs - RTS1 = 0x89d - RTS2 = 0x89e - RTS3 = 0x89f - RTS4 = 0x8a0 - RTS5 = 0x8a1 - RTS6 = 0x8a2 - RTS7 = 0x8a3 - RTS8 = 0x8a4 - RTS9 = 0x8a5 - RTS10 = 0x8a6 -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Action Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS1 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 -$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS2 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 13 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 28 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 -$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" - -; Entry 3 -entry = entry +1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS3 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 15 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 14 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL - -for i = 7 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 -$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" - -; Entry 4 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS4 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 15 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 -$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS5 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 -$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS6 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 29 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 28 -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL - -for i = 8 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 -$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS7 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 16 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 -$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS8 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 16 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 17 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = 13 -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL - -for i = 9 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 -$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" - -; Entry 9 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 -$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" - -; Entry 10 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS10 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 22 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 23 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 24 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL - -for i = 8 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 -$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" - -;zero out the rest of the table -for entry=10 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED - $SC_$CPU_LC_ADT[entry].RTSId = 0 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 - for i = 1 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - $SC_$CPU_LC_ADT[entry].EventType= 0 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID - $SC_$CPU_LC_ADT[entry].EventText = " " -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADTTable1a","lc_def_adt1a.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt1a" -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt1a +;******************************************************************************* +; Test Name: lc_adt1a +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate ActionPoint Definition +; Table (ADT) 1 BVT. +; NOTE: The message ids used are borrowed from the other CFS applications +; (MM, FM, MD, and SCH). +; +; ADT1: Used by NoAction procedure. +; Contains 10 APs, uses all event types and RPN operators; +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 9/27/12 W.Moleski Initial release for LCX +; 5/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL i +LOCAL appid +LOCAL RTS1 +LOCAL RTS2 +LOCAL RTS3 +LOCAL RTS4 +LOCAL RTS5 +LOCAL RTS6 +LOCAL RTS7 +LOCAL RTS8 +LOCAL RTS9 +LOCAL RTS10 +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; Default to use CPU1 values +appid = 0xfb6 +;; Use the CPU2 Message IDs +RTS1 = 0x99d +RTS2 = 0x99e +RTS3 = 0x99f +RTS4 = 0x9a0 +RTS5 = 0x9a1 +RTS6 = 0x9a2 +RTS7 = 0x9a3 +RTS8 = 0x9a4 +RTS9 = 0x9a5 +RTS10 = 0x9a6 + +write ";*********************************************************************" +write "; Step 1.0: Define Action Point Definition Table 1. " +write ";*********************************************************************" + +; Entry 1 +entry = 0 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS1 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 +$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" + +; Entry 2 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS2 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 13 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 28 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 +$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" + +; Entry 3 +entry = entry +1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS3 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 15 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 14 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL + +for i = 7 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 +$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" + +; Entry 4 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS4 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 15 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 +$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" + +; Entry 5 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS5 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 +$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS6 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 29 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 28 +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL + +for i = 8 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 +$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS7 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 16 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 +$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS8 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 16 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 17 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = 13 +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL + +for i = 9 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 +$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" + +; Entry 9 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 +$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" + +; Entry 10 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS10 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 22 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 23 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 24 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL + +for i = 8 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 +$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" + +;zero out the rest of the table +for entry=10 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED + $SC_$CPU_LC_ADT[entry].RTSId = 0 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 + for i = 1 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + $SC_$CPU_LC_ADT[entry].EventType= 0 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + $SC_$CPU_LC_ADT[entry].EventText = " " +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADTTable1a","lc_def_adt1a.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt1a" +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_adt1b.prc b/test_and_ground/asist/prc/template/template_lc_adt1b.prc similarity index 91% rename from test_and_ground/asist/prc/template/template_lcx_adt1b.prc rename to test_and_ground/asist/prc/template/template_lc_adt1b.prc index 45fa30f..53a85f7 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt1b.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt1b.prc @@ -1,398 +1,374 @@ -PROC $sc_$cpu_lcx_adt1b -;******************************************************************************* -; Test Name: lcx_adt1b -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate the ActionPoint Definition -; Table (ADT) for the LC Monitoring test procedure. -; NOTE: the message ids used are borrowed from the other CFS applications -; (MM, FM, MD, and SCH). -; -; ADT1: Used by GenCmds, Monitoring, WithAction, Initialization procedures. -; Contains 12 APs, uses all event types and RPN operators; -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 09/27/12 W.Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL i -LOCAL appid -LOCAL RTS1 -LOCAL RTS2 -LOCAL RTS3 -LOCAL RTS4 -LOCAL RTS5 -LOCAL RTS6 -LOCAL RTS7 -LOCAL RTS8 -LOCAL RTS9 -LOCAL RTS10 -local ADTTblName = LC_APP_NAME & ".LC_ADT" - -;; Set up the default values to be CPU1 -appid = 0xfb6 -;; Use the CPU2 Message IDs -RTS1 = 0x99d -RTS2 = 0x99e -RTS3 = 0x99f -RTS4 = 0x9a0 -RTS5 = 0x9a1 -RTS6 = 0x9a2 -RTS7 = 0x9a3 -RTS8 = 0x9a4 -RTS9 = 0x9a5 -RTS10 = 0x9a6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 - ;; Use the CPU3 Message IDs - RTS1 = 0xa9d - RTS2 = 0xa9e - RTS3 = 0xa9f - RTS4 = 0xaa0 - RTS5 = 0xaa1 - RTS6 = 0xaa2 - RTS7 = 0xaa3 - RTS8 = 0xaa4 - RTS9 = 0xaa5 - RTS10 = 0xaa6 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 - ;; Use the CPU1 Message IDs - RTS1 = 0x89d - RTS2 = 0x89e - RTS3 = 0x89f - RTS4 = 0x8a0 - RTS5 = 0x8a1 - RTS6 = 0x8a2 - RTS7 = 0x8a3 - RTS8 = 0x8a4 - RTS9 = 0x8a5 - RTS10 = 0x8a6 -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Action Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS1 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 12 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 -$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS2 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 21 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 -$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" - -; Entry 3 -entry = entry +1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS3 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 25 -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL - -for i = 8 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 -$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" - -; Entry 4 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS4 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 8 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 -$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS5 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 -$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS6 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 24 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL - -for i = 7 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 -$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS7 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 18 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL - -for i = 7 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 -$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS8 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 -$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" - -; Entry 9 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 -$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" - -; Entry 10 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS10 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 -$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" - -; Entry 11 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 -$SC_$CPU_LC_ADT[entry].EventText = "AP 11 Fired RTS" - -; Entry 12 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS10 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 11 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 -$SC_$CPU_LC_ADT[entry].EventText = "AP 12 Fired RTS" - -;zero out the rest of the table -for entry=12 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED - $SC_$CPU_LC_ADT[entry].RTSId = 0 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 - for i = 1 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - $SC_$CPU_LC_ADT[entry].EventType= 0 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID - $SC_$CPU_LC_ADT[entry].EventText = " " -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADTTable1b","lc_def_adt1b.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt1 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt1b +;******************************************************************************* +; Test Name: lc_adt1b +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate the ActionPoint Definition +; Table (ADT) for the LC Monitoring test procedure. +; NOTE: the message ids used are borrowed from the other CFS applications +; (MM, FM, MD, and SCH). +; +; ADT1: Used by GenCmds, Monitoring, WithAction, Initialization procedures. +; Contains 12 APs, uses all event types and RPN operators; +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 09/27/12 W.Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL i +LOCAL appid +LOCAL RTS1 +LOCAL RTS2 +LOCAL RTS3 +LOCAL RTS4 +LOCAL RTS5 +LOCAL RTS6 +LOCAL RTS7 +LOCAL RTS8 +LOCAL RTS9 +LOCAL RTS10 +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; Set up the default values to be CPU1 +appid = 0xfb6 +;; Use the CPU2 Message IDs +RTS1 = 0x99d +RTS2 = 0x99e +RTS3 = 0x99f +RTS4 = 0x9a0 +RTS5 = 0x9a1 +RTS6 = 0x9a2 +RTS7 = 0x9a3 +RTS8 = 0x9a4 +RTS9 = 0x9a5 +RTS10 = 0x9a6 + +write ";*********************************************************************" +write "; Step 1.0: Define Action Point Definition Table 1. " +write ";*********************************************************************" + +; Entry 1 +entry = 0 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS1 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 12 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 +$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" + +; Entry 2 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS2 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 21 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 +$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" + +; Entry 3 +entry = entry +1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS3 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 25 +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL + +for i = 8 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 +$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" + +; Entry 4 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS4 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 8 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 +$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" + +; Entry 5 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS5 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 +$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS6 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 24 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL + +for i = 7 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 +$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS7 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 18 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL + +for i = 7 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 +$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS8 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 +$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" + +; Entry 9 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 +$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" + +; Entry 10 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS10 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 +$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" + +; Entry 11 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 +$SC_$CPU_LC_ADT[entry].EventText = "AP 11 Fired RTS" + +; Entry 12 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS10 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 11 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 +$SC_$CPU_LC_ADT[entry].EventText = "AP 12 Fired RTS" + +;zero out the rest of the table +for entry=12 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED + $SC_$CPU_LC_ADT[entry].RTSId = 0 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 + for i = 1 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + $SC_$CPU_LC_ADT[entry].EventType= 0 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + $SC_$CPU_LC_ADT[entry].EventText = " " +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADTTable1b","lc_def_adt1b.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt1 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_adt2.prc b/test_and_ground/asist/prc/template/template_lc_adt2.prc similarity index 94% rename from test_and_ground/asist/prc/template/template_lcx_adt2.prc rename to test_and_ground/asist/prc/template/template_lc_adt2.prc index 6452278..cf39562 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt2.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt2.prc @@ -1,322 +1,326 @@ -PROC $sc_$cpu_lcx_adt2 -;******************************************************************************* -; Test Name: lcx_adt2 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate the ActionPoint Definition -; Table (ADT). -; Note that the message ids used are borrowed from the other CFS -; applications (MM, FM, MD, and SCH). -; -; Adt2: Used by TableTesting and Initialization procedures. -; Contains 9 APs, uses all event types and RPN operators; -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 09/27/12 W.Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL i -LOCAL appid -LOCAL RTS1 -LOCAL RTS2 -LOCAL RTS3 -LOCAL RTS4 -LOCAL RTS5 -LOCAL RTS6 -LOCAL RTS7 -LOCAL RTS8 -LOCAL RTS9 -LOCAL RTS10 -local ADTTblName = LC_APP_NAME & ".LC_ADT" - -;; CPU1 is the default -appid = 0xfb6 -;; Use CPU3 IDs -RTS1 = 0xa9d -RTS2 = 0xaa0 -RTS3 = 0xaa7 -RTS4 = 0xa9e -RTS5 = 0xaa1 -RTS6 = 0xaa2 -RTS7 = 0xaa4 -RTS8 = 0xaa5 -RTS9 = 0xaa6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 - ;; Use CPU1 IDs - RTS1 = 0x89d - RTS2 = 0x8a0 - RTS3 = 0x8a7 - RTS4 = 0x89e - RTS5 = 0x8a1 - RTS6 = 0x8a2 - RTS7 = 0x8a4 - RTS8 = 0x8a5 - RTS9 = 0x8a6 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 - ;; Use CPU1 IDs - RTS1 = 0x99d - RTS2 = 0x9a0 - RTS3 = 0x9a7 - RTS4 = 0x99e - RTS5 = 0x9a1 - RTS6 = 0x9a2 - RTS7 = 0x9a4 - RTS8 = 0x9a5 - RTS9 = 0x9a6 -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Action Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS1 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 -$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS2 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 10 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 -$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" - -; Entry 3 -entry = entry +1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS3 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL -for i = 9 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 -$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" - -; Entry 4 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS4 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 29 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 -$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS5 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL -for i = 4 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 -$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS6 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 28 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 27 -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL -for i = 8 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 -$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS7 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 8 -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = 12 -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL -for i = 9 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 -$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS8 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 -$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" - -; Entry 9 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 22 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 23 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL -for i = 8 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 -$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" - -;zero out the rest of the table -for entry=9 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED - $SC_$CPU_LC_ADT[entry].RTSId = 0 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 - for i = 1 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - $SC_$CPU_LC_ADT[entry].EventType= 0 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID - $SC_$CPU_LC_ADT[entry].EventText = " " -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADTTable2","lc_def_adt2.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt2 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt2 +;******************************************************************************* +; Test Name: lc_adt2 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate the ActionPoint Definition +; Table (ADT). +; Note that the message ids used are borrowed from the other CFS +; applications (MM, FM, MD, and SCH). +; +; Adt2: Used by TableTesting and Initialization procedures. +; Contains 9 APs, uses all event types and RPN operators; +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 09/27/12 W.Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL i +LOCAL appid +LOCAL RTS1 +LOCAL RTS2 +LOCAL RTS3 +LOCAL RTS4 +LOCAL RTS5 +LOCAL RTS6 +LOCAL RTS7 +LOCAL RTS8 +LOCAL RTS9 +LOCAL RTS10 +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; CPU1 is the default +appid = 0xfb6 +;; Use CPU3 IDs +RTS1 = 0xa9d +RTS2 = 0xaa0 +RTS3 = 0xaa7 +RTS4 = 0xa9e +RTS5 = 0xaa1 +RTS6 = 0xaa2 +RTS7 = 0xaa4 +RTS8 = 0xaa5 +RTS9 = 0xaa6 + +if ("$CPU" = "CPU2") then + appid = 0xfd4 + ;; Use CPU1 IDs + RTS1 = 0x89d + RTS2 = 0x8a0 + RTS3 = 0x8a7 + RTS4 = 0x89e + RTS5 = 0x8a1 + RTS6 = 0x8a2 + RTS7 = 0x8a4 + RTS8 = 0x8a5 + RTS9 = 0x8a6 +elseif ("$CPU" = "CPU3") then + appid = 0xff4 + ;; Use CPU1 IDs + RTS1 = 0x99d + RTS2 = 0x9a0 + RTS3 = 0x9a7 + RTS4 = 0x99e + RTS5 = 0x9a1 + RTS6 = 0x9a2 + RTS7 = 0x9a4 + RTS8 = 0x9a5 + RTS9 = 0x9a6 +endif + +write ";*********************************************************************" +write "; Step 1.0: Define Action Point Definition Table 1. " +write ";*********************************************************************" + +; Entry 1 +entry = 0 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS1 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 +$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" + +; Entry 2 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS2 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 10 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 +$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" + +; Entry 3 +entry = entry +1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS3 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL +for i = 9 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 +$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" + +; Entry 4 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS4 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 29 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 +$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" + +; Entry 5 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS5 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL +for i = 4 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 +$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS6 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 28 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 27 +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL +for i = 8 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 +$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS7 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 8 +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = 12 +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL +for i = 9 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 +$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS8 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 +$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" + +; Entry 9 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 22 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 23 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL +for i = 8 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 +$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" + +;zero out the rest of the table +for entry=9 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED + $SC_$CPU_LC_ADT[entry].RTSId = 0 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 + for i = 1 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + $SC_$CPU_LC_ADT[entry].EventType= 0 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + $SC_$CPU_LC_ADT[entry].EventText = " " +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADTTable2","lc_def_adt2.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt2 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_adt2a.prc b/test_and_ground/asist/prc/template/template_lc_adt2a.prc similarity index 91% rename from test_and_ground/asist/prc/template/template_lcx_adt2a.prc rename to test_and_ground/asist/prc/template/template_lc_adt2a.prc index 392aab2..c54dc66 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt2a.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt2a.prc @@ -1,388 +1,360 @@ -PROC $sc_$cpu_lcx_adt2a -;******************************************************************************* -; Test Name: lcx_adt2a -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate the ActionPoint Definition -; Table (ADT). -; Note that the message ids used are borrowed from the other CFS -; applications (MM, FM, MD, and SCH). -; -; Adt2a: Used by TableTesting procedure. -; Contains 12 APs, uses all event types and RPN operators; -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 09/27/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL i -LOCAL appid -LOCAL RTS1 -LOCAL RTS2 -LOCAL RTS3 -LOCAL RTS4 -LOCAL RTS5 -LOCAL RTS6 -LOCAL RTS7 -LOCAL RTS8 -LOCAL RTS9 -LOCAL RTS10 -LOCAL RTS11 -LOCAL RTS12 -local ADTTblName = LC_APP_NAME & ".LC_ADT" - -;; CPU1 is the default -appid = 0xfb6 -;; Use CPU3 IDs -RTS1 = 0xa9d -RTS2 = 0xa9d -RTS3 = 0xaa7 -RTS4 = 0xaa0 -RTS5 = 0xa9e -RTS6 = 0xa9e -RTS7 = 0xaa1 -RTS8 = 0xaa2 -RTS9 = 0xaa3 -RTS10 = 0xaa5 -RTS11= 0xaa6 -RTS12= 0xaa6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 - ;; Use CPU1 IDs - RTS1 = 0x89d - RTS2 = 0x89d - RTS3 = 0x8a7 - RTS4 = 0x8a0 - RTS5 = 0x89e - RTS6 = 0x89e - RTS7 = 0x8a1 - RTS8 = 0x8a2 - RTS9 = 0x8a3 - RTS10 = 0x8a5 - RTS11= 0x8a6 - RTS12= 0x8a6 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 - ;; Use CPU2 IDs - RTS1 = 0x99d - RTS2 = 0x99d - RTS3 = 0x9a7 - RTS4 = 0x9a0 - RTS5 = 0x99e - RTS6 = 0x99e - RTS7 = 0x9a1 - RTS8 = 0x9a2 - RTS9 = 0x9a3 - RTS10 = 0x9a5 - RTS11= 0x9a6 - RTS12= 0x9a6 -endif - - -write ";*********************************************************************" -write "; Step 1.0: Define Action Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_ACTIVE -$SC_$CPU_LC_ADT[entry].RTSId = RTS1 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 28 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 -$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_ACTIVE -$SC_$CPU_LC_ADT[entry].RTSId = RTS2 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 -$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" - -; Entry 3 -entry = entry +1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS3 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 10 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 -$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" - -; Entry 4 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS4 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL -for i = 7 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId =LC_BASE_AP_EID + 3 -$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS5 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 29 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 -$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_PASSIVE -$SC_$CPU_LC_ADT[entry].RTSId = RTS6 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 30 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL -for i = 4 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 -$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS7 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL -for i = 4 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 -$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS8 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 28 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 27 -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL -for i = 8 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 -$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" - -; Entry 9 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 8 -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = 12 -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL -for i = 9 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 -$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" - -; Entry 10 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS10 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 20 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 -$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" - -; Entry 11 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS11 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 22 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 23 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL -for i = 8 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 11 -$SC_$CPU_LC_ADT[entry].EventText = "AP 11 Fired RTS" - -; Entry 12 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_PASSIVE -$SC_$CPU_LC_ADT[entry].RTSId = RTS12 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 29 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 12 -$SC_$CPU_LC_ADT[entry].EventText = "AP 12 Fired RTS" - -;zero out the rest of the table -for entry=12 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED - $SC_$CPU_LC_ADT[entry].RTSId = 0 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 - for i = 1 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - $SC_$CPU_LC_ADT[entry].EventType= 0 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID - $SC_$CPU_LC_ADT[entry].EventText = " " -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADTTable2a","lc_def_adt2a.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt2a " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt2a +;******************************************************************************* +; Test Name: lc_adt2a +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate the ActionPoint Definition +; Table (ADT). +; Note that the message ids used are borrowed from the other CFS +; applications (MM, FM, MD, and SCH). +; +; Adt2a: Used by TableTesting procedure. +; Contains 12 APs, uses all event types and RPN operators; +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 09/27/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL i +LOCAL appid +LOCAL RTS1 +LOCAL RTS2 +LOCAL RTS3 +LOCAL RTS4 +LOCAL RTS5 +LOCAL RTS6 +LOCAL RTS7 +LOCAL RTS8 +LOCAL RTS9 +LOCAL RTS10 +LOCAL RTS11 +LOCAL RTS12 +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; CPU1 is the default +appid = 0xfb6 +;; Use CPU3 IDs +RTS1 = 0xa9d +RTS2 = 0xa9d +RTS3 = 0xaa7 +RTS4 = 0xaa0 +RTS5 = 0xa9e +RTS6 = 0xa9e +RTS7 = 0xaa1 +RTS8 = 0xaa2 +RTS9 = 0xaa3 +RTS10 = 0xaa5 +RTS11= 0xaa6 +RTS12= 0xaa6 + + +write ";*********************************************************************" +write "; Step 1.0: Define Action Point Definition Table 1. " +write ";*********************************************************************" + +; Entry 1 +entry = 0 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_ACTIVE +$SC_$CPU_LC_ADT[entry].RTSId = RTS1 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 28 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 +$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" + +; Entry 2 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_ACTIVE +$SC_$CPU_LC_ADT[entry].RTSId = RTS2 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 +$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" + +; Entry 3 +entry = entry +1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS3 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 10 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 +$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" + +; Entry 4 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS4 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL +for i = 7 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId =LC_BASE_AP_EID + 3 +$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" + +; Entry 5 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS5 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 29 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 +$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_PASSIVE +$SC_$CPU_LC_ADT[entry].RTSId = RTS6 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 30 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL +for i = 4 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 +$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS7 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL +for i = 4 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 +$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS8 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 28 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 27 +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL +for i = 8 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 +$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" + +; Entry 9 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 8 +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = 12 +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL +for i = 9 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 +$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" + +; Entry 10 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS10 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 20 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 +$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" + +; Entry 11 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS11 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 22 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 23 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL +for i = 8 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 11 +$SC_$CPU_LC_ADT[entry].EventText = "AP 11 Fired RTS" + +; Entry 12 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_PASSIVE +$SC_$CPU_LC_ADT[entry].RTSId = RTS12 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 29 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 12 +$SC_$CPU_LC_ADT[entry].EventText = "AP 12 Fired RTS" + +;zero out the rest of the table +for entry=12 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED + $SC_$CPU_LC_ADT[entry].RTSId = 0 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 + for i = 1 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + $SC_$CPU_LC_ADT[entry].EventType= 0 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + $SC_$CPU_LC_ADT[entry].EventText = " " +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADTTable2a","lc_def_adt2a.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt2a " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_adt3.prc b/test_and_ground/asist/prc/template/template_lc_adt3.prc similarity index 91% rename from test_and_ground/asist/prc/template/template_lcx_adt3.prc rename to test_and_ground/asist/prc/template/template_lc_adt3.prc index c838f08..df77484 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt3.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt3.prc @@ -1,343 +1,319 @@ -PROC $sc_$cpu_lcx_adt3 -;******************************************************************************* -; Test Name: lcx_adt3 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate the ActionPoint Definition -; Table (ADT). -; Note that the message ids used are borrowed from the other CFS -; applications (MM, FM, MD, and SCH). -; -; Adt3: Used by TableTesting and Initializaton procedure. -; Contains 10 APs, uses all event types and RPN operators, Table -; contains entries with errors; -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 09/27/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL i -LOCAL appid -LOCAL RTS1 -LOCAL RTS2 -LOCAL RTS3 -LOCAL RTS4 -LOCAL RTS5 -LOCAL RTS6 -LOCAL RTS7 -LOCAL RTS8 -LOCAL RTS9 -LOCAL RTS10 -local ADTTblName = LC_APP_NAME & ".LC_ADT" - -;; CPU1 is the default -appid = 0xfb6 -;; Use CPU3 RTS IDs -RTS1 = 0xa9d -RTS2 = 0xa9e -RTS3 = 0xa9f -RTS4 = 0xaa0 -RTS5 = 0xaa1 -RTS6 = 0xaa2 -RTS7 = 0xaa3 -RTS8 = 0xaa4 -RTS9 = 0xaa5 -RTS10 = 0xaa6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 - ;; Use CPU1 RTS IDs - RTS1 = 0x89d - RTS2 = 0x89e - RTS3 = 0x89f - RTS4 = 0x8a0 - RTS5 = 0x8a1 - RTS6 = 0x8a2 - RTS7 = 0x8a3 - RTS8 = 0x8a4 - RTS9 = 0x8a5 - RTS10 = 0x8a6 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 - ;; Use CPU2 RTS IDs - RTS1 = 0x99d - RTS2 = 0x99e - RTS3 = 0x99f - RTS4 = 0x9a0 - RTS5 = 0x9a1 - RTS6 = 0x9a2 - RTS7 = 0x9a3 - RTS8 = 0x9a4 - RTS9 = 0x9a5 - RTS10 = 0x9a6 -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Action Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_ADT[entry].DefaultState = 0 -$SC_$CPU_LC_ADT[entry].RTSId = RTS1 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 -$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = 5 -$SC_$CPU_LC_ADT[entry].RTSId = RTS2 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 29 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 -$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" - -; Entry 3 -entry = entry +1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS3 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL -for i = 7 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 -$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" - -; Entry 4 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS4 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 10 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 -$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS5 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL -for i = 4 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 0 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 -$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS6 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 28 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 27 -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL -for i = 8 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 5 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 -$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS7 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 15 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 -$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS8 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 7 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 8 -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = 12 -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL -for i = 9 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 -$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" - -; Entry 9 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 -$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" - -; Entry 10 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS10 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 22 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 23 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL -for i = 8 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo -$SC_$CPU_LC_ADT[entry].EventType =2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 -$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" - -;zero out the rest of the table -for entry=10 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED - $SC_$CPU_LC_ADT[entry].RTSId = 0 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 - for i = 1 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - $SC_$CPU_LC_ADT[entry].EventType= 0 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID - $SC_$CPU_LC_ADT[entry].EventText = " " -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADTTable3","lc_def_adt3.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt3 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt3 +;******************************************************************************* +; Test Name: lc_adt3 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate the ActionPoint Definition +; Table (ADT). +; Note that the message ids used are borrowed from the other CFS +; applications (MM, FM, MD, and SCH). +; +; Adt3: Used by TableTesting and Initializaton procedure. +; Contains 10 APs, uses all event types and RPN operators, Table +; contains entries with errors; +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 09/27/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL i +LOCAL appid +LOCAL RTS1 +LOCAL RTS2 +LOCAL RTS3 +LOCAL RTS4 +LOCAL RTS5 +LOCAL RTS6 +LOCAL RTS7 +LOCAL RTS8 +LOCAL RTS9 +LOCAL RTS10 +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; CPU1 is the default +appid = 0xfb6 +;; Use CPU3 RTS IDs +RTS1 = 0xa9d +RTS2 = 0xa9e +RTS3 = 0xa9f +RTS4 = 0xaa0 +RTS5 = 0xaa1 +RTS6 = 0xaa2 +RTS7 = 0xaa3 +RTS8 = 0xaa4 +RTS9 = 0xaa5 +RTS10 = 0xaa6 + +write ";*********************************************************************" +write "; Step 1.0: Define Action Point Definition Table 1. " +write ";*********************************************************************" + +; Entry 1 +entry = 0 +$SC_$CPU_LC_ADT[entry].DefaultState = 0 +$SC_$CPU_LC_ADT[entry].RTSId = RTS1 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 +$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" + +; Entry 2 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = 5 +$SC_$CPU_LC_ADT[entry].RTSId = RTS2 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 29 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 +$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" + +; Entry 3 +entry = entry +1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS3 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL +for i = 7 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 +$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" + +; Entry 4 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS4 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 10 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 +$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" + +; Entry 5 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS5 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 20 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL +for i = 4 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 0 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 +$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = LC_MAX_VALID_ADT_RTSID + 1 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 28 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 27 +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL +for i = 8 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 5 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 +$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS7 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 15 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 +$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS8 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 7 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 8 +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = 12 +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL +for i = 9 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 +$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" + +; Entry 9 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 +$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" + +; Entry 10 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS10 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 21 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 22 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 23 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_EQUAL +for i = 8 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo +$SC_$CPU_LC_ADT[entry].EventType =2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 +$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" + +;zero out the rest of the table +for entry=10 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED + $SC_$CPU_LC_ADT[entry].RTSId = 0 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 + for i = 1 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + $SC_$CPU_LC_ADT[entry].EventType= 0 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + $SC_$CPU_LC_ADT[entry].EventText = " " +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADTTable3","lc_def_adt3.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt3 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_adt4.prc b/test_and_ground/asist/prc/template/template_lc_adt4.prc similarity index 86% rename from test_and_ground/asist/prc/template/template_lcx_adt4.prc rename to test_and_ground/asist/prc/template/template_lc_adt4.prc index c9e8373..a64ac0b 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt4.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt4.prc @@ -1,107 +1,105 @@ -PROC $sc_$cpu_lcx_adt4 -;******************************************************************************* -; Test Name: lcx_adt4 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate an ActionPoint Definition -; Table (ADT) that contains the maximum number of APs and equations to -; make each AP fail. -; NOTE: the message ids used are borrowed from the other CFS applications -; (MM, FM, MD, and SCH). -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None -; -; Change History -; -; Date Name Description -; 09/27/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL i -LOCAL appid -local ADTTblName = LC_APP_NAME & ".LC_ADT" - -;; Set up the default values to be CPU1 -appid = 0xfb6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 -endif - -write ";*********************************************************************" -write "; Define the Action Point Definition Table. " -write ";*********************************************************************" - -; Entry 1 -for entry = 0 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED - $SC_$CPU_LC_ADT[entry].RTSId = 10 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 - $SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 - $SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - - for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - - $SC_$CPU_LC_ADT[entry].EventType = 2 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + entry - $SC_$CPU_LC_ADT[entry].EventText = "AP Fired RTS" -enddo - -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADTTable4","lc_def_adt4.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt4 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt4 +;******************************************************************************* +; Test Name: lc_adt4 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate an ActionPoint Definition +; Table (ADT) that contains the maximum number of APs and equations to +; make each AP fail. +; NOTE: the message ids used are borrowed from the other CFS applications +; (MM, FM, MD, and SCH). +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None +; +; Change History +; +; Date Name Description +; 09/27/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL i +LOCAL appid +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; Set up the default values to be CPU1 +appid = 0xfb6 + +write ";*********************************************************************" +write "; Define the Action Point Definition Table. " +write ";*********************************************************************" + +; Entry 1 +for entry = 0 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED + $SC_$CPU_LC_ADT[entry].RTSId = 10 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 + $SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 + $SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + + for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + + $SC_$CPU_LC_ADT[entry].EventType = 2 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + entry + $SC_$CPU_LC_ADT[entry].EventText = "AP Fired RTS" +enddo + +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADTTable4","lc_def_adt4.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt4 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_adt4a.prc b/test_and_ground/asist/prc/template/template_lc_adt4a.prc similarity index 87% rename from test_and_ground/asist/prc/template/template_lcx_adt4a.prc rename to test_and_ground/asist/prc/template/template_lc_adt4a.prc index 4942c32..99dadab 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt4a.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt4a.prc @@ -1,119 +1,117 @@ -PROC $sc_$cpu_lcx_adt4a -;******************************************************************************* -; Test Name: lcx_adt4a -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate an ActionPoint Definition -; Table (ADT) that contains a single AP that relies on a watchpoint that -; evaluates to LC_WATCH_ERROR. -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None -; -; Change History -; -; Date Name Description -; 09/27/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL i -LOCAL appid -local ADTTblName = LC_APP_NAME & ".LC_ADT" - -;; Set up the default values to be CPU1 -appid = 0xfb6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 -endif - -write ";*********************************************************************" -write "; Define the Action Point Definition Table. " -write ";*********************************************************************" - -; Entry 1 -$SC_$CPU_LC_ADT[0].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[0].RTSId = 10 -$SC_$CPU_LC_ADT[0].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[0].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[0].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[0].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[0].RPNEquation[1] = 0 -$SC_$CPU_LC_ADT[0].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[0].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[0].EventType = 2 -$SC_$CPU_LC_ADT[0].EventId = LC_BASE_AP_EID + entry -$SC_$CPU_LC_ADT[0].EventText = "AP Fired RTS" - -;; zero put the rest of the entries -for entry = 1 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED - $SC_$CPU_LC_ADT[entry].RTSId = 0 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 - - for i = 1 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - - $SC_$CPU_LC_ADT[entry].EventType = 0 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID - $SC_$CPU_LC_ADT[entry].EventText = " " -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADTTable4a","lc_def_adt4a.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt4a " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt4a +;******************************************************************************* +; Test Name: lc_adt4a +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate an ActionPoint Definition +; Table (ADT) that contains a single AP that relies on a watchpoint that +; evaluates to LC_WATCH_ERROR. +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None +; +; Change History +; +; Date Name Description +; 09/27/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL i +LOCAL appid +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; Set up the default values to be CPU1 +appid = 0xfb6 + +write ";*********************************************************************" +write "; Define the Action Point Definition Table. " +write ";*********************************************************************" + +; Entry 1 +$SC_$CPU_LC_ADT[0].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[0].RTSId = 10 +$SC_$CPU_LC_ADT[0].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[0].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[0].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[0].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[0].RPNEquation[1] = 0 +$SC_$CPU_LC_ADT[0].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[0].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[0].EventType = 2 +$SC_$CPU_LC_ADT[0].EventId = LC_BASE_AP_EID + entry +$SC_$CPU_LC_ADT[0].EventText = "AP Fired RTS" + +;; zero put the rest of the entries +for entry = 1 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED + $SC_$CPU_LC_ADT[entry].RTSId = 0 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 + + for i = 1 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + + $SC_$CPU_LC_ADT[entry].EventType = 0 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + $SC_$CPU_LC_ADT[entry].EventText = " " +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADTTable4a","lc_def_adt4a.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt4a " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_adt5.prc b/test_and_ground/asist/prc/template/template_lc_adt5.prc similarity index 91% rename from test_and_ground/asist/prc/template/template_lcx_adt5.prc rename to test_and_ground/asist/prc/template/template_lc_adt5.prc index 3442552..cc10944 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt5.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt5.prc @@ -1,405 +1,381 @@ -PROC $sc_$cpu_lcx_adt5 -;******************************************************************************* -; Test Name: lcx_adt5 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate ActionPoint Definition -; Table (ADT) 5 BVT. This ADT contains event counts for AP 5 & 6 that -; are to be exceeded in the event filtering test procedure. -; NOTE: the message ids used are borrowed from the other CFS applications -; (MM, FM, MD, and SCH). -; -; ADT5: Used by Event Filter procedure. -; Contains 12 APs, uses all event types and RPN operators; -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 09/27/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL i -LOCAL appid -LOCAL RTS1 -LOCAL RTS2 -LOCAL RTS3 -LOCAL RTS4 -LOCAL RTS5 -LOCAL RTS6 -LOCAL RTS7 -LOCAL RTS8 -LOCAL RTS9 -LOCAL RTS10 -local ADTTblName = LC_APP_NAME & ".LC_ADT" - -;; Set up the default values to be CPU1 -appid = 0xfb6 -;; Use the CPU2 Message IDs -RTS1 = 0x99d -RTS2 = 0x99e -RTS3 = 0x99f -RTS4 = 0x9a0 -RTS5 = 0x9a1 -RTS6 = 0x9a2 -RTS7 = 0x9a3 -RTS8 = 0x9a4 -RTS9 = 0x9a5 -RTS10 = 0x9a6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 - ;; Use the CPU3 Message IDs - RTS1 = 0xa9d - RTS2 = 0xa9e - RTS3 = 0xa9f - RTS4 = 0xaa0 - RTS5 = 0xaa1 - RTS6 = 0xaa2 - RTS7 = 0xaa3 - RTS8 = 0xaa4 - RTS9 = 0xaa5 - RTS10 = 0xaa6 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 - ;; Use the CPU1 Message IDs - RTS1 = 0x89d - RTS2 = 0x89e - RTS3 = 0x89f - RTS4 = 0x8a0 - RTS5 = 0x8a1 - RTS6 = 0x8a2 - RTS7 = 0x8a3 - RTS8 = 0x8a4 - RTS9 = 0x8a5 - RTS10 = 0x8a6 -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Action Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 (AP 0) -entry = 0 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS1 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 12 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 -$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" - -; Entry 2 (AP 1) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS2 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 21 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL - -for i = 6 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 -$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" - -; Entry 3 (AP 2) -entry = entry +1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS3 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 25 -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL - -for i = 9 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 -$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" - -; Entry 4 (AP 3) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS4 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 8 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 -$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" - -; Entry 5 (AP 4) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS5 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL - -for i = 4 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 -$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" - -; Entry 6 (AP 5) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS6 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 24 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL - -for i = 7 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 -$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" - -; Entry 7 (AP 6) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS7 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 18 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL - -for i = 7 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 -$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" - -; Entry 8 (AP 7) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS8 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL - -for i = 6 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 -$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" - -; Entry 9 (AP 8) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL - -for i = 6 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 -$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" - -; Entry 10 (AP 9) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS10 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL - -for i = 3 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 -$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" - -; Entry 11 (AP 10) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS9 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 11 -$SC_$CPU_LC_ADT[entry].EventText = "AP 11 Fired RTS" - -; Entry 12 (AP 11) -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS10 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 11 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL - -for i = 4 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 12 -$SC_$CPU_LC_ADT[entry].EventText = "AP 12 Fired RTS" - -;zero out the rest of the table -for entry=12 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED - $SC_$CPU_LC_ADT[entry].RTSId = 0 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 - for i = 1 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - $SC_$CPU_LC_ADT[entry].EventType= 0 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID - $SC_$CPU_LC_ADT[entry].EventText = " " -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADTTable1","lc_def_adt5.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt5 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt5 +;******************************************************************************* +; Test Name: lc_adt5 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate ActionPoint Definition +; Table (ADT) 5 BVT. This ADT contains event counts for AP 5 & 6 that +; are to be exceeded in the event filtering test procedure. +; NOTE: the message ids used are borrowed from the other CFS applications +; (MM, FM, MD, and SCH). +; +; ADT5: Used by Event Filter procedure. +; Contains 12 APs, uses all event types and RPN operators; +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 09/27/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL i +LOCAL appid +LOCAL RTS1 +LOCAL RTS2 +LOCAL RTS3 +LOCAL RTS4 +LOCAL RTS5 +LOCAL RTS6 +LOCAL RTS7 +LOCAL RTS8 +LOCAL RTS9 +LOCAL RTS10 +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; Set up the default values to be CPU1 +appid = 0xfb6 +;; Use the CPU2 Message IDs +RTS1 = 0x99d +RTS2 = 0x99e +RTS3 = 0x99f +RTS4 = 0x9a0 +RTS5 = 0x9a1 +RTS6 = 0x9a2 +RTS7 = 0x9a3 +RTS8 = 0x9a4 +RTS9 = 0x9a5 +RTS10 = 0x9a6 + +write ";*********************************************************************" +write "; Step 1.0: Define Action Point Definition Table 1. " +write ";*********************************************************************" + +; Entry 1 (AP 0) +entry = 0 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS1 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 12 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 +$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" + +; Entry 2 (AP 1) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS2 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 21 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL + +for i = 6 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 +$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" + +; Entry 3 (AP 2) +entry = entry +1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS3 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 9 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = 25 +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[7] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[8] = LC_RPN_EQUAL + +for i = 9 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 +$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" + +; Entry 4 (AP 3) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS4 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 8 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 +$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" + +; Entry 5 (AP 4) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS5 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL + +for i = 4 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 +$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" + +; Entry 6 (AP 5) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS6 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 24 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL + +for i = 7 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 +$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" + +; Entry 7 (AP 6) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS7 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 18 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[6] = LC_RPN_EQUAL + +for i = 7 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 +$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" + +; Entry 8 (AP 7) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS8 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL + +for i = 6 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 +$SC_$CPU_LC_ADT[entry].EventText = "AP 8 Fired RTS" + +; Entry 9 (AP 8) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[5] = LC_RPN_EQUAL + +for i = 6 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 9 +$SC_$CPU_LC_ADT[entry].EventText = "AP 9 Fired RTS" + +; Entry 10 (AP 9) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS10 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_EQUAL + +for i = 3 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 10 +$SC_$CPU_LC_ADT[entry].EventText = "AP 10 Fired RTS" + +; Entry 11 (AP 10) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS9 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 11 +$SC_$CPU_LC_ADT[entry].EventText = "AP 11 Fired RTS" + +; Entry 12 (AP 11) +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS10 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 11 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL + +for i = 4 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 12 +$SC_$CPU_LC_ADT[entry].EventText = "AP 12 Fired RTS" + +;zero out the rest of the table +for entry=12 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED + $SC_$CPU_LC_ADT[entry].RTSId = 0 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 + for i = 1 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + $SC_$CPU_LC_ADT[entry].EventType= 0 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + $SC_$CPU_LC_ADT[entry].EventText = " " +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADTTable1","lc_def_adt5.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt5 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_adt6.prc b/test_and_ground/asist/prc/template/template_lc_adt6.prc similarity index 88% rename from test_and_ground/asist/prc/template/template_lcx_adt6.prc rename to test_and_ground/asist/prc/template/template_lc_adt6.prc index cb62b2b..4ce1656 100644 --- a/test_and_ground/asist/prc/template/template_lcx_adt6.prc +++ b/test_and_ground/asist/prc/template/template_lc_adt6.prc @@ -1,310 +1,285 @@ -PROC $sc_$cpu_lcx_adt6 -;******************************************************************************* -; Test Name: lcx_adt6 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate ActionPoint Definition -; Table (ADT) 6 to be used for the LCx application to determine if the -; correct transitions are achieved when a Watch Point goes "stale". -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/14/12 W. Moleski Initial implementation for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" -LOCAL entry -LOCAL i -LOCAL appid -LOCAL RTS1 -LOCAL RTS2 -LOCAL RTS3 -LOCAL RTS4 -LOCAL RTS5 -LOCAL RTS6 -LOCAL RTS7 -LOCAL RTS8 -LOCAL RTS9 -LOCAL RTS10 -local LCAppName = LC_APP_NAME -local ADTTblName = LCAppName & ".LC_ADT" - -;; Set up the default values to be CPU1 -appid = 0xfb6 -;; Use the CPU2 Message IDs -RTS1 = 0x99d -RTS2 = 0x99e -RTS3 = 0x99f -RTS4 = 0x9a0 -RTS5 = 0x9a1 -RTS6 = 0x9a2 -RTS7 = 0x9a3 -RTS8 = 0x9a4 -RTS9 = 0x9a5 -RTS10 = 0x9a6 - -if ("$CPU" = "CPU2") then - appid = 0xfd4 - ;; Use the CPU3 Message IDs - RTS1 = 0xa9d - RTS2 = 0xa9e - RTS3 = 0xa9f - RTS4 = 0xaa0 - RTS5 = 0xaa1 - RTS6 = 0xaa2 - RTS7 = 0xaa3 - RTS8 = 0xaa4 - RTS9 = 0xaa5 - RTS10 = 0xaa6 -elseif ("$CPU" = "CPU3") then - appid = 0xff4 - ;; Use the CPU1 Message IDs - RTS1 = 0x89d - RTS2 = 0x89e - RTS3 = 0x89f - RTS4 = 0x8a0 - RTS5 = 0x8a1 - RTS6 = 0x8a2 - RTS7 = 0x8a3 - RTS8 = 0x8a4 - RTS9 = 0x8a5 - RTS10 = 0x8a6 -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Action Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS1 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 12 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 -$SC_$CPU_LC_ADT[entry].EventText = "AP 0 Fired RTS" - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS2 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 0 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 3 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 -$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" - -; Entry 3 -entry = entry +1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS3 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 -$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" - -; Entry 4 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS4 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 8 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 -$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS5 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 8 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL - -for i = 4 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType = 1 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 -$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS6 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 6 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 12 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 2 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 -$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS7 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 30 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 22 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 5 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 3 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 -$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED -$SC_$CPU_LC_ADT[entry].RTSId = RTS8 -$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 -$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 -$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 30 -$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 23 -$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR -$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL - -for i = 6 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 -enddo - -$SC_$CPU_LC_ADT[entry].EventType= 4 -$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 -$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" - -;zero out the rest of the table -for entry = 8 to LC_MAX_ACTIONPOINTS-1 do - $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED - $SC_$CPU_LC_ADT[entry].RTSId = 0 - $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 - $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 - for i = 1 to LC_MAX_RPN_EQU_SIZE do - $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 - enddo - $SC_$CPU_LC_ADT[entry].EventType= 0 - $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID - $SC_$CPU_LC_ADT[entry].EventText = " " -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_ADT[0]" -local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" - -s create_tbl_file_from_cvt("$CPU",appid,"ADT Stale Table","lc_def_adt6.tbl",ADTTblName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_adt6 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_adt6 +;******************************************************************************* +; Test Name: lc_adt6 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate ActionPoint Definition +; Table (ADT) 6 to be used for the LC application to determine if the +; correct transitions are achieved when a Watch Point goes "stale". +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/14/12 W. Moleski Initial implementation for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" +LOCAL entry +LOCAL i +LOCAL appid +LOCAL RTS1 +LOCAL RTS2 +LOCAL RTS3 +LOCAL RTS4 +LOCAL RTS5 +LOCAL RTS6 +LOCAL RTS7 +LOCAL RTS8 +LOCAL RTS9 +LOCAL RTS10 +local ADTTblName = LC_APP_NAME & ".LC_ADT" +local hostCPU = "$CPU" + +;; Set up the default values to be CPU1 +appid = 0xfb6 +;; Use the CPU2 Message IDs +RTS1 = 0x99d +RTS2 = 0x99e +RTS3 = 0x99f +RTS4 = 0x9a0 +RTS5 = 0x9a1 +RTS6 = 0x9a2 +RTS7 = 0x9a3 +RTS8 = 0x9a4 +RTS9 = 0x9a5 +RTS10 = 0x9a6 + +write ";*********************************************************************" +write "; Step 1.0: Define Action Point Definition Table 1. " +write ";*********************************************************************" + +; Entry 1 +entry = 0 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS1 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 1 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 12 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 19 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 1 +$SC_$CPU_LC_ADT[entry].EventText = "AP 0 Fired RTS" + +; Entry 2 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS2 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 3 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 0 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 3 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 2 +$SC_$CPU_LC_ADT[entry].EventText = "AP 1 Fired RTS" + +; Entry 3 +entry = entry +1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS3 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 3 +$SC_$CPU_LC_ADT[entry].EventText = "AP 2 Fired RTS" + +; Entry 4 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS4 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 2 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 2 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 1 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 8 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 4 +$SC_$CPU_LC_ADT[entry].EventText = "AP 3 Fired RTS" + +; Entry 5 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS5 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 4 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 4 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 8 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = LC_RPN_NOT +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_EQUAL + +for i = 4 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType = 1 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 5 +$SC_$CPU_LC_ADT[entry].EventText = "AP 4 Fired RTS" + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS6 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 6 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 6 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 12 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_XOR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 2 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 6 +$SC_$CPU_LC_ADT[entry].EventText = "AP 5 Fired RTS" + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS7 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 10 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 10 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 30 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 22 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_AND +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 5 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 3 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 7 +$SC_$CPU_LC_ADT[entry].EventText = "AP 6 Fired RTS" + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_ADT[entry].DefaultState = LC_APSTATE_DISABLED +$SC_$CPU_LC_ADT[entry].RTSId = RTS8 +$SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 5 +$SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 5 +$SC_$CPU_LC_ADT[entry].RPNEquation[1] = 30 +$SC_$CPU_LC_ADT[entry].RPNEquation[2] = 23 +$SC_$CPU_LC_ADT[entry].RPNEquation[3] = LC_RPN_OR +$SC_$CPU_LC_ADT[entry].RPNEquation[4] = LC_RPN_EQUAL + +for i = 6 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 +enddo + +$SC_$CPU_LC_ADT[entry].EventType= 4 +$SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + 8 +$SC_$CPU_LC_ADT[entry].EventText = "AP 7 Fired RTS" + +;zero out the rest of the table +for entry = 8 to LC_MAX_ACTIONPOINTS-1 do + $SC_$CPU_LC_ADT[entry].DefaultState = LC_ACTION_NOT_USED + $SC_$CPU_LC_ADT[entry].RTSId = 0 + $SC_$CPU_LC_ADT[entry].MaxPassiveEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxPassFailEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailPassEvents = 0 + $SC_$CPU_LC_ADT[entry].MaxFailsBefRTS = 0 + for i = 1 to LC_MAX_RPN_EQU_SIZE do + $SC_$CPU_LC_ADT[entry].RPNEquation[i] = 0 + enddo + $SC_$CPU_LC_ADT[entry].EventType= 0 + $SC_$CPU_LC_ADT[entry].EventId = LC_BASE_AP_EID + $SC_$CPU_LC_ADT[entry].EventText = " " +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local maxAPIndex = LC_MAX_ACTIONPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_ADT[0]" +local endMnemonic = "$SC_$CPU_LC_ADT[" & maxAPIndex & "]" + +s create_tbl_file_from_cvt(hostCPU,appid,"ADT Stale Table","lc_def_adt6.tbl",ADTTblName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_adt6 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_evtfilter.prc b/test_and_ground/asist/prc/template/template_lc_evtfilter.prc similarity index 68% rename from test_and_ground/asist/prc/template/template_lcx_evtfilter.prc rename to test_and_ground/asist/prc/template/template_lc_evtfilter.prc index f799a1b..62e330a 100644 --- a/test_and_ground/asist/prc/template/template_lcx_evtfilter.prc +++ b/test_and_ground/asist/prc/template/template_lc_evtfilter.prc @@ -1,1600 +1,1929 @@ -PROC $sc_$cpu_lcx_evtfilter -;******************************************************************************* -; Test Name: lcx_evtfilter -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker eXtended (LCX) -; application properly filters the Pass to Fail and Fail to Pass -; transition events when the table-defined maximum number of times has -; been reached for an ActionPoint. Several data runs are performed using -; AP 5, 6, and 9 to reach the filtered limit. The Expected Results section -; contains a grid detailing the expected results from each data run. -; -; Requirements Tested -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message -; LCX3001 Upon receipt of a Sample Request, LCX shall process the request -; specified actionpoints defined in the Actionpoint Definition -; Table (ADT) if the LCX Application State is one of the -; following: -; a) Active -; b) Passive -; LCX3001.2 If the equation result for an Actionpoint results in a Pass, LCX -; shall set the Number of Consecutive Fail values to zero -; LCX3002 For each table-defined Actionpoint, LCX shall store the results -; in the dump-only Actionpoint Results Table if the Actionpoint -; state is either: -; a) Active -; b) Passive -; LCX3002.1 If the Actionpoint equation results in a transition from PASS to -; FAIL, LCX shall issue an event message indicating the failure -; LCX3002.1.1 If the PASS to FAIL transition event message has been sent for -; the table-defined number of times, LCX shall apply the -; table-defined event message filter. -; LCX3002.2 If the Actionpoint equation results in a transition from FAIL to -; PASS, LCX shall issue an event message indicating that the -; actionpoint is now within limits -; LCX3002.2.1 If the FAIL to PASS transition event message has been sent for -; the table-defined number of times, LCX shall apply the -; table-defined event message filter. -; LCX3002.3 If the equation has yielded a Fail result for the table-defined -; consecutive number of times limit and the Actionpoint is -; currently Active, LCX shall: -; a) generate an event message -; b) send a command to start the table-defined RTS -; c) Increment the counter indicating Total count of commands -; sent to SC task to start an RTS -; LCX3002.3.1 Once an RTS is initiated, LCX shall change the current state of -; the associated Actionpoint to Passive. -; LCX3002.4 If the equation has yielded a Fail result for the defined -; consecutive number of times and the Actionpoint is currently -; Passive, LCX shall -; a) generate an event message indicating that the Actionpoint -; Failed but the action was not taken -; b) Increment the counter indicating Number of Start RTS -; commands NOT sent to SC task because LCX Application is -; PASSIVE -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample(Pass,Fail,Error,or Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LCX Application to Active -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; tlm) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LCX State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result =Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; The LCX application utilizes the command and telemetry mnemonics of LC -; not LCX. Therefore, changes may be required if one is switching from LC -; to LCX. -; -; Change History -; -; Date Name Description -; 09/27/12 Walt Moleski Original Procedure for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lcx_wdt1 Sets up the Watchpoint Definition table files for testing -; lcx_adt5 Sets up the Actionpoint Definition table files for testing -; -; Expected Test Results and Analysis -; The grid below shows the expected values in the ART table after each data -; run. There are only 4 defined data runs which have to be executed multiple -; times in order to test the event filtering per action point. Thus, the grid -; below shows the actual data run executed in sequence. - -; Data Psv Cons Cum RTS -; Run # AP# EID Result State F2P P2F RTS FC FC Ctr -; 5 None Pass Active 0 0 0 0 0 0 -; 1 6 None Fail Active 0 0 0 1 1 0 -; 9 1010 Fail Passiv 0 0 0 1 1 1 -; ------------------------------------------------------------- -; 5 58 Fail Active 0 1 0 1 1 0 -; 2 6 61 Pass Active 1 0 0 0 1 0 -; 9 60 Fail Passiv 0 0 1 2 2 1 -; ------------------------------------------------------------- -; 5 61 Pass Active 1 1 0 0 1 0 -; 3 6 58 Fail Active 1 1 0 1 2 0 -; 9 61 Pass Passiv 1 0 1 0 2 1 -; ------------------------------------------------------------- -; 5 58 Fail Active 1 2 0 1 2 0 -; 4 6 61 Pass Active 2 1 0 0 2 0 -; 9 None Pass Passiv 1 0 1 0 2 1 -; ------------------------------------------------------------- -; 5 61 Pass Active 2 2 0 0 2 0 -; 1 6 58 Fail Active 2 2 0 1 3 0 -; 9 58 Fail Passiv 1 1 2 1 3 1 -; ------------------------------------------------------------- -; 5 None Fail Active 2 3 0 1 3 0 -; 2 6 61 Pass Active 3 2 0 0 3 0 -; 9 None Fail Passiv 1 1 3 2 4 1 -; ------------------------------------------------------------- -; 5 None Pass Active 3 3 0 0 3 0 -; 3 6 58 Fail Active 3 3 0 1 4 0 -; 9 None Pass Passiv 2 1 3 0 4 1 -; ------------------------------------------------------------- -; 5 None Fail Active 3 4 0 1 4 0 -; 4 6 None Pass Active 4 3 0 0 4 0 -; 9 None Pass Passiv 2 1 3 0 4 1 -; ------------------------------------------------------------- -; 5 None Pass Active 4 4 0 0 4 0 -; 1 6 None Fail Active 4 4 0 1 5 0 -; 9 None Fail Passiv 2 2 4 1 5 1 -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "to_lab_events.h" -#include "lc_msgdefs.h" -#include "lc_platform_cfg.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1003 0 -#define LCX_3001 1 -#define LCX_30012 2 -#define LCX_3002 3 -#define LCX_30021 4 -#define LCX_300211 5 -#define LCX_30022 6 -#define LCX_300221 7 -#define LCX_30023 8 -#define LCX_300231 9 -#define LCX_30024 10 -#define LCX_3006 11 -#define LCX_4000 12 -#define LCX_8000 13 -#define LCX_9000 14 -#define LCX_9001 15 -#define LCX_9002 16 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -#define CMDFAIL 1 -#define CMDSUCCESS 2 - -global ut_req_array_size = 16 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1003","LCX_3001", ;; - "LCX_3001.2","LCX_3002","LCX_3002.1","LCX_3002.1.1","LCX_3002.2", ;; - "LCX_3002.2.1","LCX_3002.3","LCX_3002.3.1","LCX_3002.4","LCX_3006", ;; - "LCX_4000","LCX_8000","LCX_9000","LCX_9001","LCX_9002"] - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL stream1 -LOCAL WRTAppid -LOCAL ARTAppid -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL ADTentries = 12 -LOCAL WDTentries = 30 -LOCAL CmdStatus -LOCAL State -Local maxwp = LC_MAX_WATCHPOINTS - 1 -Local maxap = LC_MAX_ACTIONPOINTS - 1 -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local WRTTblName = LCAppName & ".LC_WRT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Create the WDT and ADT table loads used for testing and " -write "; upload them to the proper location. Also, display the LC pages." -write ";********************************************************************" -s $SC_$CPU_lcx_wdt1 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt5 - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt5.tbl", adtFileName, "$CPU", "P") - -;; Display the pages -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ADT -page $SC_$CPU_LC_WDT -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions." -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " -write "; initialized to zero (0). " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the SC HK packet ID and table AppIDs based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" -ARTAppid = "0FB8" -WRTAppid = "0FB9" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" - ARTAppid = "0FD6" - WRTAppid = "0FD7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" - ARTAppid = "0FF6" - WRTAppid = "0FF7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;first check the 10 APs that are being used -;;255 is because they are disabled and not measured - for apindex = 1 to 10 do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo -;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 11 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", WRTAppid) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001) - Watchpoint Results Table NOT initialized at startup. Index = ",index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" -else - write "<*> Passed (9001) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002) - Actionpoint Results Table NOT initialized at startup. Index = ",index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" -else - write "<*> Passed (9002) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" -endif - -write ";*********************************************************************" -write "; Step 2.0: Send packets to make APs 5 and 6 transition with each " -write "; data pass." -write ";*********************************************************************" -write "; Step 2.1: Set LC Application State to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2 Send packets for data run 1" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.2",1) - -write ";*********************************************************************" -write "; Step 2.3 Send Sample Request for APs 5,6 and 9." -write ";*********************************************************************" -local expectedEID = LC_BASE_AP_EID + 10 - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "INFO", 2 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.3) - Received RTS event message" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30023, "P" -else - write " Failed (3001;3002;3002.3) - Did not receive RTS event message." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30023, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 2) then - write "<*> Passed - Received the correct number of Sample events" -else - write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.4 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -;; Write out AP info -;; Note that LC internally stores AP starting at index 0. However, ASIST stores -;; arrays starting at 1. So, AP 5 = index 6 and AP 6 = index 7 -write " Action Point 5:" -write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount -write " " -write " Action Point 6:" -write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount -write " " -write " Action Point 9:" -write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount -write " " - -;; Set the ART table requirement to pass -ut_setrequirements LCX_3006, "P" - -;; Check if AP 9's state is Passive -if (p@$SC_$CPU_LC_ART[9].CurrentState = "Passive") then - write "<*> Passed (3002.3.1) - Action Point state set to passive after RTS execution" - ut_setrequirements LCX_300231, "P" -else - write " Failed (3002.3.1) - Action Point 9 state is not correct. Should have been 'Passive'." - ut_setrequirements LCX_300231, "F" -endif - -write ";*********************************************************************" -write "; Step 2.5 Send packets for data run 2" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.5",2) - -write ";*********************************************************************" -write "; Step 2.6 Send Sample Request for APs 5,6 and 9." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 3 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSIVE_FAIL_INF_EID, "INFO", 4 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30021, "P" -else - write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30021, "F" -endif - -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30022, "P" -else - write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30022, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[4].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.4) - Received AP Passive event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30024, "P" -else - write " Failed (3001;3002;3002.4) - Did not receive AP Passive event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30024, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 2) then - write "<*> Passed - Received the correct number of Sample events" -else - write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.7 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -;; Write out AP info -;; Note that LC internally stores AP starting at index 0. However, ASIST stores -;; arrays starting at 1. So, AP 5 = index 6 and AP 6 = index 7 -write " Action Point 5:" -write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount -write " " -write " Action Point 6:" -write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount -write " " -write " Action Point 9:" -write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount -write " " - -;; Test that the Consecutive Fail Counter for AP 6 has been set to zero (0) -if ($SC_$CPU_LC_ART[6].ConsecutiveFailCount = 0) then - write "<*> Passed (3001.2) - Consecutive Fail Count reset when result passed" - ut_setrequirements LCX_30012, "P" -else - write " Failed (3001.2) - Consecutive Fail Count was not reset to zero when the AP result passed." - ut_setrequirements LCX_30012, "F" -endif - -write ";*********************************************************************" -write "; Step 2.8 Send packets for data run 3" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.8",3) - -write ";*********************************************************************" -write "; Step 2.9 Send Sample Request for APs 5,6 and 9." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 3 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30022, "P" -else - write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30022, "F" -endif - -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30021, "P" -else - write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30021, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 2 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30022, "P" -else - write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30022, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 2) then - write "<*> Passed - Received the correct number of Sample events" -else - write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.10 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -;; Write out AP info -;; Note that LC internally stores AP starting at index 0. However, ASIST stores -;; arrays starting at 1. So, AP 5 = index 6, AP 6 = index 7, and AP 9 = 10 -write " Action Point 5:" -write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount -write " " -write " Action Point 6:" -write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount -write " " -write " Action Point 9:" -write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount -write " " - -write ";*********************************************************************" -write "; Step 2.11 Send packets for data run 4" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.11",4) - -write ";*********************************************************************" -write "; Step 2.12 Send Sample Request for APs 5,6 and 9." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 3 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30021, "P" -else - write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30021, "F" -endif - -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30022, "P" -else - write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30022, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -if ($SC_$CPU_find_event[1].num_found_messages = 2) then - write "<*> Passed - Received the correct number of Sample events" -else - write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.13 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -;; Write out AP info -;; Note that LC internally stores AP starting at index 0. However, ASIST stores -;; arrays starting at 1. So, AP 5 = index 6 and AP 6 = index 7 -write " Action Point 5:" -write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount -write " " -write " Action Point 6:" -write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount -write " " -write " Action Point 9:" -write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount -write " " - -write ";*********************************************************************" -write "; Step 2.14 Send packets for data run 1 a second time" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.14",1) - -write ";*********************************************************************" -write "; Step 2.15 Send Sample Request for APs 5,6 and 9." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 3 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30022, "P" -else - write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30022, "F" -endif - -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30021, "P" -else - write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30021, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 2 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30021, "P" -else - write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30021, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 2) then - write "<*> Passed - Received the correct number of Sample events" -else - write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.16 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -;; Write out AP info -;; Note that LC internally stores AP starting at index 0. However, ASIST stores -;; arrays starting at 1. So, AP 5 = index 6 and AP 6 = index 7 -write " Action Point 5:" -write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount -write " " -write " Action Point 6:" -write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount -write " " -write " Action Point 9:" -write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount -write " " - -write ";*********************************************************************" -write "; Step 2.17 Send packets for data run 2 a second time" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.17",2) - -write ";*********************************************************************" -write "; Step 2.18 Send Sample Request for APs 5,6 and 9." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 3 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Failure) THEN - write "<*> Passed (3001;3002;3002.1.1) - Did not receive Pass to Fail transition event because it was filtered." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_300211, "P" -else - write " Failed (3001;3002;3002.1.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300211, "F" -endif - -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30022, "P" -else - write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30022, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -if ($SC_$CPU_find_event[1].num_found_messages = 2) then - write "<*> Passed - Received the correct number of Sample events" -else - write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.19 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -;; Write out AP info -;; Note that LC internally stores AP starting at index 0. However, ASIST stores -;; arrays starting at 1. So, AP 5 = index 6 and AP 6 = index 7 -write " Action Point 5:" -write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount -write " " -write " Action Point 6:" -write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount -write " " -write " Action Point 9:" -write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount -write " " - -wait 5 - -write ";*********************************************************************" -write "; Step 2.20 Send packets for data run 3 a second time" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.20",3) - -write ";*********************************************************************" -write "; Step 2.21 Send Sample Request for APs 5,6 and 9." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 3 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Failure) THEN - if ($SC_$CPU_find_event[2].num_found_messages = 0) then - write "<*> Passed (3001;3002;3002.2.1) - Did not receive Fail to Pass transition event because it was filtered." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_300221, "P" - else - write " Failed (3001;3002;3002.2.1) - Number of events for Fail to Pass transition is not zero." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300221, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3001;3002;3002.2.1) - Received Fail to Pass transition event when it should have been filtered and not received." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300221, "F" -endif - -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30021, "P" -else - write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30021, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Failure) THEN - if ($SC_$CPU_find_event[2].num_found_messages = 0) then - write "<*> Passed (3001;3002;3002.2.1) - Did not receive Fail to Pass transition event because it was filtered." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_300221, "P" - else - write " Failed (3001;3002;3002.2.1) - Number of events for Fail to Pass transition is not zero." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300221, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3001;3002;3002.2.1) - Received Fail to Pass transition event when it should have been filtered and not received." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300221, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 2) then - write "<*> Passed - Received the correct number of Sample events" -else - write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.22 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -;; Write out AP info -;; Note that LC internally stores AP starting at index 0. However, ASIST stores -;; arrays starting at 1. So, AP 5 = index 6 and AP 6 = index 7 -write " Action Point 5:" -write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount -write " " -write " Action Point 6:" -write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount -write " " -write " Action Point 9:" -write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount -write " " - -wait 5 - -write ";*********************************************************************" -write "; Step 2.23 Send packets for data run 4 a second time" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.23",4) - -write ";*********************************************************************" -write "; Step 2.24 Send Sample Request for APs 5,6 and 9." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 3 - - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Failure) THEN - if ($SC_$CPU_find_event[2].num_found_messages = 0) then - write "<*> Passed (3002.1.1) - Did not receive Pass to Fail transition event because it was filtered." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_300211, "P" - else - write " Failed (3002.1.1) - Number of events for Pass to Fail transition is not zero." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300211, "F" - write "Event Message count = ",$SC_$CPU_find_event[2].num_found_messages - endif -else - write " Failed (3002.1.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300211, "F" -endif - -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Failure) THEN - if ($SC_$CPU_find_event[3].num_found_messages = 0) then - write "<*> Passed (3002.2.1) - Did not receive Fail to Pass transition event because it was filtered." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_300221, "P" - else - write " Failed (3002.2.1) - Number of events for Fail to Pass transition is not zero." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300221, "F" - write "Event Message count = ",$SC_$CPU_find_event[3].num_found_messages - endif -else - write " Failed (3002.2.1) - Received Fail to Pass transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300221, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -if ($SC_$CPU_find_event[1].num_found_messages = 2) then - write "<*> Passed - Received the correct number of Sample events" -else - write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.25 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -;; Write out AP info -;; Note that LC internally stores AP starting at index 0. However, ASIST stores -;; arrays starting at 1. So, AP 5 = index 6 and AP 6 = index 7 -write " Action Point 5:" -write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount -write " " -write " Action Point 6:" -write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount -write " " -write " Action Point 9:" -write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount -write " " - -wait 5 - -write ";*********************************************************************" -write "; Step 2.26 Send packets for data run 1 a third time" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.26",1) - -write ";*********************************************************************" -write "; Step 2.27 Send Sample Request for APs 5,6 and 9." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 3 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Failure) THEN - if ($SC_$CPU_find_event[2].num_found_messages = 0) then - write "<*> Passed (3001;3002;3002.2.1) - Did not receive Fail to Pass transition event because it was filtered." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_300221, "P" - else - write " Failed (3001;3002;3002.2.1) - Number of events for Fail to Pass transition is not zero." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300221, "F" - write "Event Message count = ",$SC_$CPU_find_event[2].num_found_messages - endif -else - write " Failed (3001;3002;3002.2.1) - Received Fail to Pass transition event" - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300221, "F" -endif - -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Failure) THEN - if ($SC_$CPU_find_event[3].num_found_messages = 0) then - write "<*> Passed (3001;3002;3002.1.1) - Did not receive Pass to Fail transition event because it was filtered." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_300211, "P" - else - write " Failed (3001;3002;3002.1.1) - Number of events for Pass to Fail transition is not zero." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300211, "F" - write "Event Message count = ",$SC_$CPU_find_event[3].num_found_messages - endif -else - write " Failed (3001;3002;3002.1.1) - Received Pass to Fail transition event." - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_300211, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -if ($SC_$CPU_find_event[1].num_found_messages = 2) then - write "<*> Passed - Received the correct number of Sample events" -else - write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.28 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -;; Write out AP info -;; Note that LC internally stores AP starting at index 0. However, ASIST stores -;; arrays starting at 1. So, AP 5 = index 6 and AP 6 = index 7 -write " Action Point 5:" -write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount -write " " -write " Action Point 6:" -write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount -write " " -write " Action Point 9:" -write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult -write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState -write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount -write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount -write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount -write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount -write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount -write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount -write " " - -wait 5 - -write ";*********************************************************************" -write "; Step 3.0: Clean-up" -write ";*********************************************************************" - -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_evtfilter" -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_evtfilter +;******************************************************************************* +; Test Name: lc_evtfilter +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) +; application properly filters the Pass to Fail and Fail to Pass +; transition events when the table-defined maximum number of times has +; been reached for an ActionPoint. Several data runs are performed using +; AP 5, 6, and 9 to reach the filtered limit. The Expected Results section +; contains a grid detailing the expected results from each data run. +; +; Requirements Tested +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message +; LC3001 Upon receipt of a Sample Request, LC shall process the request +; specified actionpoints defined in the Actionpoint Definition +; Table (ADT) if the LC Application State is one of the +; following: +; a) Active +; b) Passive +; LC3001.2 If the equation result for an Actionpoint results in a Pass, LC +; shall set the Number of Consecutive Fail values to zero +; LC3002 For each table-defined Actionpoint, LC shall store the results +; in the dump-only Actionpoint Results Table if the Actionpoint +; state is either: +; a) Active +; b) Passive +; LC3002.1 If the Actionpoint equation results in a transition from PASS to +; FAIL, LC shall issue an event message indicating the failure +; LC3002.1.1 If the PASS to FAIL transition event message has been sent for +; the table-defined number of times, LC shall apply the +; table-defined event message filter. +; LC3002.2 If the Actionpoint equation results in a transition from FAIL to +; PASS, LC shall issue an event message indicating that the +; actionpoint is now within limits +; LC3002.2.1 If the FAIL to PASS transition event message has been sent for +; the table-defined number of times, LC shall apply the +; table-defined event message filter. +; LC3002.3 If the equation has yielded a Fail result for the table-defined +; consecutive number of times limit and the Actionpoint is +; currently Active, LC shall: +; a) generate an event message +; b) send a command to start the table-defined RTS +; c) Increment the counter indicating Total count of commands +; sent to SC task to start an RTS +; LC3002.4 If the equation has yielded a Fail result for the defined +; consecutive number of times and the Actionpoint is currently +; Passive, LC shall +; a) generate an event message indicating that the Actionpoint +; Failed but the action was not taken +; b) Increment the counter indicating Number of Start RTS +; commands NOT sent to SC task because LC Application is +; PASSIVE +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample(Pass,Fail,Error,or Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; tlm) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result =Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 09/27/12 Walt Moleski Original Procedure for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files for testing +; lc_adt5 Sets up the Actionpoint Definition table files for testing +; +; Expected Test Results and Analysis +; The grid below shows the expected values in the ART table after each data +; run. There are only 4 defined data runs which have to be executed multiple +; times in order to test the event filtering per action point. Thus, the grid +; below shows the actual data run executed in sequence. + +; Data Psv Cons Cum RTS +; Run # AP# EID Result State F2P P2F RTS FC FC Ctr +; 5 None Pass Active 0 0 0 0 0 0 +; 1 6 None Fail Active 0 0 0 1 1 0 +; 9 1010 Fail Passiv 0 0 0 1 1 1 +; ------------------------------------------------------------- +; 5 58 Fail Active 0 1 0 1 1 0 +; 2 6 61 Pass Active 1 0 0 0 1 0 +; 9 60 Fail Passiv 0 0 1 2 2 1 +; ------------------------------------------------------------- +; 5 61 Pass Active 1 1 0 0 1 0 +; 3 6 58 Fail Active 1 1 0 1 2 0 +; 9 61 Pass Passiv 1 0 1 0 2 1 +; ------------------------------------------------------------- +; 5 58 Fail Active 1 2 0 1 2 0 +; 4 6 61 Pass Active 2 1 0 0 2 0 +; 9 None Pass Passiv 1 0 1 0 2 1 +; ------------------------------------------------------------- +; 5 61 Pass Active 2 2 0 0 2 0 +; 1 6 58 Fail Active 2 2 0 1 3 0 +; 9 58 Fail Passiv 1 1 2 1 3 1 +; ------------------------------------------------------------- +; 5 None Fail Active 2 3 0 1 3 0 +; 2 6 61 Pass Active 3 2 0 0 3 0 +; 9 None Fail Passiv 1 1 3 2 4 1 +; ------------------------------------------------------------- +; 5 None Pass Active 3 3 0 0 3 0 +; 3 6 58 Fail Active 3 3 0 1 4 0 +; 9 None Pass Passiv 2 1 3 0 4 1 +; ------------------------------------------------------------- +; 5 None Fail Active 3 4 0 1 4 0 +; 4 6 None Pass Active 4 3 0 0 4 0 +; 9 None Pass Passiv 2 1 3 0 4 1 +; ------------------------------------------------------------- +; 5 None Pass Active 4 4 0 0 4 0 +; 1 6 None Fail Active 4 4 0 1 5 0 +; 9 None Fail Passiv 2 2 4 1 5 1 +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "to_lab_events.h" +#include "lc_msgdefs.h" +#include "lc_platform_cfg.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_1003 0 +#define LC_3001 1 +#define LC_30012 2 +#define LC_3002 3 +#define LC_30021 4 +#define LC_300211 5 +#define LC_30022 6 +#define LC_300221 7 +#define LC_30023 8 +#define LC_300231 9 +#define LC_30024 10 +#define LC_3006 11 +#define LC_4000 12 +#define LC_8000 13 +#define LC_9000 14 +#define LC_9001 15 +#define LC_9002 16 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +#define CMDFAIL 1 +#define CMDSUCCESS 2 + +global ut_req_array_size = 16 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1003","LC_3001", ;; + "LC_3001.2","LC_3002","LC_3002.1","LC_3002.1.1","LC_3002.2", ;; + "LC_3002.2.1","LC_3002.3","LC_3002.3.1","LC_3002.4","LC_3006", ;; + "LC_4000","LC_8000","LC_9000","LC_9001","LC_9002"] + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL stream1 +LOCAL WRTAppid +LOCAL ARTAppid +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL ADTentries = 12 +LOCAL WDTentries = 30 +LOCAL CmdStatus +LOCAL State +Local maxwp = LC_MAX_WATCHPOINTS - 1 +Local maxap = LC_MAX_ACTIONPOINTS - 1 +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local WRTTblName = LCAppName & ".LC_WRT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Create the WDT and ADT table loads used for testing and " +write "; upload them to the proper location. Also, display the LC pages." +write ";********************************************************************" +s $SC_$CPU_lc_wdt1 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt5 + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt5.tbl", adtFileName, hostCPU, "P") + +;; Display the pages +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ADT +page $SC_$CPU_LC_WDT +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions." +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " +write "; initialized to zero (0). " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the SC HK packet ID and table AppIDs based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" +ARTAppid = "0FB8" +WRTAppid = "0FB9" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;first check the 10 APs that are being used +;;255 is because they are disabled and not measured + for apindex = 1 to 10 do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo +;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 11 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, WRTAppid) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001) - Watchpoint Results Table NOT initialized at startup. Index = ",index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" +else + write "<*> Passed (9001) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002) - Actionpoint Results Table NOT initialized at startup. Index = ",index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" +else + write "<*> Passed (9002) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" +endif + +write ";*********************************************************************" +write "; Step 2.0: Send packets to make APs 5 and 6 transition with each " +write "; data pass." +write ";*********************************************************************" +write "; Step 2.1: Set LC Application State to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2 Send packets for data run 1" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.2",1) + +write ";*********************************************************************" +write "; Step 2.3 Send Sample Request for APs 5,6 and 9." +write ";*********************************************************************" +local expectedEID = LC_BASE_AP_EID + 10 +local expectedPassRTSCnt = 1; +local ap5EvtCtr = 0 +local ap6EvtCtr = 0 +local ap9EvtCtr = 1 + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "INFO", 2 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.3) - Received RTS event message" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30023, "P" +else + write " Failed (3001;3002;3002.3) - Did not receive RTS event message." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30023, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 2) then + write "<*> Passed - Received the correct number of Sample events" +else + write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.4 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +;; Write out AP info +write " Action Point 5:" +write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[5].CumulativeMsgsSent +write " " +write " Action Point 6:" +write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[6].CumulativeMsgsSent +write " " +write " Action Point 9:" +write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[9].CumulativeMsgsSent +write " " + +;; Check the Cumulative Message Counters (3006.h) +if (p@$SC_$CPU_LC_ART[5].CumulativeMsgsSent = ap5EvtCtr) then + write "<*> Passed (3006.h) - AP 5 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 5 Cumulative Message Counter incorrect. Expected ",ap5EvtCtr," Got ",$SC_$CPU_LC_ART[5].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap5EvtCtr = $SC_$CPU_LC_ART[5].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[6].CumulativeMsgsSent = ap6EvtCtr) then + write "<*> Passed (3006.h) - AP 6 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 6 Cumulative Message Counter incorrect. Expected ",ap6EvtCtr," Got ",$SC_$CPU_LC_ART[6].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap6EvtCtr = $SC_$CPU_LC_ART[6].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[9].CumulativeMsgsSent = ap9EvtCtr) then + write "<*> Passed (3006.h) - AP 9 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 9 Cumulative Message Counter incorrect. Expected ",ap9EvtCtr," Got ",$SC_$CPU_LC_ART[9].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap9EvtCtr = $SC_$CPU_LC_ART[9].CumulativeMsgsSent +endif + +;; Check if AP 9's state is Passive +if (p@$SC_$CPU_LC_ART[9].CurrentState = "Passive") then + write "<*> Passed (3002.3.1) - Action Point state set to passive after RTS execution" + ut_setrequirements LC_300231, "P" +else + write " Failed (3002.3.1) - Action Point 9 state is not correct. Should have been 'Passive'." + ut_setrequirements LC_300231, "F" +endif + +write ";*********************************************************************" +write "; Step 2.5 Send packets for data run 2" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.5",2) + +write ";*********************************************************************" +write "; Step 2.6 Send Sample Request for APs 5,6 and 9." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 3 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSIVE_FAIL_INF_EID, "INFO", 4 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30021, "P" +else + write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30021, "F" +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30022, "P" +else + write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30022, "F" +endif + +;; The Global counter should increment when AP 9 is sampled +write " LC Passive RTS Count = ", $SC_$CPU_LC_PassRTSCnt + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[4].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.4) - Received AP Passive event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30024, "P" +else + write " Failed (3001;3002;3002.4) - Did not receive AP Passive event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30024, "F" +endif + +ut_tlmupdate $SC_$CPU_LC_PassRTSCnt + +;; Verify the counter incremented +write " LC Passive RTS Count = ", $SC_$CPU_LC_PassRTSCnt +if ($SC_$CPU_LC_PassRTSCnt = expectedPassRTSCnt) THEN + write "<*> Passed (3002.4) - Passive RTS Counter incremented correctly." + ut_setrequirements LC_30024, "P" +else + write " Failed (3002.4) - Passive RTS Counter did not increment as expected. Got ",$SC_$CPU_LC_PassRTSCnt,"; Expected ",expectedPassRTSCnt + ut_setrequirements LC_30024, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 2) then + write "<*> Passed - Received the correct number of Sample events" +else + write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.7 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +;; Increment the expected message counters +ap5EvtCtr = ap5EvtCtr + 1 +ap6EvtCtr = ap6EvtCtr + 1 +ap9EvtCtr = ap9EvtCtr + 1 + +;; Write out AP info +write " Action Point 5:" +write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[5].CumulativeMsgsSent +write " " +write " Action Point 6:" +write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[6].CumulativeMsgsSent +write " " +write " Action Point 9:" +write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[9].CumulativeMsgsSent +write " " + +;; Test that the Consecutive Fail Counter for AP 6 has been set to zero (0) +if ($SC_$CPU_LC_ART[6].ConsecutiveFailCount = 0) then + write "<*> Passed (3001.2) - Consecutive Fail Count reset when result passed" + ut_setrequirements LC_30012, "P" +else + write " Failed (3001.2) - Consecutive Fail Count was not reset to zero when the AP result passed." + ut_setrequirements LC_30012, "F" +endif + +;; Check the Cumulative Message Counters (3006.h) +if (p@$SC_$CPU_LC_ART[5].CumulativeMsgsSent = ap5EvtCtr) then + write "<*> Passed (3006.h) - AP 5 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 5 Cumulative Message Counter incorrect. Expected ",ap5EvtCtr," Got ",$SC_$CPU_LC_ART[5].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap5EvtCtr = $SC_$CPU_LC_ART[5].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[6].CumulativeMsgsSent = ap6EvtCtr) then + write "<*> Passed (3006.h) - AP 6 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 6 Cumulative Message Counter incorrect. Expected ",ap6EvtCtr," Got ",$SC_$CPU_LC_ART[6].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap6EvtCtr = $SC_$CPU_LC_ART[6].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[9].CumulativeMsgsSent = ap9EvtCtr) then + write "<*> Passed (3006.h) - AP 9 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 9 Cumulative Message Counter incorrect. Expected ",ap9EvtCtr," Got ",$SC_$CPU_LC_ART[9].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap9EvtCtr = $SC_$CPU_LC_ART[9].CumulativeMsgsSent +endif + +write ";*********************************************************************" +write "; Step 2.8 Send packets for data run 3" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.8",3) + +write ";*********************************************************************" +write "; Step 2.9 Send Sample Request for APs 5,6 and 9." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 3 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30022, "P" +else + write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30022, "F" +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30021, "P" +else + write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30021, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 2 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30022, "P" +else + write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30022, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 2) then + write "<*> Passed - Received the correct number of Sample events" +else + write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.10 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +;; Increment the expected message counters +ap5EvtCtr = ap5EvtCtr + 1 +ap6EvtCtr = ap6EvtCtr + 1 +ap9EvtCtr = ap9EvtCtr + 1 + +;; Write out AP info +write " Action Point 5:" +write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[5].CumulativeMsgsSent +write " " +write " Action Point 6:" +write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[6].CumulativeMsgsSent +write " " +write " Action Point 9:" +write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[9].CumulativeMsgsSent +write " " + +;; Check the Cumulative Message Counters (3006.h) +if (p@$SC_$CPU_LC_ART[5].CumulativeMsgsSent = ap5EvtCtr) then + write "<*> Passed (3006.h) - AP 5 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 5 Cumulative Message Counter incorrect. Expected ",ap5EvtCtr," Got ",$SC_$CPU_LC_ART[5].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap5EvtCtr = $SC_$CPU_LC_ART[5].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[6].CumulativeMsgsSent = ap6EvtCtr) then + write "<*> Passed (3006.h) - AP 6 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 6 Cumulative Message Counter incorrect. Expected ",ap6EvtCtr," Got ",$SC_$CPU_LC_ART[6].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap6EvtCtr = $SC_$CPU_LC_ART[6].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[9].CumulativeMsgsSent = ap9EvtCtr) then + write "<*> Passed (3006.h) - AP 9 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 9 Cumulative Message Counter incorrect. Expected ",ap9EvtCtr," Got ",$SC_$CPU_LC_ART[9].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap9EvtCtr = $SC_$CPU_LC_ART[9].CumulativeMsgsSent +endif + +write ";*********************************************************************" +write "; Step 2.11 Send packets for data run 4" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.11",4) + +write ";*********************************************************************" +write "; Step 2.12 Send Sample Request for APs 5,6 and 9." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 3 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30021, "P" +else + write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30021, "F" +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30022, "P" +else + write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30022, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +if ($SC_$CPU_find_event[1].num_found_messages = 2) then + write "<*> Passed - Received the correct number of Sample events" +else + write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.13 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +;; Increment the expected message counters +ap5EvtCtr = ap5EvtCtr + 1 +ap6EvtCtr = ap6EvtCtr + 1 +;;ap9EvtCtr = ap9EvtCtr + 1 + +;; Write out AP info +write " Action Point 5:" +write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[5].CumulativeMsgsSent +write " " +write " Action Point 6:" +write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[6].CumulativeMsgsSent +write " " +write " Action Point 9:" +write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[9].CumulativeMsgsSent +write " " + +;; Check the Cumulative Message Counters (3006.h) +if (p@$SC_$CPU_LC_ART[5].CumulativeMsgsSent = ap5EvtCtr) then + write "<*> Passed (3006.h) - AP 5 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 5 Cumulative Message Counter incorrect. Expected ",ap5EvtCtr," Got ",$SC_$CPU_LC_ART[5].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap5EvtCtr = $SC_$CPU_LC_ART[5].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[6].CumulativeMsgsSent = ap6EvtCtr) then + write "<*> Passed (3006.h) - AP 6 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 6 Cumulative Message Counter incorrect. Expected ",ap6EvtCtr," Got ",$SC_$CPU_LC_ART[6].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap6EvtCtr = $SC_$CPU_LC_ART[6].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[9].CumulativeMsgsSent = ap9EvtCtr) then + write "<*> Passed (3006.h) - AP 9 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 9 Cumulative Message Counter incorrect. Expected ",ap9EvtCtr," Got ",$SC_$CPU_LC_ART[9].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap9EvtCtr = $SC_$CPU_LC_ART[9].CumulativeMsgsSent +endif + +write ";*********************************************************************" +write "; Step 2.14 Send packets for data run 1 a second time" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.14",1) + +write ";*********************************************************************" +write "; Step 2.15 Send Sample Request for APs 5,6 and 9." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 3 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30022, "P" +else + write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30022, "F" +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30021, "P" +else + write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30021, "F" +endif + +;; Verify the global counter increments +expectedPassRTSCnt = $SC_$CPU_LC_PassRTSCnt + 1 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 2 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30021, "P" +else + write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30021, "F" +endif + +ut_tlmupdate $SC_$CPU_LC_PassRTSCnt + +;; Verify the counter incremented +write " LC Passive RTS Count = ", $SC_$CPU_LC_PassRTSCnt +if ($SC_$CPU_LC_PassRTSCnt = expectedPassRTSCnt) THEN + write "<*> Passed (3002.4) - Passive RTS Counter incremented correctly." + ut_setrequirements LC_30024, "P" +else + write " Failed (3002.4) - Passive RTS Counter did not increment as expected. Got ",$SC_$CPU_LC_PassRTSCnt,"; Expected ",expectedPassRTSCnt + ut_setrequirements LC_30024, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 2) then + write "<*> Passed - Received the correct number of Sample events" +else + write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.16 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +;; Increment the expected message counters +ap5EvtCtr = ap5EvtCtr + 1 +ap6EvtCtr = ap6EvtCtr + 1 +ap9EvtCtr = ap9EvtCtr + 1 + +;; Write out AP info +write " Action Point 5:" +write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[5].CumulativeMsgsSent +write " " +write " Action Point 6:" +write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[6].CumulativeMsgsSent +write " " +write " Action Point 9:" +write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[9].CumulativeMsgsSent +write " " + +;; Check the Cumulative Message Counters (3006.h) +if (p@$SC_$CPU_LC_ART[5].CumulativeMsgsSent = ap5EvtCtr) then + write "<*> Passed (3006.h) - AP 5 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 5 Cumulative Message Counter incorrect. Expected ",ap5EvtCtr," Got ",$SC_$CPU_LC_ART[5].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap5EvtCtr = $SC_$CPU_LC_ART[5].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[6].CumulativeMsgsSent = ap6EvtCtr) then + write "<*> Passed (3006.h) - AP 6 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 6 Cumulative Message Counter incorrect. Expected ",ap6EvtCtr," Got ",$SC_$CPU_LC_ART[6].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap6EvtCtr = $SC_$CPU_LC_ART[6].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[9].CumulativeMsgsSent = ap9EvtCtr) then + write "<*> Passed (3006.h) - AP 9 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 9 Cumulative Message Counter incorrect. Expected ",ap9EvtCtr," Got ",$SC_$CPU_LC_ART[9].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap9EvtCtr = $SC_$CPU_LC_ART[9].CumulativeMsgsSent +endif + +write ";*********************************************************************" +write "; Step 2.17 Send packets for data run 2 a second time" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.17",2) + +write ";*********************************************************************" +write "; Step 2.18 Send Sample Request for APs 5,6 and 9." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 3 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Failure) THEN + write "<*> Passed (3001;3002;3002.1.1) - Did not receive Pass to Fail transition event because it was filtered." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_300211, "P" +else + write " Failed (3001;3002;3002.1.1) - Received Pass to Fail transition event" + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300211, "F" +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30022, "P" +else + write " Failed (3001;3002;3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30022, "F" +endif + +;; Verify the global counter increments +expectedPassRTSCnt = $SC_$CPU_LC_PassRTSCnt + 1 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +if ($SC_$CPU_find_event[1].num_found_messages = 2) then + write "<*> Passed - Received the correct number of Sample events" +else + write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages +endif + +ut_tlmupdate $SC_$CPU_LC_PassRTSCnt + +;; Verify the counter incremented +write " LC Passive RTS Count = ", $SC_$CPU_LC_PassRTSCnt +if ($SC_$CPU_LC_PassRTSCnt = expectedPassRTSCnt) THEN + write "<*> Passed (3002.4) - Passive RTS Counter incremented correctly." + ut_setrequirements LC_30024, "P" +else + write " Failed (3002.4) - Passive RTS Counter did not increment as expected. Got ",$SC_$CPU_LC_PassRTSCnt,"; Expected ",expectedPassRTSCnt + ut_setrequirements LC_30024, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.19 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +;; Increment the expected message counters +;;ap5EvtCtr = ap5EvtCtr + 1 +ap6EvtCtr = ap6EvtCtr + 1 +;;ap9EvtCtr = ap9EvtCtr + 1 + +;; Write out AP info +write " Action Point 5:" +write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[5].CumulativeMsgsSent +write " " +write " Action Point 6:" +write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[6].CumulativeMsgsSent +write " " +write " Action Point 9:" +write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[9].CumulativeMsgsSent +write " " + +;; Check the Cumulative Message Counters (3006.h) +if (p@$SC_$CPU_LC_ART[5].CumulativeMsgsSent = ap5EvtCtr) then + write "<*> Passed (3006.h) - AP 5 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 5 Cumulative Message Counter incorrect. Expected ",ap5EvtCtr," Got ",$SC_$CPU_LC_ART[5].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap5EvtCtr = $SC_$CPU_LC_ART[5].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[6].CumulativeMsgsSent = ap6EvtCtr) then + write "<*> Passed (3006.h) - AP 6 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 6 Cumulative Message Counter incorrect. Expected ",ap6EvtCtr," Got ",$SC_$CPU_LC_ART[6].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap6EvtCtr = $SC_$CPU_LC_ART[6].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[9].CumulativeMsgsSent = ap9EvtCtr) then + write "<*> Passed (3006.h) - AP 9 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 9 Cumulative Message Counter incorrect. Expected ",ap9EvtCtr," Got ",$SC_$CPU_LC_ART[9].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap9EvtCtr = $SC_$CPU_LC_ART[9].CumulativeMsgsSent +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.20 Send packets for data run 3 a second time" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.20",3) + +write ";*********************************************************************" +write "; Step 2.21 Send Sample Request for APs 5,6 and 9." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 3 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Failure) THEN + if ($SC_$CPU_find_event[2].num_found_messages = 0) then + write "<*> Passed (3001;3002;3002.2.1) - Did not receive Fail to Pass transition event because it was filtered." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_300221, "P" + else + write " Failed (3001;3002;3002.2.1) - Number of events for Fail to Pass transition is not zero." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300221, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3001;3002;3002.2.1) - Received Fail to Pass transition event when it should have been filtered and not received." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300221, "F" +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3001;3002;3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30021, "P" +else + write " Failed (3001;3002;3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30021, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Failure) THEN + if ($SC_$CPU_find_event[2].num_found_messages = 0) then + write "<*> Passed (3001;3002;3002.2.1) - Did not receive Fail to Pass transition event because it was filtered." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_300221, "P" + else + write " Failed (3001;3002;3002.2.1) - Number of events for Fail to Pass transition is not zero." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300221, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3001;3002;3002.2.1) - Received Fail to Pass transition event when it should have been filtered and not received." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300221, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 2) then + write "<*> Passed - Received the correct number of Sample events" +else + write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.22 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +;; Increment the expected message counters +;;ap5EvtCtr = ap5EvtCtr + 1 +ap6EvtCtr = ap6EvtCtr + 1 +;;ap9EvtCtr = ap9EvtCtr + 1 + +;; Write out AP info +write " Action Point 5:" +write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[5].CumulativeMsgsSent +write " " +write " Action Point 6:" +write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[6].CumulativeMsgsSent +write " " +write " Action Point 9:" +write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[9].CumulativeMsgsSent +write " " + +;; Check the Cumulative Message Counters (3006.h) +if (p@$SC_$CPU_LC_ART[5].CumulativeMsgsSent = ap5EvtCtr) then + write "<*> Passed (3006.h) - AP 5 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 5 Cumulative Message Counter incorrect. Expected ",ap5EvtCtr," Got ",$SC_$CPU_LC_ART[5].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap5EvtCtr = $SC_$CPU_LC_ART[5].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[6].CumulativeMsgsSent = ap6EvtCtr) then + write "<*> Passed (3006.h) - AP 6 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 6 Cumulative Message Counter incorrect. Expected ",ap6EvtCtr," Got ",$SC_$CPU_LC_ART[6].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap6EvtCtr = $SC_$CPU_LC_ART[6].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[9].CumulativeMsgsSent = ap9EvtCtr) then + write "<*> Passed (3006.h) - AP 9 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 9 Cumulative Message Counter incorrect. Expected ",ap9EvtCtr," Got ",$SC_$CPU_LC_ART[9].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap9EvtCtr = $SC_$CPU_LC_ART[9].CumulativeMsgsSent +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.23 Send packets for data run 4 a second time" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.23",4) + +write ";*********************************************************************" +write "; Step 2.24 Send Sample Request for APs 5,6 and 9." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 3 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Failure) THEN + if ($SC_$CPU_find_event[2].num_found_messages = 0) then + write "<*> Passed (3002.1.1) - Did not receive Pass to Fail transition event because it was filtered." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_300211, "P" + else + write " Failed (3002.1.1) - Number of events for Pass to Fail transition is not zero." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300211, "F" + write "Event Message count = ",$SC_$CPU_find_event[2].num_found_messages + endif +else + write " Failed (3002.1.1) - Received Pass to Fail transition event" + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300211, "F" +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Failure) THEN + if ($SC_$CPU_find_event[3].num_found_messages = 0) then + write "<*> Passed (3002.2.1) - Did not receive Fail to Pass transition event because it was filtered." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_300221, "P" + else + write " Failed (3002.2.1) - Number of events for Fail to Pass transition is not zero." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300221, "F" + write "Event Message count = ",$SC_$CPU_find_event[3].num_found_messages + endif +else + write " Failed (3002.2.1) - Received Fail to Pass transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300221, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +if ($SC_$CPU_find_event[1].num_found_messages = 2) then + write "<*> Passed - Received the correct number of Sample events" +else + write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.25 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +;; Write out AP info +write " Action Point 5:" +write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[5].CumulativeMsgsSent +write " " +write " Action Point 6:" +write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[6].CumulativeMsgsSent +write " " +write " Action Point 9:" +write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[9].CumulativeMsgsSent +write " " + +;; Check the Cumulative Message Counters (3006.h) +if (p@$SC_$CPU_LC_ART[5].CumulativeMsgsSent = ap5EvtCtr) then + write "<*> Passed (3006.h) - AP 5 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 5 Cumulative Message Counter incorrect. Expected ",ap5EvtCtr," Got ",$SC_$CPU_LC_ART[5].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap5EvtCtr = $SC_$CPU_LC_ART[5].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[6].CumulativeMsgsSent = ap6EvtCtr) then + write "<*> Passed (3006.h) - AP 6 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 6 Cumulative Message Counter incorrect. Expected ",ap6EvtCtr," Got ",$SC_$CPU_LC_ART[6].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap6EvtCtr = $SC_$CPU_LC_ART[6].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[9].CumulativeMsgsSent = ap9EvtCtr) then + write "<*> Passed (3006.h) - AP 9 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 9 Cumulative Message Counter incorrect. Expected ",ap9EvtCtr," Got ",$SC_$CPU_LC_ART[9].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap9EvtCtr = $SC_$CPU_LC_ART[9].CumulativeMsgsSent +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.26 Send packets for data run 1 a third time" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.26",1) + +write ";*********************************************************************" +write "; Step 2.27 Send Sample Request for APs 5,6 and 9." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 3 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Failure) THEN + if ($SC_$CPU_find_event[2].num_found_messages = 0) then + write "<*> Passed (3001;3002;3002.2.1) - Did not receive Fail to Pass transition event because it was filtered." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_300221, "P" + else + write " Failed (3001;3002;3002.2.1) - Number of events for Fail to Pass transition is not zero." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300221, "F" + write "Event Message count = ",$SC_$CPU_find_event[2].num_found_messages + endif +else + write " Failed (3001;3002;3002.2.1) - Received Fail to Pass transition event" + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300221, "F" +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Failure) THEN + if ($SC_$CPU_find_event[3].num_found_messages = 0) then + write "<*> Passed (3001;3002;3002.1.1) - Did not receive Pass to Fail transition event because it was filtered." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_300211, "P" + else + write " Failed (3001;3002;3002.1.1) - Number of events for Pass to Fail transition is not zero." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300211, "F" + write "Event Message count = ",$SC_$CPU_find_event[3].num_found_messages + endif +else + write " Failed (3001;3002;3002.1.1) - Received Pass to Fail transition event." + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_300211, "F" +endif + +;; Verify the global counter increments +expectedPassRTSCnt = $SC_$CPU_LC_PassRTSCnt + 1 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +if ($SC_$CPU_find_event[1].num_found_messages = 2) then + write "<*> Passed - Received the correct number of Sample events" +else + write " Failed - Expected 2 Sample events; rcv'd ",$SC_$CPU_find_event[1].num_found_messages +endif + +ut_tlmupdate $SC_$CPU_LC_PassRTSCnt + +;; Verify the counter incremented +write " LC Passive RTS Count = ", $SC_$CPU_LC_PassRTSCnt +if ($SC_$CPU_LC_PassRTSCnt = expectedPassRTSCnt) THEN + write "<*> Passed (3002.4) - Passive RTS Counter incremented correctly." + ut_setrequirements LC_30024, "P" +else + write " Failed (3002.4) - Passive RTS Counter did not increment as expected. Got ",$SC_$CPU_LC_PassRTSCnt,"; Expected ",expectedPassRTSCnt + ut_setrequirements LC_30024, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.28 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +;; Write out AP info +write " Action Point 5:" +write " Action Result = ", p@$SC_$CPU_LC_ART[5].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[5].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[5].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[5].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[5].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[5].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[5].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[5].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[5].CumulativeMsgsSent +write " " +write " Action Point 6:" +write " Action Result = ", p@$SC_$CPU_LC_ART[6].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[6].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[6].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[6].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[6].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[6].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[6].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[6].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[6].CumulativeMsgsSent +write " " +write " Action Point 9:" +write " Action Result = ", p@$SC_$CPU_LC_ART[9].ActionResult +write " Current State = ", p@$SC_$CPU_LC_ART[9].CurrentState +write " Fail to Pass Count = ", $SC_$CPU_LC_ART[9].FailToPassCount +write " Pass to Fail Count = ", $SC_$CPU_LC_ART[9].PassToFailCount +write " Passive AP Count = ", $SC_$CPU_LC_ART[9].PassiveAPCount +write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[9].ConsecutiveFailCount +write " Cum Fail Count = ", $SC_$CPU_LC_ART[9].CumulativeFailCount +write " Cum RTS Count = ", $SC_$CPU_LC_ART[9].CumulativeRTSExecCount +write " Cum Event Msgs Sent = ", $SC_$CPU_LC_ART[9].CumulativeMsgsSent +write " " + +;; Check the Cumulative Message Counters (3006.h) +if (p@$SC_$CPU_LC_ART[5].CumulativeMsgsSent = ap5EvtCtr) then + write "<*> Passed (3006.h) - AP 5 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 5 Cumulative Message Counter incorrect. Expected ",ap5EvtCtr," Got ",$SC_$CPU_LC_ART[5].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap5EvtCtr = $SC_$CPU_LC_ART[5].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[6].CumulativeMsgsSent = ap6EvtCtr) then + write "<*> Passed (3006.h) - AP 6 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 6 Cumulative Message Counter incorrect. Expected ",ap6EvtCtr," Got ",$SC_$CPU_LC_ART[6].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap6EvtCtr = $SC_$CPU_LC_ART[6].CumulativeMsgsSent +endif + +if (p@$SC_$CPU_LC_ART[9].CumulativeMsgsSent = ap9EvtCtr) then + write "<*> Passed (3006.h) - AP 9 Cumulative Message Counter as expected." + ut_setrequirements LC_3006, "P" +else + write " Failed (3006.h) - AP 9 Cumulative Message Counter incorrect. Expected ",ap9EvtCtr," Got ",$SC_$CPU_LC_ART[9].CumulativeMsgsSent + ut_setrequirements LC_3006, "F" + ap9EvtCtr = $SC_$CPU_LC_ART[9].CumulativeMsgsSent +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.0: Clean-up" +write ";*********************************************************************" + +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_evtfilter" +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_gencmds.prc b/test_and_ground/asist/prc/template/template_lc_gencmds.prc similarity index 79% rename from test_and_ground/asist/prc/template/template_lcx_gencmds.prc rename to test_and_ground/asist/prc/template/template_lc_gencmds.prc index 212f727..7b8ab75 100644 --- a/test_and_ground/asist/prc/template/template_lcx_gencmds.prc +++ b/test_and_ground/asist/prc/template/template_lc_gencmds.prc @@ -1,3376 +1,3281 @@ -PROC $sc_$cpu_lcx_gencmds -;******************************************************************************* -; Test Name: lcx_gencmds -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker eXtended (LCX) -; application general commands function properly. All LCX commands will be -; tested as well as invalid commands and an application reset to see if -; the LCX application behaves appropriately -; -; Requirements Tested -; LCX1000 Upon receipt of a No-Op command, LCX shall increment the LCX -; Valid Command Counter and generate an event message. -; LCX1001 Upon receipt of a Reset command, LCX shall reset the following -; housekeeping variables to a value of zero: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Actionpoint Sample Count -; e) TLM Count -; f) RTS Execution Counter -; LCX1002 For all LCX commands, if the length contained in the message -; header is not equal to the expected length, LC shall reject the -; command and issue an event message. -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message. -; LCX1004 If LCX rejects any command, LCX shall abort the command -; execution, increment the LCX Command Rejected Counter and issue -; an event message -; LCX2004 For each Watchpoint, the flight software shall maintain the -; following statistics in the dump-only Watchpoint Results Table: -; a) The result of the last relational comparison (False, True, -; Error or Stale) -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) Most recent FALSE to TRUE transition value -; g) Most recent FALSE to TRUE transition timestamp -; h) Most recent TRUE to FALSE transition value -; i) Most recent TRUE to FALSE transition timestamp -; j) Most recent comparison age -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample(Pass,Fail,Error,or Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result = -; Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LCX Application to Active -; LCX4001 Upon receipt of a Set LCX Application State to Passive Command, -; LCX shall set the LCX Application State to Passive -; LCX4002 Upon receipt of a Set LCX Application State to Disable Command, -; LCX shall set the LCX Application State to Disabled -; LCX4003 Upon receipt of a Set Actionpoint to Active Command, LCX shall -; set the state for the command-specified Actionpoint to ACTIVE -; such that the actionpoint is evaluated and the table-defined -; actions are taken based on the evaluation -; LCX4004 Upon receipt of a Set All Actionpoints to Active Command, LCX -; shall set the state for all Actionpoints to ACTIVE such that the -; actionpoints are evaluated and the table-defined actions are -; taken based on the evaluation -; LCX4005 Upon receipt of a Set Actionpoint to Passive Command, LCX shall -; set the state for the command-specified Actionpoint to PASSIVE -; such that the actionpoint is evaluated, however, no actions -; are taken -; LCX4006 Upon receipt of a Set All Actionpoints to Passive Command, LCX -; shall set the state for the all Actionpoints to PASSIVE such -; that all actionpoints are evaluated, however, no actions are -; taken -; LCX4007 Upon receipt of a Set Actionpoint to Disabled Command, LCX shall -; set the state for the command-specified Actionpoint to DISABLED -; such that the actionpoints are not evaluated and no actions -; are taken -; LCX4008 Upon receipt of a Set All Actionpoints to Disabled Command, LCX -; shall set the state for all Actionpoint to DISABLED such that: -; a) the actionpoints are not evaluated -; b) no actions are taken -; c) no event messages generated. -; LCX4009 Upon receipt of a Set Actionpoint to Permanent Disable, LCX -; shall mark the command-specified Actionpoint such that the -; Actionpoint cannot be Activated -; LCX4009.1 If a command is received to Activate an Actionpoint which has -; been permanently disabled, the command shall be rejected. -; LCX4010 Upon receipt of a Reset Actionpoint Statistics command, LCX -; shall set to zero, all the following Actionpoint Statistics for -; the command-specified Actionpoints: -; a) Total number of FAIL to PASS transitions -; b) Total number of PASS to FAIL transitions -; c) Number of consecutive FAIL results -; d) Total number of FAIL results -; e) Total number of RTS executions -; f) Total number of event messages sent relating to that -; Actionpoint -; LCX4011 Upon receipt of a Reset All Actionpoint Statistics command, LCX -; shall set to zero, all the following Actionpoint Statistics for -; all Actionpoints: -; a) Total number of FAIL to PASS transitions -; b) Total number of PASS to FAIL transitions -; c) Number of consecutive FAIL results -; d) Total number of FAIL results -; e) Total number of RTS executions -; f) Total number of event messages sent relating to that -; Actionpoint -; LCX4012 Upon receipt of a Reset Watchpoint Statistics command, LCX shall -; set to zero all of the following Watchpoint Statistics for the -; command-specified Watchpoints: -; a) Total sample count for this watchpoint -; b) Number of times result transitioned from FALSE to TRUE -; c) Number of consecutive TRUE results -; d) Total number of TRUE results -; e) Most recent FALSE to TRUE transistion value -; f) Most recent FALSE to TRUE transistion timestamp -; g) Most recent TRUE to FALSE transistion value -; h) Most recent TRUE to FALSE transistion timestamp -; LCX4013 Upon receipt of a Reset All Watchpoint Statistics command, LCX -; shall set to zero all of the following Watchpoint Statistics for -; all Watchpoints: -; a) Total sample count for this watchpoint -; b) Number of times result transitioned from FALSE to TRUE -; c) Number of consecutive TRUE results -; d) Total number of TRUE results -; e) Most recent FALSE to TRUE transistion value -; f) Most recent FALSE to TRUE transistion timestamp -; g) Most recent TRUE to FALSE transistion value -; h) Most recent TRUE to FALSE transistion timestamp -; LCX8000 LC shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; telemetry) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LC State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded -; a True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result = -; Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 09/27/12 Walt Moleski Original Procedure for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lcx_wdt1 Sets up the Watchpoint Definition table files for -; testing -; lcx_adt1 Sets up the Actionpoint Definition table files for -; testing -; -; Expected Test Results and Analysis -; -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "to_lab_events.h" -#include "lc_msgdefs.h" -#include "lc_platform_cfg.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1000 0 -#define LCX_1001 1 -#define LCX_1002 2 -#define LCX_1003 3 -#define LCX_1004 4 -#define LCX_2004 5 -#define LCX_3006 6 -#define LCX_4000 7 -#define LCX_4001 8 -#define LCX_4002 9 -#define LCX_4003 10 -#define LCX_4004 11 -#define LCX_4005 12 -#define LCX_4006 13 -#define LCX_4007 14 -#define LCX_4008 15 -#define LCX_4009 16 -#define LCX_40091 17 -#define LCX_4010 18 -#define LCX_4011 19 -#define LCX_4012 20 -#define LCX_4013 21 -#define LCX_8000 22 -#define LCX_9000 23 -#define LCX_9001 24 -#define LCX_9002 25 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -#define CMDFAIL 1 -#define CMDSUCCESS 2 -global ut_req_array_size = 25 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1000","LCX_1001", ;; - "LCX_1002","LCX_1003","LCX_1004","LCX_2004","LCX_3006","LCX_4000", ;; - "LCX_4001","LCX_4002","LCX_4003","LCX_4004","LCX_4005","LCX_4006", ;; - "LCX_4007","LCX_4008","LCX_4009","LCX_4009.1","LCX_4010","LCX_4011", ;; - "LCX_4012","LCX_4013","LCX_8000","LCX_9000","LCX_9001","LCX_9002"] - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL rawcmd -LOCAL stream1 -LOCAL index -LOCAL wpindex, wrtAppId -LOCAL apindex, artAppId -LOCAL ADTentries = 12 -LOCAL APResults = ADTentries/2 -LOCAL WDTentries = 30 -LOCAL CmdStatus -LOCAL State -Local rdlindex -Local cmdctr -Local maxwp = LC_MAX_WATCHPOINTS - 1 -Local maxap = LC_MAX_ACTIONPOINTS - 1 -local expectedResults -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local WRTTblName = LCAppName & ".LC_WRT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" -write "; to the spacecraft default file location for the LC application. " -write ";********************************************************************" -s $SC_$CPU_lcx_wdt1 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -;; Build the Actionpoint Definition Table -s $SC_$CPU_lcx_adt1 - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, "$CPU", "P") - -;; Display the pages used by this test -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the LC HK packet ID, WRT and ART appIds based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" -wrtAppId = "0FB9" -artAppId = "0FB8" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" - artAppId = "0FD6" - wrtAppId = "0FD7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" - artAppId = "0FF6" - wrtAppId = "0FF7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 12 APs that are being used -;;255 is because they are disabled and not measured - for apindex = 1 to APResults do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = APResults+1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - WP or AP Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC =", $SC_$CPU_LC_CMDPC - write " CMDEC =", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT =", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE =", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT =", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001) - Watchpoint Results Table NOT initialized at startup. Index = ",index - write " Index of failure =", index - write " WatchResults =", $SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count =", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count =", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True =", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count =", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value =", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value =", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" -else - write "<*> Passed (9001) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002) - Actionpoint Results Table NOT initialized at startup. Index = ",index - write " Index of failure =", index - write " Action Results =", $SC_$CPU_LC_ART[index].ActionResult - write " Current State =", $SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" -else - write "<*> Passed (9002) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" -endif - -write ";*********************************************************************" -write "; Step 1.6: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 1 - -;; Enable DEBUG events for the SC and CFE_TBL application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 2.0: No-op Testing" -write ";*********************************************************************" -write "; Step 2.1: Send valid No-op command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_NOOP_INF_EID, "INFO", 1 - -ut_sendcmd "$SC_$CPU_LC_NOOP" -if (ut_sc_status = UT_SC_Success) then - write "<*> Passed (1000;1003) - NOOP command sent properly." - ut_setrequirements LCX_1000, "P" - ut_setrequirements LCX_1003, "P" -else - write " Failed (1000;1003) - NOOP command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1000, "F" - ut_setrequirements LCX_1003, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1000;1003) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1000, "P" - ut_setrequirements LCX_1003, "P" -else - write " Failed (1000;1003) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_NOOP_INF_EID, "." - ut_setrequirements LCX_1000, "F" - ut_setrequirements LCX_1003, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2: Send No-op command with invalid command length" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 - -local errcnt = $SC_$CPU_LC_CMDEC + 1 - -;; CPU1 is the default -rawcmd = "18a4c000000200BD" - -if ("$CPU" = "CPU2") then - rawcmd = "19a4c000000200BD" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa4c000000200BD" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.0: Reset Testing" -write ";*********************************************************************" -write "; Step 3.1: Send valid Reset command" -write ";*********************************************************************" -;; use test app to set the counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -wait 10 - -if ($SC_$CPU_LC_CMDPC <> 0) and ($SC_$CPU_LC_CMDEC <> 0) and ;; - ($SC_$CPU_LC_PASSRTSCNT <> 0) and ($SC_$CPU_LC_APSAMPLECNT <> 0) and ;; - ($SC_$CPU_LC_MONMSGCNT <> 0) and ($SC_$CPU_LC_RTSCNT <> 0) then - ut_setupevents "$SC", "$CPU", {LCAppName}, LC_RESET_DBG_EID, "DEBUG", 1 - /$SC_$CPU_LC_RESETCTRS - wait 5 - - ut_tlmwait $SC_$CPU_LC_CMDPC, 0 - if (UT_TW_Status = UT_Success) then - write "<*> Passed (1001;1003) - Valid Command Counter was reset." - ut_setrequirements LCX_1001, "P" - ut_setrequirements LCX_1003, "P" - else - write " Failed (1001;1003) - Valid Command Counter was NOT reset (",ut_tw_status,")." - ut_setrequirements LCX_1001, "F" - ut_setrequirements LCX_1003, "F" - endif - - ut_tlmwait $SC_$CPU_LC_CMDEC, 0 - if (UT_TW_Status = UT_Success) then - write "<*> Passed (1001) - Command Rejected Counter was reset." - ut_setrequirements LCX_1001, "P" - else - write " Failed (1001) - Command Rejected Counter was NOT reset (",ut_tw_status,")." - ut_setrequirements LCX_1001, "F" - endif - - ut_tlmwait $SC_$CPU_LC_PASSRTSCNT, 0 - if (UT_TW_Status = UT_Success) then - write "<*> Passed (1001) - Count of RTS sequences not initiated because application state is passive was reset." - ut_setrequirements LCX_1001, "P" - else - write " Failed (1001) - Count of RTS sequences not initiated because application state is passive was NOT reset (",ut_tw_status,")." - ut_setrequirements LCX_1001, "F" - endif - - ut_tlmwait $SC_$CPU_LC_APSAMPLECNT, 0 - if (UT_TW_Status = UT_Success) then - write "<*> Passed (1001) - Total Count of APs Sampled was reset." - ut_setrequirements LCX_1001, "P" - else - write " Failed (1001) - Total Count of APs Sampled was NOT reset (",ut_tw_status,")." - ut_setrequirements LCX_1001, "F" - endif - - ut_tlmwait $SC_$CPU_LC_MONMSGCNT, 0 - if (UT_TW_Status = UT_Success) then - write "<*> Passed (1001) - Total Count of Messages Monitored was reset." - ut_setrequirements LCX_1001, "P" - else - write " Failed (1001) - Total Count of Messages Monitored was NOT reset (",ut_tw_status,")." - ut_setrequirements LCX_1001, "F" - endif - - ut_tlmwait $SC_$CPU_LC_RTSCNT, 0 - if (UT_TW_Status = UT_Success) then - write "<*> Passed (1001) - Total Count of RTS Sequences Initiated was reset." - ut_setrequirements LCX_1001, "P" - else - write " Failed (1001) - Total Count of RTS Sequences Initiated was NOT reset (",ut_tw_status,")." - ut_setrequirements LCX_1001, "F" - endif - - if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1001, "P" - ut_setrequirements LCX_1003, "P" - else - write " Failed (1001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_RESET_DBG_EID, "." - ut_setrequirements LCX_1001, "F" - ut_setrequirements LCX_1003, "F" - endif - - wait 5 -else - write ";*********************************************************************" - write "; ERROR IN TEST APPLICATION: SetCounters did not work" - write ";*********************************************************************" -endif - -write ";*********************************************************************" -write "; Step 3.2: Send Reset command with invalid command length" -write ";*******************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -;; CPU1 is the default -rawcmd = "18a4c000000201BC" - -if ("$CPU" = "CPU2") then - rawcmd = "19a4c000000201BC" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa4c000000201BC" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.0: Application State Testing" -write "; This set of steps does not verify that LC operates correctly in each" -write "; state. They verify that the state changed when the Set State Command" -write "; is issued" -write ";" -write "; NOTE: All possible transitions from active to passive to disabled" -write "; are tested." -write ";*********************************************************************" -write "; Step 4.1: Send Set LC Application State to Active" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 - -State = LC_STATE_ACTIVE - -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.2: Send Set LC Application State to Passive" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 - -State = LC_STATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then - write "<*> Passed (1003;4001) - Set LC Application State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else - write " Failed (1003;4001) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else - write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.3: Send Set LC Application State to Disable" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 - -State = LC_STATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) then - write "<*> Passed (1003;4002) - Set LC Application State to Disabled command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Set LC Application State to Disabled command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.4: Send Set LC Application State to Active" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 - -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.5: Send Set LC Application State to Disable" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 - -State = LC_STATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) then - write "<*> Passed (1003;4002) - Set LC Application State to Disable command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Set LC Application State to Disable command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.6: Send Set LC Application State to Passive" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 - -State = LC_STATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then - write "<*> Passed (1003;4001) - Set LC Application State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else - write " Failed (1003;4001) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else - write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.7: Send Set LC Application State to Active" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 - -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.8: Send Set LC Application State with an invalid" -write "; command length " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -;; CPU1 is the deafult -rawcmd = "18a4c000000602BC00010000" - -if ("$CPU" = "CPU2") then - rawcmd = "19a4c000000602BC00010000" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa4c000000602BC00010000" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.9: Send Set LC Application State with an invalid state" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -;; CPU1 is the default -rawcmd = "18a4c000000502BC00060000" - -if ("$CPU" = "CPU2") then - rawcmd = "19a4c000000502BC00060000" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa4c000000502BC00060000" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_LCSTATE_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.0: Set AP Commands Testing" -write "; NOTE: This does not test that data is processed correctly. All " -write "; possible transitions from active to passive to disabled are tested." -write ";*********************************************************************" -write "; Step 5.1: Send Set AP to Active Command for the first AP." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -index = 0 -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4003) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -;; Check the State of each entry -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if (rdlindex = 0) then - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then - expectedResults = FALSE - break - endif - elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - AP states are set as expected." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.2: Using Set AP to Active Command activate remainder of APs" -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -for index = 1 to ADTentries-1 do - - ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - - if (ut_sc_status <> UT_SC_Success) then - write " Failed (1003;4003) - Set AP to Active command not sent properly (", ut_sc_status, "). Index of failure = ", index - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" - break - endif -enddo - -;; Check if the correct number of event messages were received -if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then - write "<*> Passed (1003;4003) - The correct number of Event messages were received." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -;; Dump the Results table -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - All AP States were set to Active." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -write ";*********************************************************************" -write "; Step 5.3: Send Set AP to Passive Command for the first AP." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -index = 0 -State = LC_APSTATE_PASSIVE - -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4005) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4005, "P" -else - write " Failed (1003;4005) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4005, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -;; Check the State of each entry -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if (rdlindex = 0) then - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then - expectedResults = FALSE - break - endif - elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4005) - AP states are set as expected." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4005, "P" -else - write " Failed (1003;4005) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4005, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.4: Send the Set AP to Passive Command for the remaining APs" -write ";*********************************************************************" -State = LC_APSTATE_PASSIVE -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -for index = 1 to ADTentries-1 do - - ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - - if (ut_sc_status <> UT_SC_Success) then - write " Failed (1003;4003) - Set AP to Passive command not sent properly (", ut_sc_status, "). Index of failure = ", index - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" - break - endif -enddo - -;; Check if the correct number of event messages were received -if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then - write "<*> Passed (1003;4003) - The correct number of Event messages were received." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -;; Dump the Results table -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - All AP States were set to Passive." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set to Passive as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -write ";*********************************************************************" -write "; Step 5.5: Send the Set AP to Disabled Command for the first AP." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -index = 0 -State = LC_APSTATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4007) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4007, "P" -else - write " Failed (1003;4007) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4007, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -;; Check the State of each entry -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if (rdlindex = 0) then - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then - expectedResults = FALSE - break - endif - elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4007) - AP states are set as expected." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4007, "P" -else - write " Failed (1003;4007) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4007, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.6: Send the Set AP to Disabled Command for the remaining APs" -write ";*********************************************************************" -state = LC_APSTATE_DISABLED -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -for index = 1 to ADTentries-1 do - - ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - - if (ut_sc_status <> UT_SC_Success) then - write " Failed (1003;4003) - Set AP to Disabled command not sent properly (", ut_sc_status, "). Index of failure = ", index - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" - break - endif -enddo - -;; Check if the correct number of event messages were received -if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then - write "<*> Passed (1003;4003) - The correct number of Event messages were received." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -;; Dump the Results table -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - All AP States were set to Disabled." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set to Disabled as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -write ";*********************************************************************" -write "; Step 5.7: Send the Set AP to Active Command for the first AP." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -index = 0 -State = LC_APSTATE_ACTIVE - -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4003) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -;; Check the State of each entry -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if (rdlindex = 0) then - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then - expectedResults = FALSE - break - endif - elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - AP states are set as expected." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.8: Send the Set AP to Active Command for the remaining APs" -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -for index = 1 to ADTentries-1 do - - ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - - if (ut_sc_status <> UT_SC_Success) then - write " Failed (1003;4003) - Set AP to Active command not sent properly (", ut_sc_status, "). Index of failure = ", index - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" - break - endif -enddo - -;; Check if the correct number of event messages were received -if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then - write "<*> Passed (1003;4003) - The correct number of Event messages were received." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -;; Dump the Results table -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - All AP States were set to Active." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -write ";*********************************************************************" -write "; Step 5.9: Send the Set AP to Disabled Command for the first AP." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -index = 0 -State = LC_APSTATE_DISABLED - -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4007) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4007, "P" -else - write " Failed (1003;4007) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4007, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -;; Check the State of each entry -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if (rdlindex = 0) then - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then - expectedResults = FALSE - break - endif - elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4007) - AP states are set as expected." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4007, "P" -else - write " Failed (1003;4007) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4007, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.10: Send the Set AP to Disabled Command for the remaining APs" -write ";*********************************************************************" -State = LC_APSTATE_DISABLED -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -for index = 1 to ADTentries-1 do - - ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - - if (ut_sc_status <> UT_SC_Success) then - write " Failed (1003;4003) - Set AP to Disabled command not sent properly (", ut_sc_status, "). Index of failure = ", index - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" - break - endif -enddo - -;; Check if the correct number of event messages were received -if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then - write "<*> Passed (1003;4003) - The correct number of Event messages were received." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -;; Dump the Results table -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - All AP States were set to Disabled." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set to Disabled as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -write ";*********************************************************************" -write "; Step 5.11: Send the Set AP to Passive Command for the first AP." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -index = 0 -State = LC_APSTATE_PASSIVE - -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4005) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4005, "P" -else - write " Failed (1003;4005) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4005, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -;; Check the State of each entry -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if (rdlindex = 0) then - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then - expectedResults = FALSE - break - endif - elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4005) - AP states are set as expected." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4005, "P" -else - write " Failed (1003;4005) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4005, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.12: Sent the Set AP to Passive Command for the remaining APs" -write ";*********************************************************************" -State = LC_APSTATE_PASSIVE -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -for index = 1 to ADTentries-1 do - - ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - - if (ut_sc_status <> UT_SC_Success) then - write " Failed (1003;4003) - Set AP to Passive command not sent properly (", ut_sc_status, "). Index of failure = ", index - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" - break - endif -enddo - -;; Check if the correct number of event messages were received -if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then - write "<*> Passed (1003;4003) - The correct number of Event messages were received." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -;; Dump the Results table -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - All AP States were set to Passive." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set to Passive as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -write ";*********************************************************************" -write "; Step 5.13: Send the Set AP to Active Command for the first AP." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -index = 0 -State = LC_APSTATE_ACTIVE - -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4003) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -;; Check the State of each entry -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if (rdlindex = 0) then - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then - expectedResults = FALSE - break - endif - elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - AP states are set as expected." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.14: Send the Set AP to Active Command for the remaining APs" -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -for index = 1 to ADTentries-1 do - - ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - - if (ut_sc_status <> UT_SC_Success) then - write " Failed (1003;4003) - Set AP to Active command not sent properly (", ut_sc_status, "). Index of failure = ", index - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" - break - endif -enddo - -;; Check if the correct number of event messages were received -if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then - write "<*> Passed (1003;4003) - The correct number of Event messages were received." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -;; Dump the Results table -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -expectedResults = TRUE -for rdlindex = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then - expectedResults = FALSE - break - endif -enddo - -if (expectedResults = TRUE) then - write "<*> Passed (1003;4003) - All AP States were set to Active." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" -endif - -write ";*********************************************************************" -write "; Step 5.15: Send the Set AP State with an invalid command length" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -;; CPU1 is the default -rawcmd = "18a4c000000603BC00010000" - -if ("$CPU" = "CPU2") then - rawcmd = "19a4c000000603BC00010000" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa4c000000603BC00010000" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.16: Send the Set AP State command with an invalid state" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_NEW_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -;; CPU1 is the default -;;rawcmd = "18a4c000000503BC00010006" -;; -;;if ("$CPU" = "CPU2") then -;; rawcmd = "19a4c000000503BC00010006" -;;elseif ("$CPU" = "CPU3") then -;; rawcmd = "1aa4c000000503BC00010006" -;;endif -;; -;;ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -;; This does not have to be a raw command since there are no restrictions on -;; the NewAPState argument -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=4" - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_NEW_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.17: Send Set AP using an AP with state NOT USED" -write "; The ADT defines only 12 APs, so anything above that is unused" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_CURR_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 -index = 13 -State = LC_APSTATE_ACTIVE - -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 6.0: Set All AP Commands Testing" -write ";*********************************************************************" -write "; Step 6.1: Using the Set AP commands set to a mix of active, passive," -write "; and disabled. The ADT defines only 12 APs." -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=10 NewAPState=State" -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" -State = LC_APSTATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=11 NewAPState=State" - -;; Dump the ART to verify the state settings above -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -write ";*********************************************************************" -write "; Step 6.2: Set ALL APs to Active" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for index = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then - CmdStatus = CMDFAIL - break - endif -enddo -for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4004) - Set All APs to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, "). index = ", index - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 6.3: Using the Set AP commands set to a mix of active, passive," -write "; and disabled" -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=10 NewAPState=State" -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" -State = LC_APSTATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=11 NewAPState=State" - -;; Dump the ART to verify the state settings above -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -write ";*********************************************************************" -write "; Step 6.4: Set ALL APs to Passive" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4006) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4006, "P" -else - write " Failed (1003;4006) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4006, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for index = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then - CmdStatus = CMDFAIL - break - endif -enddo -for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4006) - Set All APs to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4006, "P" -else - write " Failed (1003;4006) - Set All APs to Passive command not sent properly (", ut_sc_status, "). index = ",index - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4006, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 6.5: Using the Set AP commands set to a mix of active, passive," -write "; and disabled" -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=10 NewAPState=State" -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" -State = LC_APSTATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=11 NewAPState=State" - -;; Dump the ART to verify the state settings above -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -write ";*********************************************************************" -write "; Step 6.6: Set ALL APs to Disabled" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 - -State = LC_APSTATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4008) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4008, "P" -else - write " Failed (1003;4008) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4008, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for index = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then - CmdStatus = CMDFAIL - break - endif -enddo -for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4008) - Set All APs to Disabled command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4008, "P" -else - write " Failed (1003;4008) - Set All APs to Disabled command not sent properly (", ut_sc_status, "). index = ",index - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4008, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 6.7: Send Set all AP with an invalid state" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_NEW_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=4" - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_NEW_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.0: Set AP to Permanent Disable Testing" -write ";*********************************************************************" -write "; Step 7.1: Using the Set AP commands set to a mix of active, passive," -write "; and disabled. The ADT defines only 10 APs." -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" -State = LC_APSTATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" - -;; Dump the ART to verify the state settings above -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -write ";*********************************************************************" -write "; Step 7.2: Set 4 AP to Permanent Disabled (1 Active, 1 Passive," -write "; 1 Disabled, 1 Not Used)" -write ";*********************************************************************" -write "; Step 7.2.1: Try to Permanently Disable an AP that is Active. This " -write "; should fail." -write ";*********************************************************************" -errcnt = $SC_$CPU_LC_CMDEC + 1 -rdlindex = 0 - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_CURR_ERR_EID, "ERROR", 1 - -/$SC_$CPU_LC_SETAPPERMOFF APNumber=0 - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} - -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.2.2: Try to Permanently Disable an AP that is Passive. This " -write "; should fail." -write ";*********************************************************************" -errcnt = $SC_$CPU_LC_CMDEC + 1 -rdlindex = 4 - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_CURR_ERR_EID, "ERROR", 1 - -/$SC_$CPU_LC_SETAPPERMOFF APNumber=4 - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 - -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.2.3: Try to Permanently Disable an AP that is Disabled. This " -write "; should pass." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_INF_EID, "INFO", 1 -rdlindex = 2 - -ut_sendcmd "$SC_$CPU_LC_SETAPPERMOFF APNumber=2" - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4009) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4009, "P" -else - write " Failed (1003;4009) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4009, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_ART[rdlindex].CurrentState = LC_APSTATE_PERMOFF) then - write "<*> NOTE: AP 2 is currently Permanently Disabled. " - write "<*> Passed (1003;4009) -Set AP to Permanently Disabled command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4009, "P" -else - write " Failed (1003;4009) - Set AP to Permanently Disabled command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4009, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.2.2: Try to Permanently Disable an AP that is Not Used. This " -write "; should fail." -write ";*********************************************************************" -errcnt = $SC_$CPU_LC_CMDEC + 1 - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_CURR_ERR_EID, "ERROR", 1 - -/$SC_$CPU_LC_SETAPPERMOFF APNumber=12 - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} - -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.3: Send Set AP to Active for an AP that is Permanently " -write "; Disabled. Using AP 2 for this test. This should fail." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_CURR_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 -State = LC_APSTATE_ACTIVE - -/$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004;4009.1) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" - ut_setrequirements LCX_40091, "P" -else - write " Failed (1002;1004;4009.1) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" - ut_setrequirements LCX_40091, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.4: Send Set AP to Passive for an AP that is Permanently " -write "; Disabled. Using AP 2 for this test. This should fail." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_CURR_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 -State = LC_APSTATE_PASSIVE - -/$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004;4009.1) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" - ut_setrequirements LCX_40091, "P" -else - write " Failed (1002;1004;4009.1) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" - ut_setrequirements LCX_40091, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.5: Send Set AP to Disabled for an AP that is Permanently " -write "; Disabled. Using AP 2 for this test. This should fail." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_CURR_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 -State = LC_APSTATE_DISABLED - -/$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004;4009.1) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" - ut_setrequirements LCX_40091, "P" -else - write " Failed (1002;1004;4009.1) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" - ut_setrequirements LCX_40091, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.6: Send Set AP to Permanently Disabled for an AP that is " -write "; Permanently Disabled. Using AP 2 for this test. Since the state is " -write "; not Disabled this test should fail." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_CURR_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -/$SC_$CPU_LC_SETAPPERMOFF APNumber=2 - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) AND ;; - ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (1004) - Command Rejected Counter incremented and Event message ",$SC_$CPU_find_event[1].eventid, " received." - ut_setrequirements LCX_1004, "P" -elseif ($SC_$CPU_LC_CMDEC <> errcnt) then - write " Failed (1004) - Command Rejected Counter did not increment as expected." -elseif ($SC_$CPU_find_event[1].num_found_messages <> 1) then - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 8.0: Reset WP and AP Statistics Testing" -write "; This series of tests verify that the statistics are reset correctly." -write "; The steps to get the WRT and ART to be non-zero do no verify the " -write "; correctness of the data" -write ";*********************************************************************" -write "; Step 8.1 Make the WRT counters non-zero and then issue the WRT reset" -write "; for each WP individually" -write ";*********************************************************************" - -CmdStatus = CMDSUCCESS - -;; use test app to set all the WRT counters to non-zero -/$SC_$CPU_TST_LC_SETWRT -wait 5 - -;; Dump the WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) -wait 5 - -for rdlindex = 0 to LC_MAX_WATCHPOINTS-1 do - if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].FtoTValue = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].TtoFValue = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp = 0) then - write ";*********************************************************************" - write "; ERROR IN TEST APPLICATION: SetWRT did not work" - write ";*********************************************************************" - CmdStatus = CMDFAIL - endif -enddo - -if (CmdStatus = CMDSUCCESS) then - local midWP = maxwp / 2 - - ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WPSTATS_INF_EID, "INFO", 1 - - /$SC_$CPU_LC_RESETWPSTATS WPNumber=0 - /$SC_$CPU_LC_RESETWPSTATS WPNumber=maxwp - /$SC_$CPU_LC_RESETWPSTATS WPNumber=midWP - - ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 3 - if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1003;4012) - Event messages ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4012, "P" - else - write " Failed (1003;4012) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_WPSTATS_INF_EID, " 3 times." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4012, "F" - endif - - s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) - wait 5 - - expectedResults = TRUE - for rdlindex = 0 to LC_MAX_WATCHPOINTS-1 do - if (rdlindex = 0) or (rdlindex = midWP) or (rdlindex = maxwp) then - if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount <> 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount <> 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount <> 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount <> 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].FtoTValue <> 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp <> 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp <> 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].TtoFValue <> 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp <> 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp <> 0) then - write " Failed (1003;2004;4012) - Reset WP Statistics did not clear index (",rdlindex, ") as expected." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_2004, "F" - ut_setrequirements LCX_4012, "F" - expectedResults = FALSE - break - endif - else - if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].FtoTValue = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].TtoFValue = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp = 0) then - write " Failed (1003;2004;4012) - WP Statistics cleared for an index (",rdlindex, ") that was not commanded to clear" - write "Evaluation Count = ", $sc_$cpu_LC_WRT[rdlindex].EvaluationCount - write "False to True Count = ", $sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount - write "Consecutive True Count = ", $sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount - write "Cumulative True Count = ", $sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount - write "False to True Value = ", $sc_$cpu_LC_WRT[rdlindex].FtoTValue - write "Time Stamp (seconds) = ", $sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp - write "Time Stamp (subseconds) = ", $sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp - write "True to False Value = ", $sc_$cpu_LC_WRT[rdlindex].TtoFValue - write "Time Stamp (seconds) = ", $sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp - write "Time Stamp (subseconds) = ", $sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_2004, "F" - ut_setrequirements LCX_4012, "F" - expectedResults = FALSE - break - endif - endif - enddo - - if (expectedResults = TRUE) then - write "<*> Passed (1003;2004;4012) Reset WP Statistics commands executed as expected." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_2004, "P" - ut_setrequirements LCX_4012, "P" - endif -endif - -write ";*********************************************************************" -write "; Step 8.2 Make the ART counters non-zero and then issue the ART reset" -write "; for each AP individually" -write ";*********************************************************************" - -CmdStatus = CMDSUCCESS - -;; use test app to set the ART counters to non-zero -/$SC_$CPU_TST_LC_SETART -wait 5 - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do - if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount = 0) or ;; - ($sc_$cpu_LC_ART[rdlindex].PassToFailCount = 0) or ;; - ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount = 0) or ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount = 0) or ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount = 0) then - write ";*********************************************************************" - write "; ERROR IN TEST APPLICATION: SetART did not work" - write ";*********************************************************************" - CmdStatus = CMDFAIL - endif -enddo - -if (CmdStatus = CMDSUCCESS) then - local midAP = maxap / 2 - - ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATS_INF_EID, "INFO", 1 - - /$SC_$CPU_LC_RESETAPSTATS APNumber=0 - /$SC_$CPU_LC_RESETAPSTATS APNumber=maxap - /$SC_$CPU_LC_RESETAPSTATS APNumber=midAP - - ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 3 - if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1003;4010) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4010, "P" - else - write " Failed (1003;4010) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4010, "F" - endif - - s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) - wait 5 - - expectedResults = TRUE - for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do - if (rdlindex = 0) or (rdlindex = midAP) or (rdlindex = maxap) then - if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount <> 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].PassToFailCount <> 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount <> 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount <> 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount <> 0) then - write " Failed (1003;3006;4010) - Reset AP Statistics did not clear index (", rdlindex, ") as expected." - write "Fail to Pass Count = ",$sc_$cpu_LC_ART[rdlindex].FailToPassCount - write "Pass to Fail Count = ",$sc_$cpu_LC_ART[rdlindex].PassToFailCount - write "Consecutive Fail Count = ",$sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount - write "Cumulative Fail Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeFailCount - write "Cumulative RTS Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_3006, "F" - ut_setrequirements LCX_4010, "F" - expectedResults = FALSE - break - endif - else - if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount = 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].PassToFailCount = 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount = 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount = 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount = 0) then - write " Failed (1003;3006;4010) - Reset AP Statistics cleared an index (", rdlindex, ") that was not commanded to clear." - write "Fail to Pass Count = ",$sc_$cpu_LC_ART[rdlindex].FailToPassCount - write "Pass to Fail Count = ",$sc_$cpu_LC_ART[rdlindex].PassToFailCount - write "Consecutive Fail Count = ",$sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount - write "Cumulative Fail Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeFailCount - write "Cumulative RTS Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_3006, "F" - ut_setrequirements LCX_4010, "F" - expectedResults = FALSE - break - endif - endif - enddo - - if (expectedResults = TRUE) then - write "<*> Passed (1003;3006;4010) Reset AP Statistics command executed as expected." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_3006, "P" - ut_setrequirements LCX_4010, "P" - endif -endif - -write ";*********************************************************************" -write "; Step 8.3 Test Reset WP stats with invalid command length" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -;; CPU1 is the default -rawcmd = "18a4c000000606BC000A0000" - -if ("$CPU" = "CPU2") then - rawcmd = "19a4c000000606BC000A0000" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa4c000000606BC000A0000" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - - -write ";*********************************************************************" -write "; Step 8.4 Test Reset AP stats with invalid command length" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -;; CPU1 is the default -rawcmd = "18a4c000000605BC000A0000" - -if ("$CPU" = "CPU2") then - rawcmd = "19a4c000000605BC000A0000" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa4c000000605BC000A0000" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 9.0: Reset All WP and AP Statistics Testing" -write "; This series of tests verify that the statistics are reset correctly." -write "; These steps to get the WRT and ART to be non-zero do not verify the" -write "; correctness of the data" -write ";*********************************************************************" -write "; Step 9.1 Make the WRT counters non-zero and then issue the WRT reset" -write "; all command." -write ";*********************************************************************" - -CmdStatus = CMDSUCCESS - -;; use test app to set the WRT counters to non-zero -/$SC_$CPU_TST_LC_SETWRT -wait 5 - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) -wait 5 - -for rdlindex = 0 to LC_MAX_WATCHPOINTS-1 do - if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].FtoTValue = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].TtoFValue = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp = 0) or ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp = 0) then - write ";*********************************************************************" - write "; ERROR IN TEST APPLICATION: SetWRT did not work" - write ";*********************************************************************" - CmdStatus = CMDFAIL - endif -enddo - -if (CmdStatus = CMDSUCCESS) then - ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WPSTATS_INF_EID, "INFO", 1 - cmdctr = $SC_$CPU_LC_CMDPC + 1 - /$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF - ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 - - if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1003;4013) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4013, "P" - else - write " Failed (1003;4013) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4013, "F" - endif - - s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) - wait 5 - - ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} - - if (UT_TW_status = UT_Success) then - for rdlindex = 0 to LC_MAX_WATCHPOINTS-1 do - if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].FtoTValue = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].TtoFValue = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp = 0) and ;; - ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp = 0) then - write "<*> Passed (1003;2004;4013) Reset All WP Statistics command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_2004, "P" - ut_setrequirements LCX_4013, "P" - else - write " Failed (1003;2004;4013) - Reset All WP Statistics command not sent properly (", ut_sc_status, ")." - write "WP = ", rdlindex - write "Evaluation Count = ", $sc_$cpu_LC_WRT[rdlindex].EvaluationCount - write "False to True Count = ", $sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount - write "Consecutive True Count = ", $sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount - write "Cumulative True Count = ", $sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount - write "False to True Value = ", $sc_$cpu_LC_WRT[rdlindex].FtoTValue - write "Time Stamp (seconds) = ", $sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp - write "Time Stamp (subseconds) = ", $sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp - write "True to False Value = ", $sc_$cpu_LC_WRT[rdlindex].TtoFValue - write "Time Stamp (seconds) = ", $sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp - write "Time Stamp (subseconds) = ", $sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_2004, "F" - ut_setrequirements LCX_4013, "F" - break - endif - enddo - else - write " Failed (1003;2004;4013) - Reset All WP Statistics command not sent properly (", ut_sc_status, ")." - write "WP = ", rdlindex - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_2004, "F" - ut_setrequirements LCX_4013, "F" - endif -endif - -write ";*********************************************************************" -write "; Step 9.2 Make the ART counters non-zero and then issue the ART reset" -write "; all command. " -write ";*********************************************************************" - -CmdStatus = CMDSUCCESS - -;; use test app to set the ART counters to non-zero -/$SC_$CPU_TST_LC_SETART -wait 5 - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do - if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount = 0) or ;; - ($sc_$cpu_LC_ART[rdlindex].PassToFailCount = 0) or ;; - ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount = 0) or ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount = 0) or ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount = 0) then - write ";*********************************************************************" - write "; ERROR IN TEST APPLICATION: SetART did not work" - write ";*********************************************************************" - CmdStatus = CMDFAIL - endif -enddo - -if (CmdStatus = CMDSUCCESS) then - ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATS_INF_EID, "INFO", 1 - cmdctr = $SC_$CPU_LC_CMDPC + 1 - /$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF - ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 - - if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1003;4011) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4011, "P" - else - write " Failed (1003;4011) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4011, "F" - endif - - s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) - wait 5 - - ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} - - if (UT_TW_status = UT_Success) then - for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do - if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount = 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].PassToFailCount = 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount = 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount = 0) and ;; - ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount = 0) then - write "<*> Passed (1003;3006;4011) Reset All AP Statistics command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_3006, "P" - ut_setrequirements LCX_4011, "P" - else - write " Failed (1003;3006;4011) - Reset All AP Statistics command not sent properly (", ut_sc_status, ")." - write "AP = ", rdlindex - write "Fail to Pass Count = ",$sc_$cpu_LC_ART[rdlindex].FailToPassCount - write "Pass to Fail Count = ",$sc_$cpu_LC_ART[rdlindex].PassToFailCount - write "Consecutive Fail Count = ",$sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount - write "Cumulative Fail Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeFailCount - write "Cumulative RTS Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_3006, "F" - ut_setrequirements LCX_4011, "F" - break - endif - enddo - else - write " Failed (1003;3006;4011) - Reset All AP Statistics command not sent properly (", ut_sc_status, ")." - write "AP = ", rdlindex - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_3006, "F" - ut_setrequirements LCX_4011, "F" - endif -endif - -write ";*********************************************************************" -write "; Step 10.0: Invalid WP and AP Number Testing" -write ";*********************************************************************" -write "; Step 10.1 Test setting APSTATE to active with an invalid AP #" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_APNUM_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 -State = LC_APSTATE_ACTIVE - -/$SC_$CPU_LC_SETAPSTATE APNumber=180 NewAPState=State -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_APNUM_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 10.2: Test setting APSTATE to passive with an invalid AP #" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_APNUM_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 -State = LC_APSTATE_PASSIVE - -/$SC_$CPU_LC_SETAPSTATE APNumber=222 NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_APNUM_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 10.3: Test setting APSTATE to disable with an invalid AP #" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_APNUM_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 -State = LC_APSTATE_DISABLED - -/$SC_$CPU_LC_SETAPSTATE APNumber=254 NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_APNUM_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 10.4 Test setting PERMOFF with an invalid AP#" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_APNUM_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -/$SC_$CPU_LC_SETAPPERMOFF APNumber=260 - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APOFF_APNUM_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 10.5 Test for Sample command with invalid AP #" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_APNUM_ERR_EID, "ERROR", 1 - -;; CPU1 is the default -rawcmd = "18a6c00000070000fffc00000000" - -if ("$CPU" = "CPU2") then - rawcmd = "19a6c00000070000fffc00000000" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa6c00000070000fffc00000000" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSAMPLE_APNUM_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 10.6 Sample on AP not used and perm off" -write ";*********************************************************************" -write "; Step 10.6.1: Test Sample on AP not used" -write ";*********************************************************************" -local apNotUsed=0 - -;; Find an AP that is Perm Off -for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[rdlindex].CurrentState = LC_ACTION_NOT_USED) then - apNotUsed = rdlIndex - break - endif -enddo - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_CURR_ERR_EID, "ERROR", 1 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=apNotUsed EndAP=apNotUsed UpdateAge=0 - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSAMPLE_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 10.6.2: Test Sample on AP perm off " -write ";*********************************************************************" -local apPermOff=0 - -;; Find an AP that is Perm Off -for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do - if (p@$SC_$CPU_LC_ART[rdlindex].CurrentState = "Permanently Disabled") then - apPermOff = rdlIndex - break - endif -enddo - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_CURR_ERR_EID, "ERROR", 1 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=apPermOff EndAP=apPermOff UpdateAge=0 - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSAMPLE_CURR_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 10.7 Test Reset WP stats with invalid WP number" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WPSTATS_WPNUM_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -/$SC_$CPU_LC_RESETWPSTATS WPNumber=250 - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_WPSTATS_WPNUM_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 10.8 Test Reset AP stats with invalid AP number" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATS_APNUM_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -/$SC_$CPU_LC_RESETAPSTATS APNumber=250 - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATS_APNUM_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 11.0: Invalid command Testing" -write ";*********************************************************************" -write "; Step 11.1: Invalid command number" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_CC_ERR_EID, "ERROR", 1 - -errcnt = $SC_$CPU_LC_CMDEC + 1 - -;; CPU1 is the default -rawcmd = "18a4c000000108BC" - -if ("$CPU" = "CPU2") then - rawcmd = "19a4c000000108BC" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa4c000000108BC" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1002;1004) - Command Rejected Counter incremented." - ut_setrequirements LCX_1002, "P" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." - ut_setrequirements LCX_1002, "F" - ut_setrequirements LCX_1004, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_CC_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 11.2: Invalid Sample Command length" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_LEN_ERR_EID, "ERROR", 1 - -;; CPU1 is the default -rawcmd = "18a6c00000000000" - -if ("$CPU" = "CPU2") then - rawcmd = "19a6c00000000000" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa6c00000000000" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 - -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSAMPLE_LEN_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - - -write ";*********************************************************************" -write "; Step 11.3: Invalid HK Command length" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_HKREQ_LEN_ERR_EID, "ERROR", 1 - -rawcmd = "" - -;; CPU1 is the default -rawcmd = "18a5c00000000000" - -if ("$CPU" = "CPU2") then - rawcmd = "19a5c00000000000" -elseif ("$CPU" = "CPU3") then - rawcmd = "1aa5c00000000000" -endif - -ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) - -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 - -if (UT_TW_Status = UT_Success) THEN - write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1004, "P" -else - write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_HKREQ_LEN_ERR_EID, "." - ut_setrequirements LCX_1004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 12.0: Clean-up" -write ";*********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_gencmds " -write ";*********************************************************************" -ENDPROC - +PROC $sc_$cpu_lc_gencmds +;******************************************************************************* +; Test Name: lc_gencmds +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) +; application general commands function properly. All LC commands will be +; tested as well as invalid commands and an application reset to see if +; the LC application behaves appropriately +; +; Requirements Tested +; LC1000 Upon receipt of a No-Op command, LC shall increment the LC +; Valid Command Counter and generate an event message. +; LC1001 Upon receipt of a Reset command, LC shall reset the following +; housekeeping variables to a value of zero: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Actionpoint Sample Count +; e) TLM Count +; f) RTS Execution Counter +; LC1002 For all LC commands, if the length contained in the message +; header is not equal to the expected length, LC shall reject the +; command and issue an event message. +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message. +; LC1004 If LC rejects any command, LC shall abort the command +; execution, increment the LC Command Rejected Counter and issue +; an event message +; LC2004 For each Watchpoint, the flight software shall maintain the +; following statistics in the dump-only Watchpoint Results Table: +; a) The result of the last relational comparison (False, True, +; Error or Stale) +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) Most recent FALSE to TRUE transition value +; g) Most recent FALSE to TRUE transition timestamp +; h) Most recent TRUE to FALSE transition value +; i) Most recent TRUE to FALSE transition timestamp +; j) Most recent comparison age +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample(Pass,Fail,Error,or Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result = +; Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC4001 Upon receipt of a Set LC Application State to Passive Command, +; LC shall set the LC Application State to Passive +; LC4002 Upon receipt of a Set LC Application State to Disable Command, +; LC shall set the LC Application State to Disabled +; LC4003 Upon receipt of a Set Actionpoint to Active Command, LC shall +; set the state for the command-specified Actionpoint to ACTIVE +; such that the actionpoint is evaluated and the table-defined +; actions are taken based on the evaluation +; LC4004 Upon receipt of a Set All Actionpoints to Active Command, LC +; shall set the state for all Actionpoints to ACTIVE such that the +; actionpoints are evaluated and the table-defined actions are +; taken based on the evaluation +; LC4005 Upon receipt of a Set Actionpoint to Passive Command, LC shall +; set the state for the command-specified Actionpoint to PASSIVE +; such that the actionpoint is evaluated, however, no actions +; are taken +; LC4006 Upon receipt of a Set All Actionpoints to Passive Command, LC +; shall set the state for the all Actionpoints to PASSIVE such +; that all actionpoints are evaluated, however, no actions are +; taken +; LC4007 Upon receipt of a Set Actionpoint to Disabled Command, LC shall +; set the state for the command-specified Actionpoint to DISABLED +; such that the actionpoints are not evaluated and no actions +; are taken +; LC4008 Upon receipt of a Set All Actionpoints to Disabled Command, LC +; shall set the state for all Actionpoint to DISABLED such that: +; a) the actionpoints are not evaluated +; b) no actions are taken +; c) no event messages generated. +; LC4009 Upon receipt of a Set Actionpoint to Permanent Disable, LC +; shall mark the command-specified Actionpoint such that the +; Actionpoint cannot be Activated +; LC4009.1 If a command is received to Activate an Actionpoint which has +; been permanently disabled, the command shall be rejected. +; LC4010 Upon receipt of a Reset Actionpoint Statistics command, LC +; shall set to zero, all the following Actionpoint Statistics for +; the command-specified Actionpoints: +; a) Total number of FAIL to PASS transitions +; b) Total number of PASS to FAIL transitions +; c) Number of consecutive FAIL results +; d) Total number of FAIL results +; e) Total number of RTS executions +; f) Total number of event messages sent relating to that +; Actionpoint +; LC4011 Upon receipt of a Reset All Actionpoint Statistics command, LC +; shall set to zero, all the following Actionpoint Statistics for +; all Actionpoints: +; a) Total number of FAIL to PASS transitions +; b) Total number of PASS to FAIL transitions +; c) Number of consecutive FAIL results +; d) Total number of FAIL results +; e) Total number of RTS executions +; f) Total number of event messages sent relating to that +; Actionpoint +; LC4012 Upon receipt of a Reset Watchpoint Statistics command, LC shall +; set to zero all of the following Watchpoint Statistics for the +; command-specified Watchpoints: +; a) Total sample count for this watchpoint +; b) Number of times result transitioned from FALSE to TRUE +; c) Number of consecutive TRUE results +; d) Total number of TRUE results +; e) Most recent FALSE to TRUE transistion value +; f) Most recent FALSE to TRUE transistion timestamp +; g) Most recent TRUE to FALSE transistion value +; h) Most recent TRUE to FALSE transistion timestamp +; LC4013 Upon receipt of a Reset All Watchpoint Statistics command, LC +; shall set to zero all of the following Watchpoint Statistics for +; all Watchpoints: +; a) Total sample count for this watchpoint +; b) Number of times result transitioned from FALSE to TRUE +; c) Number of consecutive TRUE results +; d) Total number of TRUE results +; e) Most recent FALSE to TRUE transistion value +; f) Most recent FALSE to TRUE transistion timestamp +; g) Most recent TRUE to FALSE transistion value +; h) Most recent TRUE to FALSE transistion timestamp +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; telemetry) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded +; a True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result = +; Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 09/27/12 Walt Moleski Original Procedure for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files for +; testing +; lc_adt1 Sets up the Actionpoint Definition table files for +; testing +; +; Expected Test Results and Analysis +; +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "to_lab_events.h" +#include "lc_msgdefs.h" +#include "lc_platform_cfg.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_1000 0 +#define LC_1001 1 +#define LC_1002 2 +#define LC_1003 3 +#define LC_1004 4 +#define LC_2004 5 +#define LC_3006 6 +#define LC_4000 7 +#define LC_4001 8 +#define LC_4002 9 +#define LC_4003 10 +#define LC_4004 11 +#define LC_4005 12 +#define LC_4006 13 +#define LC_4007 14 +#define LC_4008 15 +#define LC_4009 16 +#define LC_40091 17 +#define LC_4010 18 +#define LC_4011 19 +#define LC_4012 20 +#define LC_4013 21 +#define LC_8000 22 +#define LC_9000 23 +#define LC_9001 24 +#define LC_9002 25 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +#define CMDFAIL 1 +#define CMDSUCCESS 2 +global ut_req_array_size = 25 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1000","LC_1001", ;; + "LC_1002","LC_1003","LC_1004","LC_2004","LC_3006","LC_4000", ;; + "LC_4001","LC_4002","LC_4003","LC_4004","LC_4005","LC_4006", ;; + "LC_4007","LC_4008","LC_4009","LC_4009.1","LC_4010","LC_4011", ;; + "LC_4012","LC_4013","LC_8000","LC_9000","LC_9001","LC_9002"] + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL rawcmd +LOCAL stream1 +LOCAL index +LOCAL wpindex, wrtAppId +LOCAL apindex, artAppId +LOCAL ADTentries = 12 +LOCAL APResults = ADTentries/2 +LOCAL WDTentries = 30 +LOCAL CmdStatus +LOCAL State +Local rdlindex +Local cmdctr +Local maxwp = LC_MAX_WATCHPOINTS - 1 +Local maxap = LC_MAX_ACTIONPOINTS - 1 +local expectedResults +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local WRTTblName = LCAppName & ".LC_WRT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" +write "; to the spacecraft default file location for the LC application. " +write ";********************************************************************" +s $SC_$CPU_lc_wdt1 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +;; Build the Actionpoint Definition Table +s $SC_$CPU_lc_adt1 + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, hostCPU, "P") + +;; Display the pages used by this test +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the LC HK packet ID, WRT and ART appIds based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" +wrtAppId = "0FB9" +artAppId = "0FB8" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 12 APs that are being used +;;255 is because they are disabled and not measured + for apindex = 1 to APResults do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = APResults+1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - WP or AP Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC =", $SC_$CPU_LC_CMDPC + write " CMDEC =", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT =", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE =", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT =", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001) - Watchpoint Results Table NOT initialized at startup. Index = ",index + write " Index of failure =", index + write " WatchResults =", $SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count =", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count =", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True =", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count =", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value =", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value =", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" +else + write "<*> Passed (9001) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002) - Actionpoint Results Table NOT initialized at startup. Index = ",index + write " Index of failure =", index + write " Action Results =", $SC_$CPU_LC_ART[index].ActionResult + write " Current State =", $SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" +else + write "<*> Passed (9002) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" +endif + +write ";*********************************************************************" +write "; Step 1.6: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 1 + +;; Enable DEBUG events for the SC and CFE_TBL application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 2.0: No-op Testing" +write ";*********************************************************************" +write "; Step 2.1: Send valid No-op command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_NOOP_INF_EID, "INFO", 1 + +ut_sendcmd "$SC_$CPU_LC_NOOP" +if (ut_sc_status = UT_SC_Success) then + write "<*> Passed (1000;1003) - NOOP command sent properly." + ut_setrequirements LC_1000, "P" + ut_setrequirements LC_1003, "P" +else + write " Failed (1000;1003) - NOOP command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1000, "F" + ut_setrequirements LC_1003, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1000;1003) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1000, "P" + ut_setrequirements LC_1003, "P" +else + write " Failed (1000;1003) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_NOOP_INF_EID, "." + ut_setrequirements LC_1000, "F" + ut_setrequirements LC_1003, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2: Send No-op command with invalid command length" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 + +local errcnt = $SC_$CPU_LC_CMDEC + 1 + +;; CPU1 is the default +rawcmd = "18a4c000000200BD" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.0: Reset Testing" +write ";*********************************************************************" +write "; Step 3.1: Send valid Reset command" +write ";*********************************************************************" +;; use test app to set the counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +wait 10 + +if ($SC_$CPU_LC_CMDPC <> 0) and ($SC_$CPU_LC_CMDEC <> 0) and ;; + ($SC_$CPU_LC_PASSRTSCNT <> 0) and ($SC_$CPU_LC_APSAMPLECNT <> 0) and ;; + ($SC_$CPU_LC_MONMSGCNT <> 0) and ($SC_$CPU_LC_RTSCNT <> 0) then + ut_setupevents "$SC", "$CPU", {LCAppName}, LC_RESET_DBG_EID, "DEBUG", 1 + /$SC_$CPU_LC_RESETCTRS + wait 5 + + ut_tlmwait $SC_$CPU_LC_CMDPC, 0 + if (UT_TW_Status = UT_Success) then + write "<*> Passed (1001;1003) - Valid Command Counter was reset." + ut_setrequirements LC_1001, "P" + ut_setrequirements LC_1003, "P" + else + write " Failed (1001;1003) - Valid Command Counter was NOT reset (",ut_tw_status,")." + ut_setrequirements LC_1001, "F" + ut_setrequirements LC_1003, "F" + endif + + ut_tlmwait $SC_$CPU_LC_CMDEC, 0 + if (UT_TW_Status = UT_Success) then + write "<*> Passed (1001) - Command Rejected Counter was reset." + ut_setrequirements LC_1001, "P" + else + write " Failed (1001) - Command Rejected Counter was NOT reset (",ut_tw_status,")." + ut_setrequirements LC_1001, "F" + endif + + ut_tlmwait $SC_$CPU_LC_PASSRTSCNT, 0 + if (UT_TW_Status = UT_Success) then + write "<*> Passed (1001) - Count of RTS sequences not initiated because application state is passive was reset." + ut_setrequirements LC_1001, "P" + else + write " Failed (1001) - Count of RTS sequences not initiated because application state is passive was NOT reset (",ut_tw_status,")." + ut_setrequirements LC_1001, "F" + endif + + ut_tlmwait $SC_$CPU_LC_APSAMPLECNT, 0 + if (UT_TW_Status = UT_Success) then + write "<*> Passed (1001) - Total Count of APs Sampled was reset." + ut_setrequirements LC_1001, "P" + else + write " Failed (1001) - Total Count of APs Sampled was NOT reset (",ut_tw_status,")." + ut_setrequirements LC_1001, "F" + endif + + ut_tlmwait $SC_$CPU_LC_MONMSGCNT, 0 + if (UT_TW_Status = UT_Success) then + write "<*> Passed (1001) - Total Count of Messages Monitored was reset." + ut_setrequirements LC_1001, "P" + else + write " Failed (1001) - Total Count of Messages Monitored was NOT reset (",ut_tw_status,")." + ut_setrequirements LC_1001, "F" + endif + + ut_tlmwait $SC_$CPU_LC_RTSCNT, 0 + if (UT_TW_Status = UT_Success) then + write "<*> Passed (1001) - Total Count of RTS Sequences Initiated was reset." + ut_setrequirements LC_1001, "P" + else + write " Failed (1001) - Total Count of RTS Sequences Initiated was NOT reset (",ut_tw_status,")." + ut_setrequirements LC_1001, "F" + endif + + if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1001, "P" + ut_setrequirements LC_1003, "P" + else + write " Failed (1001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_RESET_DBG_EID, "." + ut_setrequirements LC_1001, "F" + ut_setrequirements LC_1003, "F" + endif + + wait 5 +else + write ";*********************************************************************" + write "; ERROR IN TEST APPLICATION: SetCounters did not work" + write ";*********************************************************************" +endif + +write ";*********************************************************************" +write "; Step 3.2: Send Reset command with invalid command length" +write ";*******************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +;; CPU1 is the default +rawcmd = "18a4c000000201BC" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.0: Application State Testing" +write "; This set of steps does not verify that LC operates correctly in each" +write "; state. They verify that the state changed when the Set State Command" +write "; is issued" +write ";" +write "; NOTE: All possible transitions from active to passive to disabled" +write "; are tested." +write ";*********************************************************************" +write "; Step 4.1: Send Set LC Application State to Active" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 + +State = LC_STATE_ACTIVE + +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.2: Send Set LC Application State to Passive" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 + +State = LC_STATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then + write "<*> Passed (1003;4001) - Set LC Application State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else + write " Failed (1003;4001) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else + write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.3: Send Set LC Application State to Disable" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 + +State = LC_STATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) then + write "<*> Passed (1003;4002) - Set LC Application State to Disabled command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Set LC Application State to Disabled command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.4: Send Set LC Application State to Active" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 + +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.5: Send Set LC Application State to Disable" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 + +State = LC_STATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) then + write "<*> Passed (1003;4002) - Set LC Application State to Disable command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Set LC Application State to Disable command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.6: Send Set LC Application State to Passive" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 + +State = LC_STATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then + write "<*> Passed (1003;4001) - Set LC Application State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else + write " Failed (1003;4001) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else + write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.7: Send Set LC Application State to Active" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 + +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.8: Send Set LC Application State with an invalid" +write "; command length " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +;; CPU1 is the deafult +rawcmd = "18a4c000000602BC00010000" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.9: Send Set LC Application State with an invalid state" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +;; CPU1 is the default +rawcmd = "18a4c000000502BC00060000" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_LCSTATE_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.0: Set AP Commands Testing" +write "; NOTE: This does not test that data is processed correctly. All " +write "; possible transitions from active to passive to disabled are tested." +write ";*********************************************************************" +write "; Step 5.1: Send Set AP to Active Command for the first AP." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +index = 0 +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4003) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +;; Check the State of each entry +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if (rdlindex = 0) then + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then + expectedResults = FALSE + break + endif + elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - AP states are set as expected." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.2: Using Set AP to Active Command activate remainder of APs" +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +for index = 1 to ADTentries-1 do + + ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + + if (ut_sc_status <> UT_SC_Success) then + write " Failed (1003;4003) - Set AP to Active command not sent properly (", ut_sc_status, "). Index of failure = ", index + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" + break + endif +enddo + +;; Check if the correct number of event messages were received +if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then + write "<*> Passed (1003;4003) - The correct number of Event messages were received." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +;; Dump the Results table +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - All AP States were set to Active." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +write ";*********************************************************************" +write "; Step 5.3: Send Set AP to Passive Command for the first AP." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +index = 0 +State = LC_APSTATE_PASSIVE + +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4005) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4005, "P" +else + write " Failed (1003;4005) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4005, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +;; Check the State of each entry +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if (rdlindex = 0) then + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then + expectedResults = FALSE + break + endif + elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4005) - AP states are set as expected." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4005, "P" +else + write " Failed (1003;4005) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4005, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.4: Send the Set AP to Passive Command for the remaining APs" +write ";*********************************************************************" +State = LC_APSTATE_PASSIVE +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +for index = 1 to ADTentries-1 do + + ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + + if (ut_sc_status <> UT_SC_Success) then + write " Failed (1003;4003) - Set AP to Passive command not sent properly (", ut_sc_status, "). Index of failure = ", index + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" + break + endif +enddo + +;; Check if the correct number of event messages were received +if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then + write "<*> Passed (1003;4003) - The correct number of Event messages were received." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +;; Dump the Results table +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - All AP States were set to Passive." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set to Passive as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +write ";*********************************************************************" +write "; Step 5.5: Send the Set AP to Disabled Command for the first AP." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +index = 0 +State = LC_APSTATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4007) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4007, "P" +else + write " Failed (1003;4007) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4007, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +;; Check the State of each entry +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if (rdlindex = 0) then + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then + expectedResults = FALSE + break + endif + elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4007) - AP states are set as expected." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4007, "P" +else + write " Failed (1003;4007) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4007, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.6: Send the Set AP to Disabled Command for the remaining APs" +write ";*********************************************************************" +state = LC_APSTATE_DISABLED +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +for index = 1 to ADTentries-1 do + + ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + + if (ut_sc_status <> UT_SC_Success) then + write " Failed (1003;4003) - Set AP to Disabled command not sent properly (", ut_sc_status, "). Index of failure = ", index + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" + break + endif +enddo + +;; Check if the correct number of event messages were received +if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then + write "<*> Passed (1003;4003) - The correct number of Event messages were received." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +;; Dump the Results table +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - All AP States were set to Disabled." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set to Disabled as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +write ";*********************************************************************" +write "; Step 5.7: Send the Set AP to Active Command for the first AP." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +index = 0 +State = LC_APSTATE_ACTIVE + +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4003) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +;; Check the State of each entry +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if (rdlindex = 0) then + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then + expectedResults = FALSE + break + endif + elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - AP states are set as expected." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.8: Send the Set AP to Active Command for the remaining APs" +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +for index = 1 to ADTentries-1 do + + ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + + if (ut_sc_status <> UT_SC_Success) then + write " Failed (1003;4003) - Set AP to Active command not sent properly (", ut_sc_status, "). Index of failure = ", index + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" + break + endif +enddo + +;; Check if the correct number of event messages were received +if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then + write "<*> Passed (1003;4003) - The correct number of Event messages were received." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +;; Dump the Results table +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - All AP States were set to Active." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +write ";*********************************************************************" +write "; Step 5.9: Send the Set AP to Disabled Command for the first AP." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +index = 0 +State = LC_APSTATE_DISABLED + +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4007) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4007, "P" +else + write " Failed (1003;4007) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4007, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +;; Check the State of each entry +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if (rdlindex = 0) then + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then + expectedResults = FALSE + break + endif + elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4007) - AP states are set as expected." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4007, "P" +else + write " Failed (1003;4007) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4007, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.10: Send the Set AP to Disabled Command for the remaining APs" +write ";*********************************************************************" +State = LC_APSTATE_DISABLED +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +for index = 1 to ADTentries-1 do + + ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + + if (ut_sc_status <> UT_SC_Success) then + write " Failed (1003;4003) - Set AP to Disabled command not sent properly (", ut_sc_status, "). Index of failure = ", index + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" + break + endif +enddo + +;; Check if the correct number of event messages were received +if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then + write "<*> Passed (1003;4003) - The correct number of Event messages were received." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +;; Dump the Results table +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - All AP States were set to Disabled." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set to Disabled as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +write ";*********************************************************************" +write "; Step 5.11: Send the Set AP to Passive Command for the first AP." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +index = 0 +State = LC_APSTATE_PASSIVE + +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4005) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4005, "P" +else + write " Failed (1003;4005) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4005, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +;; Check the State of each entry +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if (rdlindex = 0) then + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then + expectedResults = FALSE + break + endif + elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_DISABLED) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4005) - AP states are set as expected." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4005, "P" +else + write " Failed (1003;4005) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4005, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.12: Sent the Set AP to Passive Command for the remaining APs" +write ";*********************************************************************" +State = LC_APSTATE_PASSIVE +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +for index = 1 to ADTentries-1 do + + ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + + if (ut_sc_status <> UT_SC_Success) then + write " Failed (1003;4003) - Set AP to Passive command not sent properly (", ut_sc_status, "). Index of failure = ", index + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" + break + endif +enddo + +;; Check if the correct number of event messages were received +if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then + write "<*> Passed (1003;4003) - The correct number of Event messages were received." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +;; Dump the Results table +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - All AP States were set to Passive." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set to Passive as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +write ";*********************************************************************" +write "; Step 5.13: Send the Set AP to Active Command for the first AP." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +index = 0 +State = LC_APSTATE_ACTIVE + +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4003) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +;; Check the State of each entry +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if (rdlindex = 0) then + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then + expectedResults = FALSE + break + endif + elseif ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_PASSIVE) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - AP states are set as expected." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. Actual State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.14: Send the Set AP to Active Command for the remaining APs" +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +for index = 1 to ADTentries-1 do + + ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + + if (ut_sc_status <> UT_SC_Success) then + write " Failed (1003;4003) - Set AP to Active command not sent properly (", ut_sc_status, "). Index of failure = ", index + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" + break + endif +enddo + +;; Check if the correct number of event messages were received +if ($SC_$CPU_find_event[1].num_found_messages = ADTentries - 1) then + write "<*> Passed (1003;4003) - The correct number of Event messages were received." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Did not rcv correct number of Event messages. Expected ",ADTentries - 1, " rcv'd ", $SC_$CPU_find_event[1].num_found_messages + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +;; Dump the Results table +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +expectedResults = TRUE +for rdlindex = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[rdlindex].CurrentState <> LC_APSTATE_ACTIVE) then + expectedResults = FALSE + break + endif +enddo + +if (expectedResults = TRUE) then + write "<*> Passed (1003;4003) - All AP States were set to Active." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - AP #", rdlindex, " was not set to Active as expected. State = ",p@$SC_$CPU_LC_ART[rdlindex].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" +endif + +write ";*********************************************************************" +write "; Step 5.15: Send the Set AP State with an invalid command length" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +;; CPU1 is the default +rawcmd = "18a4c000000603BC00010000" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.16: Send the Set AP State command with an invalid state" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_NEW_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +;; This does not have to be a raw command since there are no restrictions on +;; the NewAPState argument +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=4" + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_NEW_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.17: Send Set AP using an AP with state NOT USED" +write "; The ADT defines only 12 APs, so anything above that is unused" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_CURR_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 +index = 13 +State = LC_APSTATE_ACTIVE + +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=index NewAPState=State" + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 6.0: Set All AP Commands Testing" +write ";*********************************************************************" +write "; Step 6.1: Using the Set AP commands set to a mix of active, passive," +write "; and disabled. The ADT defines only 12 APs." +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=10 NewAPState=State" +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" +State = LC_APSTATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=11 NewAPState=State" + +;; Dump the ART to verify the state settings above +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +write ";*********************************************************************" +write "; Step 6.2: Set ALL APs to Active" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for index = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then + CmdStatus = CMDFAIL + break + endif +enddo +for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4004) - Set All APs to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, "). index = ", index + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 6.3: Using the Set AP commands set to a mix of active, passive," +write "; and disabled" +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=10 NewAPState=State" +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" +State = LC_APSTATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=11 NewAPState=State" + +;; Dump the ART to verify the state settings above +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +write ";*********************************************************************" +write "; Step 6.4: Set ALL APs to Passive" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4006) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4006, "P" +else + write " Failed (1003;4006) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4006, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for index = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then + CmdStatus = CMDFAIL + break + endif +enddo +for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4006) - Set All APs to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4006, "P" +else + write " Failed (1003;4006) - Set All APs to Passive command not sent properly (", ut_sc_status, "). index = ",index + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4006, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 6.5: Using the Set AP commands set to a mix of active, passive," +write "; and disabled" +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=10 NewAPState=State" +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" +State = LC_APSTATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=11 NewAPState=State" + +;; Dump the ART to verify the state settings above +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +write ";*********************************************************************" +write "; Step 6.6: Set ALL APs to Disabled" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 + +State = LC_APSTATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4008) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4008, "P" +else + write " Failed (1003;4008) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4008, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for index = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then + CmdStatus = CMDFAIL + break + endif +enddo +for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4008) - Set All APs to Disabled command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4008, "P" +else + write " Failed (1003;4008) - Set All APs to Disabled command not sent properly (", ut_sc_status, "). index = ",index + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4008, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 6.7: Send Set all AP with an invalid state" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_NEW_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=4" + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_NEW_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.0: Set AP to Permanent Disable Testing" +write ";*********************************************************************" +write "; Step 7.1: Using the Set AP commands set to a mix of active, passive," +write "; and disabled. The ADT defines only 10 APs." +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" +State = LC_APSTATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" + +;; Dump the ART to verify the state settings above +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +write ";*********************************************************************" +write "; Step 7.2: Set 4 AP to Permanent Disabled (1 Active, 1 Passive," +write "; 1 Disabled, 1 Not Used)" +write ";*********************************************************************" +write "; Step 7.2.1: Try to Permanently Disable an AP that is Active. This " +write "; should fail." +write ";*********************************************************************" +errcnt = $SC_$CPU_LC_CMDEC + 1 +rdlindex = 0 + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_CURR_ERR_EID, "ERROR", 1 + +/$SC_$CPU_LC_SETAPPERMOFF APNumber=0 + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} + +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.2.2: Try to Permanently Disable an AP that is Passive. This " +write "; should fail." +write ";*********************************************************************" +errcnt = $SC_$CPU_LC_CMDEC + 1 +rdlindex = 4 + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_CURR_ERR_EID, "ERROR", 1 + +/$SC_$CPU_LC_SETAPPERMOFF APNumber=4 + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 + +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.2.3: Try to Permanently Disable an AP that is Disabled. This " +write "; should pass." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_INF_EID, "INFO", 1 +rdlindex = 2 + +ut_sendcmd "$SC_$CPU_LC_SETAPPERMOFF APNumber=2" + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4009) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4009, "P" +else + write " Failed (1003;4009) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4009, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_ART[rdlindex].CurrentState = LC_APSTATE_PERMOFF) then + write "<*> NOTE: AP 2 is currently Permanently Disabled. " + write "<*> Passed (1003;4009) -Set AP to Permanently Disabled command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4009, "P" +else + write " Failed (1003;4009) - Set AP to Permanently Disabled command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4009, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.2.2: Try to Permanently Disable an AP that is Not Used. This " +write "; should fail." +write ";*********************************************************************" +errcnt = $SC_$CPU_LC_CMDEC + 1 + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_CURR_ERR_EID, "ERROR", 1 + +/$SC_$CPU_LC_SETAPPERMOFF APNumber=12 + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} + +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.3: Send Set AP to Active for an AP that is Permanently " +write "; Disabled. Using AP 2 for this test. This should fail." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_CURR_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 +State = LC_APSTATE_ACTIVE + +/$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004;4009.1) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" + ut_setrequirements LC_40091, "P" +else + write " Failed (1002;1004;4009.1) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" + ut_setrequirements LC_40091, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.4: Send Set AP to Passive for an AP that is Permanently " +write "; Disabled. Using AP 2 for this test. This should fail." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_CURR_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 +State = LC_APSTATE_PASSIVE + +/$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004;4009.1) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" + ut_setrequirements LC_40091, "P" +else + write " Failed (1002;1004;4009.1) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" + ut_setrequirements LC_40091, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.5: Send Set AP to Disabled for an AP that is Permanently " +write "; Disabled. Using AP 2 for this test. This should fail." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_CURR_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 +State = LC_APSTATE_DISABLED + +/$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004;4009.1) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" + ut_setrequirements LC_40091, "P" +else + write " Failed (1002;1004;4009.1) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" + ut_setrequirements LC_40091, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.6: Send Set AP to Permanently Disabled for an AP that is " +write "; Permanently Disabled. Using AP 2 for this test. Since the state is " +write "; not Disabled this test should fail." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_CURR_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +/$SC_$CPU_LC_SETAPPERMOFF APNumber=2 + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) AND ;; + ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (1004) - Command Rejected Counter incremented and Event message ",$SC_$CPU_find_event[1].eventid, " received." + ut_setrequirements LC_1004, "P" +elseif ($SC_$CPU_LC_CMDEC <> errcnt) then + write " Failed (1004) - Command Rejected Counter did not increment as expected." +elseif ($SC_$CPU_find_event[1].num_found_messages <> 1) then + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 8.0: Reset WP and AP Statistics Testing" +write "; This series of tests verify that the statistics are reset correctly." +write "; The steps to get the WRT and ART to be non-zero do no verify the " +write "; correctness of the data" +write ";*********************************************************************" +write "; Step 8.1 Make the WRT counters non-zero and then issue the WRT reset" +write "; for each WP individually" +write ";*********************************************************************" + +CmdStatus = CMDSUCCESS + +;; use test app to set all the WRT counters to non-zero +/$SC_$CPU_TST_LC_SETWRT +wait 5 + +;; Dump the WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) +wait 5 + +for rdlindex = 0 to LC_MAX_WATCHPOINTS-1 do + if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].FtoTValue = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].TtoFValue = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp = 0) then + write ";*********************************************************************" + write "; ERROR IN TEST APPLICATION: SetWRT did not work" + write ";*********************************************************************" + CmdStatus = CMDFAIL + endif +enddo + +if (CmdStatus = CMDSUCCESS) then + local midWP = maxwp / 2 + + ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WPSTATS_INF_EID, "INFO", 1 + + /$SC_$CPU_LC_RESETWPSTATS WPNumber=0 + /$SC_$CPU_LC_RESETWPSTATS WPNumber=maxwp + /$SC_$CPU_LC_RESETWPSTATS WPNumber=midWP + + ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 3 + if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1003;4012) - Event messages ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4012, "P" + else + write " Failed (1003;4012) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_WPSTATS_INF_EID, " 3 times." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4012, "F" + endif + + s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) + wait 5 + + expectedResults = TRUE + for rdlindex = 0 to LC_MAX_WATCHPOINTS-1 do + if (rdlindex = 0) or (rdlindex = midWP) or (rdlindex = maxwp) then + if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount <> 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount <> 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount <> 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount <> 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].FtoTValue <> 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp <> 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp <> 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].TtoFValue <> 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp <> 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp <> 0) then + write " Failed (1003;2004;4012) - Reset WP Statistics did not clear index (",rdlindex, ") as expected." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_2004, "F" + ut_setrequirements LC_4012, "F" + expectedResults = FALSE + break + endif + else + if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].FtoTValue = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].TtoFValue = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp = 0) then + write " Failed (1003;2004;4012) - WP Statistics cleared for an index (",rdlindex, ") that was not commanded to clear" + write "Evaluation Count = ", $sc_$cpu_LC_WRT[rdlindex].EvaluationCount + write "False to True Count = ", $sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount + write "Consecutive True Count = ", $sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount + write "Cumulative True Count = ", $sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount + write "False to True Value = ", $sc_$cpu_LC_WRT[rdlindex].FtoTValue + write "Time Stamp (seconds) = ", $sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp + write "Time Stamp (subseconds) = ", $sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp + write "True to False Value = ", $sc_$cpu_LC_WRT[rdlindex].TtoFValue + write "Time Stamp (seconds) = ", $sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp + write "Time Stamp (subseconds) = ", $sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_2004, "F" + ut_setrequirements LC_4012, "F" + expectedResults = FALSE + break + endif + endif + enddo + + if (expectedResults = TRUE) then + write "<*> Passed (1003;2004;4012) Reset WP Statistics commands executed as expected." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_2004, "P" + ut_setrequirements LC_4012, "P" + endif +endif + +write ";*********************************************************************" +write "; Step 8.2 Make the ART counters non-zero and then issue the ART reset" +write "; for each AP individually" +write ";*********************************************************************" + +CmdStatus = CMDSUCCESS + +;; use test app to set the ART counters to non-zero +/$SC_$CPU_TST_LC_SETART +wait 5 + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do + if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount = 0) or ;; + ($sc_$cpu_LC_ART[rdlindex].PassToFailCount = 0) or ;; + ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount = 0) or ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount = 0) or ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount = 0) then + write ";*********************************************************************" + write "; ERROR IN TEST APPLICATION: SetART did not work" + write ";*********************************************************************" + CmdStatus = CMDFAIL + endif +enddo + +if (CmdStatus = CMDSUCCESS) then + local midAP = maxap / 2 + + ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATS_INF_EID, "INFO", 1 + + /$SC_$CPU_LC_RESETAPSTATS APNumber=0 + /$SC_$CPU_LC_RESETAPSTATS APNumber=maxap + /$SC_$CPU_LC_RESETAPSTATS APNumber=midAP + + ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 3 + if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1003;4010) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4010, "P" + else + write " Failed (1003;4010) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4010, "F" + endif + + s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) + wait 5 + + expectedResults = TRUE + for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do + if (rdlindex = 0) or (rdlindex = midAP) or (rdlindex = maxap) then + if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount <> 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].PassToFailCount <> 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount <> 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount <> 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount <> 0) then + write " Failed (1003;3006;4010) - Reset AP Statistics did not clear index (", rdlindex, ") as expected." + write "Fail to Pass Count = ",$sc_$cpu_LC_ART[rdlindex].FailToPassCount + write "Pass to Fail Count = ",$sc_$cpu_LC_ART[rdlindex].PassToFailCount + write "Consecutive Fail Count = ",$sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount + write "Cumulative Fail Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeFailCount + write "Cumulative RTS Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_3006, "F" + ut_setrequirements LC_4010, "F" + expectedResults = FALSE + break + endif + else + if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount = 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].PassToFailCount = 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount = 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount = 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount = 0) then + write " Failed (1003;3006;4010) - Reset AP Statistics cleared an index (", rdlindex, ") that was not commanded to clear." + write "Fail to Pass Count = ",$sc_$cpu_LC_ART[rdlindex].FailToPassCount + write "Pass to Fail Count = ",$sc_$cpu_LC_ART[rdlindex].PassToFailCount + write "Consecutive Fail Count = ",$sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount + write "Cumulative Fail Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeFailCount + write "Cumulative RTS Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_3006, "F" + ut_setrequirements LC_4010, "F" + expectedResults = FALSE + break + endif + endif + enddo + + if (expectedResults = TRUE) then + write "<*> Passed (1003;3006;4010) Reset AP Statistics command executed as expected." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_3006, "P" + ut_setrequirements LC_4010, "P" + endif +endif + +write ";*********************************************************************" +write "; Step 8.3 Test Reset WP stats with invalid command length" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +;; CPU1 is the default +rawcmd = "18a4c000000606BC000A0000" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + + +write ";*********************************************************************" +write "; Step 8.4 Test Reset AP stats with invalid command length" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LEN_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +;; CPU1 is the default +rawcmd = "18a4c000000605BC000A0000" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LEN_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 9.0: Reset All WP and AP Statistics Testing" +write "; This series of tests verify that the statistics are reset correctly." +write "; These steps to get the WRT and ART to be non-zero do not verify the" +write "; correctness of the data" +write ";*********************************************************************" +write "; Step 9.1 Make the WRT counters non-zero and then issue the WRT reset" +write "; all command." +write ";*********************************************************************" + +CmdStatus = CMDSUCCESS + +;; use test app to set the WRT counters to non-zero +/$SC_$CPU_TST_LC_SETWRT +wait 5 + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) +wait 5 + +for rdlindex = 0 to LC_MAX_WATCHPOINTS-1 do + if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].FtoTValue = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].TtoFValue = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp = 0) or ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp = 0) then + write ";*********************************************************************" + write "; ERROR IN TEST APPLICATION: SetWRT did not work" + write ";*********************************************************************" + CmdStatus = CMDFAIL + endif +enddo + +if (CmdStatus = CMDSUCCESS) then + ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WPSTATS_INF_EID, "INFO", 1 + cmdctr = $SC_$CPU_LC_CMDPC + 1 + /$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF + ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 + + if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1003;4013) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4013, "P" + else + write " Failed (1003;4013) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4013, "F" + endif + + s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) + wait 5 + + ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} + + if (UT_TW_status = UT_Success) then + for rdlindex = 0 to LC_MAX_WATCHPOINTS-1 do + if ($sc_$cpu_LC_WRT[rdlindex].EvaluationCount = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].FtoTValue = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].TtoFValue = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp = 0) and ;; + ($sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp = 0) then + write "<*> Passed (1003;2004;4013) Reset All WP Statistics command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_2004, "P" + ut_setrequirements LC_4013, "P" + else + write " Failed (1003;2004;4013) - Reset All WP Statistics command not sent properly (", ut_sc_status, ")." + write "WP = ", rdlindex + write "Evaluation Count = ", $sc_$cpu_LC_WRT[rdlindex].EvaluationCount + write "False to True Count = ", $sc_$cpu_LC_WRT[rdlindex].FalsetoTrueCount + write "Consecutive True Count = ", $sc_$cpu_LC_WRT[rdlindex].ConsectiveTrueCount + write "Cumulative True Count = ", $sc_$cpu_LC_WRT[rdlindex].CumulativeTrueCount + write "False to True Value = ", $sc_$cpu_LC_WRT[rdlindex].FtoTValue + write "Time Stamp (seconds) = ", $sc_$cpu_LC_WRT[rdlindex].SecFtoTTimeStamp + write "Time Stamp (subseconds) = ", $sc_$cpu_LC_WRT[rdlindex].SubSecFtoTTimeStamp + write "True to False Value = ", $sc_$cpu_LC_WRT[rdlindex].TtoFValue + write "Time Stamp (seconds) = ", $sc_$cpu_LC_WRT[rdlindex].SecTtoFTimeStamp + write "Time Stamp (subseconds) = ", $sc_$cpu_LC_WRT[rdlindex].SubSecTtoFTimeStamp + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_2004, "F" + ut_setrequirements LC_4013, "F" + break + endif + enddo + else + write " Failed (1003;2004;4013) - Reset All WP Statistics command not sent properly (", ut_sc_status, ")." + write "WP = ", rdlindex + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_2004, "F" + ut_setrequirements LC_4013, "F" + endif +endif + +write ";*********************************************************************" +write "; Step 9.2 Make the ART counters non-zero and then issue the ART reset" +write "; all command. " +write ";*********************************************************************" + +CmdStatus = CMDSUCCESS + +;; use test app to set the ART counters to non-zero +/$SC_$CPU_TST_LC_SETART +wait 5 + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do + if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount = 0) or ;; + ($sc_$cpu_LC_ART[rdlindex].PassToFailCount = 0) or ;; + ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount = 0) or ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount = 0) or ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount = 0) then + write ";*********************************************************************" + write "; ERROR IN TEST APPLICATION: SetART did not work" + write ";*********************************************************************" + CmdStatus = CMDFAIL + endif +enddo + +if (CmdStatus = CMDSUCCESS) then + ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATS_INF_EID, "INFO", 1 + cmdctr = $SC_$CPU_LC_CMDPC + 1 + /$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF + ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 + + if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1003;4011) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4011, "P" + else + write " Failed (1003;4011) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APOFF_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4011, "F" + endif + + s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) + wait 5 + + ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} + + if (UT_TW_status = UT_Success) then + for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do + if ($sc_$cpu_LC_ART[rdlindex].FailToPassCount = 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].PassToFailCount = 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount = 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeFailCount = 0) and ;; + ($sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount = 0) then + write "<*> Passed (1003;3006;4011) Reset All AP Statistics command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_3006, "P" + ut_setrequirements LC_4011, "P" + else + write " Failed (1003;3006;4011) - Reset All AP Statistics command not sent properly (", ut_sc_status, ")." + write "AP = ", rdlindex + write "Fail to Pass Count = ",$sc_$cpu_LC_ART[rdlindex].FailToPassCount + write "Pass to Fail Count = ",$sc_$cpu_LC_ART[rdlindex].PassToFailCount + write "Consecutive Fail Count = ",$sc_$cpu_LC_ART[rdlindex].ConsecutiveFailCount + write "Cumulative Fail Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeFailCount + write "Cumulative RTS Count = ",$sc_$cpu_LC_ART[rdlindex].CumulativeRTSExecCount + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_3006, "F" + ut_setrequirements LC_4011, "F" + break + endif + enddo + else + write " Failed (1003;3006;4011) - Reset All AP Statistics command not sent properly (", ut_sc_status, ")." + write "AP = ", rdlindex + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_3006, "F" + ut_setrequirements LC_4011, "F" + endif +endif + +write ";*********************************************************************" +write "; Step 10.0: Invalid WP and AP Number Testing" +write ";*********************************************************************" +write "; Step 10.1 Test setting APSTATE to active with an invalid AP #" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_APNUM_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 +State = LC_APSTATE_ACTIVE + +/$SC_$CPU_LC_SETAPSTATE APNumber=180 NewAPState=State +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_APNUM_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 10.2: Test setting APSTATE to passive with an invalid AP #" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_APNUM_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 +State = LC_APSTATE_PASSIVE + +/$SC_$CPU_LC_SETAPSTATE APNumber=222 NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_APNUM_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 10.3: Test setting APSTATE to disable with an invalid AP #" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_APNUM_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 +State = LC_APSTATE_DISABLED + +/$SC_$CPU_LC_SETAPSTATE APNumber=254 NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATE_APNUM_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 10.4 Test setting PERMOFF with an invalid AP#" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APOFF_APNUM_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +/$SC_$CPU_LC_SETAPPERMOFF APNumber=260 + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APOFF_APNUM_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 10.5 Test for Sample command with invalid AP #" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_APNUM_ERR_EID, "ERROR", 1 + +;; CPU1 is the default +rawcmd = "18a6c00000070000fffc00000000" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSAMPLE_APNUM_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 10.6 Sample on AP not used and perm off" +write ";*********************************************************************" +write "; Step 10.6.1: Test Sample on AP not used" +write ";*********************************************************************" +local apNotUsed=0 + +;; Find an AP that is Perm Off +for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[rdlindex].CurrentState = LC_ACTION_NOT_USED) then + apNotUsed = rdlIndex + break + endif +enddo + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_CURR_ERR_EID, "ERROR", 1 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=apNotUsed EndAP=apNotUsed UpdateAge=0 + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSAMPLE_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 10.6.2: Test Sample on AP perm off " +write ";*********************************************************************" +local apPermOff=0 + +;; Find an AP that is Perm Off +for rdlindex = 0 to LC_MAX_ACTIONPOINTS-1 do + if (p@$SC_$CPU_LC_ART[rdlindex].CurrentState = "Permanently Disabled") then + apPermOff = rdlIndex + break + endif +enddo + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_CURR_ERR_EID, "ERROR", 1 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=apPermOff EndAP=apPermOff UpdateAge=0 + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSAMPLE_CURR_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 10.7 Test Reset WP stats with invalid WP number" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WPSTATS_WPNUM_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +/$SC_$CPU_LC_RESETWPSTATS WPNumber=250 + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_WPSTATS_WPNUM_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 10.8 Test Reset AP stats with invalid AP number" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATS_APNUM_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +/$SC_$CPU_LC_RESETAPSTATS APNumber=250 + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ", LC_APSTATS_APNUM_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 11.0: Invalid command Testing" +write ";*********************************************************************" +write "; Step 11.1: Invalid command number" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_CC_ERR_EID, "ERROR", 1 + +errcnt = $SC_$CPU_LC_CMDEC + 1 + +;; CPU1 is the default +rawcmd = "18a4c000000108BC" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_LC_CMDEC, {errcnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1002;1004) - Command Rejected Counter incremented." + ut_setrequirements LC_1002, "P" + ut_setrequirements LC_1004, "P" +else + write " Failed (1002;1004) - Command Rejected Counter did not increment as expected." + ut_setrequirements LC_1002, "F" + ut_setrequirements LC_1004, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_CC_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 11.2: Invalid Sample Command length" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_LEN_ERR_EID, "ERROR", 1 + +;; CPU1 is the default +rawcmd = "18a6c00000000000" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 + +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSAMPLE_LEN_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + + +write ";*********************************************************************" +write "; Step 11.3: Invalid HK Command length" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_HKREQ_LEN_ERR_EID, "ERROR", 1 + +rawcmd = "" + +;; CPU1 is the default +rawcmd = "18a5c00000000000" + +ut_sendrawcmd "$SC_$CPU_LC", (rawcmd) + +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 + +if (UT_TW_Status = UT_Success) THEN + write "<*> Passed (1004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1004, "P" +else + write " Failed (1004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_HKREQ_LEN_ERR_EID, "." + ut_setrequirements LC_1004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 12.0: Clean-up" +write ";*********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_gencmds " +write ";*********************************************************************" +ENDPROC + diff --git a/test_and_ground/asist/prc/template/template_lcx_monitoring.prc b/test_and_ground/asist/prc/template/template_lc_monitoring.prc similarity index 82% rename from test_and_ground/asist/prc/template/template_lcx_monitoring.prc rename to test_and_ground/asist/prc/template/template_lc_monitoring.prc index c459285..eee8d03 100644 --- a/test_and_ground/asist/prc/template/template_lcx_monitoring.prc +++ b/test_and_ground/asist/prc/template/template_lc_monitoring.prc @@ -1,2528 +1,2464 @@ -PROC $sc_$cpu_lcx_monitoring -;******************************************************************************* -; Test Name: lcx_monitoring -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker (LC) functions -; properly when monitoring WatchPoints (WP). All WP evaluate to false so -; no thresholds will be reached to cause ActionPoints (AP) to take action. -; During this test the LC is set as follows: -; LC Active with all AP disabled. -; LC Active with all AP active. -; LC Active with all AP passive -; LC Active with AP in mix of states (active, passive, disabled, -; permanently disabled, unused) -; LC Passive with all AP active -; LC Disabled with all AP active -; -; Requirements Tested -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message -; LCX2003 Upon receipt of a message, LCX shall compare the data in the -; message to the table-defined value using the table-defined -; comparison value and comparison operator for each data point -; defined in the Watchpoint Definition Table (WDT) if the LCX -; Application State is one of the following: -; a) Active -; b) Passive -; LCX2003.2 LCX shall support the following comparison values: -; a) = -; b) != -; c) > -; d) >= -; e) < -; f) <= -; LCX2003.3 If the WDT comparison operator specifies that a Custom Function -; shall be performed, LCX shall apply the custom function to the -; data contained in the message -; LCX2004 For each Watchpoint, the flight software shall maintain the -; following statistics in the dump-only Watchpoint Results Table: -; a) The result of the last relational comparison (False, True, -; Error or Stale) -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) Most recent FALSE to TRUE transition value -; g) Most recent FALSE to TRUE transition timestamp -; h) Most recent TRUE to FALSE transition value -; i) Most recent TRUE to FALSE transition timestamp -; LCX3001 Upon receipt of a Sample Request, LCX shall process the request -; specified actionpoints defined in the Actionpoint Definition -; Table (ADT) if the LCX Application State is one of the -; following: -; a) Active -; b) Passive -; LCX3001.1 LCX shall support the following Reverse Polish Operators: -; a) and -; b) or -; c) xor -; d) not -; e) equals -; LCX3002 Each table-defined Actionpoint shall be evaluated and the -; results stored in the dump-only Actionpoint Results Table if the -; Actionpoint state is either: -; a) Active -; b) Passive -; LCX3003 If the Actionpoint is Disabled, LCX shall skip processing that -; actionpoint -; LCX3004 If the Actionpoint is Unused, LCX shall skip processing that -; actionpoint -; LCX3005 If the Actionpoint is Permanently Disabled, LCX shall skip -; processing that actionpoint -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample(Pass,Fail,Error, or Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result = -; Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LCX Application to Active -; LCX4001 Upon receipt of a Set LCX Application State to Passive Command, -; LC shall set the LCX Application State to Passive -; LCX4002 Upon receipt of a Set LCX Application State to Disable Command, -; LC shall set the LCX Application State to Disabled -; LCX4003 Upon receipt of a Set Actionpoint to Active Command, LCX shall -; set the state for the command-specified Actionpoint to ACTIVE -; such that the actionpoint is evaluated and the table-defined -; actions are taken based on the evaluation -; LCX4004 Upon receipt of a Set All Actionpoints to Active Command, LCX -; shall set the state for all Actionpoints to ACTIVE such that the -; actionpoints are evaluated and the table-defined actions are -; taken based on the evaluation -; LCX4005 Upon receipt of a Set Actionpoint to Passive Command, LCX shall -; set the state for the command-specified Actionpoint to PASSIVE -; such that the actionpoint is evaluated, however, no actions -; are taken -; LCX4006 Upon receipt of a Set All Actionpoints to Passive Command, LCX -; shall set the state for the all Actionpoints to PASSIVE such -; that all actionpoints are evaluated, however, no actions are -; taken -; LCX4007 Upon receipt of a Set Actionpoint to Disabled Command, LCX shall -; set the state for the command-specified Actionpoint to DISABLED -; such that the actionpoints are not evaluated and no actions -; are taken -; LC4008 Upon receipt of a Set All Actionpoints to Disabled Command, LCX -; shall set the state for all Actionpoint to DISABLED such that: -; a) the actionpoints are not evaluated -; b) no actions are taken -; c) no event messages generated. -; LCX4009 Upon receipt of a Set Actionpoint to Permanent Disable, LCX -; shall mark the command-specified Actionpoint such that the -; Actionpoint cannot be Activated -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LC Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; telemetry) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LC State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded -; a True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result =Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX9005 Upon any initialization, LCX shall validate the Watchpoint -; Definition Table for the following: -; a) valid operator -; b) data size -; c) Message ID -; LCX9006 Upon any initialization, LCX shall validate the Actionpoint -; Definition Table for the following: -; a) valid default state -; b) RTS number (in range) -; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) -; d) Failure Count (in range) -; e) Action Equation syntax -; LCX9007 Upon any initialization, LCX shall subscribe to the messages -; defined in the WDT. -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 Walt Moleski Original Procedure for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lcx_wdt1 Sets up the Watchpoint Definition table files -; lcx_adt1b Sets up the Actionpoint Definition table files -; -; Expected Test Results and Analysis -; -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "to_lab_events.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1003 0 -#define LCX_2003 1 -#define LCX_20032 2 -#define LCX_20033 3 -#define LCX_2004 4 -#define LCX_3001 5 -#define LCX_30011 6 -#define LCX_3002 7 -#define LCX_3003 8 -#define LCX_3004 9 -#define LCX_3005 10 -#define LCX_3006 11 -#define LCX_4000 12 -#define LCX_4001 13 -#define LCX_4002 14 -#define LCX_4003 15 -#define LCX_4004 16 -#define LCX_4005 17 -#define LCX_4006 18 -#define LCX_4007 19 -#define LCX_4008 20 -#define LCX_4009 21 -#define LCX_8000 22 -#define LCX_9000 23 -#define LCX_9001 24 -#define LCX_9002 25 -#define LCX_9005 26 -#define LCX_9006 27 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -#define CMDFAIL 1 -#define CMDSUCCESS 2 -global ut_req_array_size = 27 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1003","LCX_2003", ;; - "LCX_2003.2","LCX_2003.3","LCX_2004","LCX_3001","LCX_3001.1","LCX_3002", ;; - "LCX_3003","LCX_3004","LCX_3005","LCX_3006","LCX_4000","LCX_4001", ;; - "LCX_4002","LCX_4003","LCX_4004","LCX_4005","LCX_4006","LCX_4007", ;; - "LCX_4008","LCX_4009","LCX_8000","LCX_9000","LCX_9001","LCX_9002", ;; - "LCX_9005","LCX_9006"] - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL rawcmd -LOCAL stream1 -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL ADTentries = 12 -LOCAL APResultEntries = ADTentries/2 -LOCAL WDTentries = 30 -LOCAL CmdStatus -LOCAL State -Local rdlindex -Local maxwp = LC_MAX_WATCHPOINTS - 1 -Local maxap = LC_MAX_ACTIONPOINTS - 1 -Local MsgId[20] -Local Size -Local Pattern[32] -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local ARTTblName = LCAppName & ".LC_ART" -local WRTTblName = LCAppName & ".LC_WRT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Creating the WDT and ADT used for testing and upload it" -write ";********************************************************************" -s $SC_$CPU_lcx_wdt1 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file("CF:0/apps", "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -;; Generate the Actionpoint Definition Table -s $SC_$CPU_lcx_adt1b - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file("CF:0/apps", "lc_def_adt1b.tbl", adtFileName, "$CPU", "P") - -;; Display the pages used by this test -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " -write "; initialized to zero (0). " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId, artPktId, wrtPktId - -;; Set the SC HK packet ID based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" -artPktId = "0FB8" -wrtPktId = "0FB9" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" - artPktId = "0FD6" - wrtPktId = "0FD7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" - artPktId = "0FF6" - wrtPktId = "0FF7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being received." - ut_setrequirements LCX_8000, "P" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 12 APs that are being used -;;255 is because they are disabled and not measured - for apindex = 1 to APResultEntries do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = APResultEntries+1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000;9005;9006) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_9005, "F" - ut_setrequirements LCX_9006, "F" - else - write "<*> Passed (9000;9005;9006) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - ut_setrequirements LCX_9005, "P" - ut_setrequirements LCX_9006, "P" - endif -else - write " Failed (9000;9005;9006) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_9005, "F" - ut_setrequirements LCX_9006, "F" -endif - -;; Dump the WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtPktId) -wait 5 - -;check initialization of WRT -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001) - Watchpoint Results Table NOT initialized at startup." - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" -else - write "<*> Passed (9001) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" -endif - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -;check initialization of ART -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002) - Actionpoint Results Table NOT initialized at startup." - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" -else - write "<*> Passed (9002) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" -endif - -write ";*********************************************************************" -write "; Step 1.6: Setup Data Packet message ids " -write ";*********************************************************************" -;; For CPU1 use CPU2 Message IDs -MsgId[1] = 0x987 -MsgId[2] = 0x988 -MsgId[3] = 0x989 -MsgId[4] = 0x98a -MsgId[5] = 0x98b -MsgId[6] = 0x98c -MsgId[7] = 0x98d -MsgId[8] = 0x98e -MsgId[9] = 0x98f -MsgId[10] = 0x990 -MsgId[11] = 0x991 -MsgId[12] = 0x992 -MsgId[13] = 0x993 -MsgId[14] = 0x994 -MsgId[15] = 0x995 -MsgId[16] = 0x996 -MsgId[17] = 0x997 -MsgId[18] = 0x998 -MsgId[19] = 0x999 -MsgId[20] = 0x99a - -if ("$CPU" = "CPU2") then - ;; Use CPU3 Message IDs - MsgId[1] = 0xa87 - MsgId[2] = 0xa88 - MsgId[3] = 0xa89 - MsgId[4] = 0xa8a - MsgId[5] = 0xa8b - MsgId[6] = 0xa8c - MsgId[7] = 0xa8d - MsgId[8] = 0xa8e - MsgId[9] = 0xa8f - MsgId[10] = 0xa90 - MsgId[11] = 0xa91 - MsgId[12] = 0xa92 - MsgId[13] = 0xa93 - MsgId[14] = 0xa94 - MsgId[15] = 0xa95 - MsgId[16] = 0xa96 - MsgId[17] = 0xa97 - MsgId[18] = 0xa98 - MsgId[19] = 0xa99 - MsgId[20] = 0xa9a -elseif ("$CPU" = "CPU3") then - ;; Use CPU1 Message IDs - MsgId[1] = 0x887 - MsgId[2] = 0x888 - MsgId[3] = 0x889 - MsgId[4] = 0x88a - MsgId[5] = 0x88b - MsgId[6] = 0x88c - MsgId[7] = 0x88d - MsgId[8] = 0x88e - MsgId[9] = 0x88f - MsgId[10] = 0x890 - MsgId[11] = 0x891 - MsgId[12] = 0x892 - MsgId[13] = 0x893 - MsgId[14] = 0x894 - MsgId[15] = 0x895 - MsgId[16] = 0x896 - MsgId[17] = 0x897 - MsgId[18] = 0x898 - MsgId[19] = 0x899 - MsgId[20] = 0x89a -endif - -write ";*********************************************************************" -write "; Step 2.0: Test LC Passive, All Ap Active, no thresholds are reached" -write ";*********************************************************************" -write "; Step 2.1: Send a Set LC Application State to Passive Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_PASSIVE - -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then - write "<*> Passed (1003;4001) - Set LC Application State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else - write " Failed (1003;4001) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else - write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2: Send a Set All APs to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then - CmdStatus = CMDFAIL - break - endif -enddo -for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4004) - Set All APs to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, ")." - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.3 Send packets for all WP defined in WDT" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendmonpackets("2.3") - -write ";*********************************************************************" -write "; Step 2.4 Send Sample Request for all 12 APs. Nothing should" -write "; happen since LC is passive (and all WP evaluate to False anyway)" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -wait 10 - -write ";*********************************************************************" -write "; Step 2.5 Check housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 12) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 20) AND ($SC_$CPU_LC_RTSCNT = 0) THEN - ;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) - for wpindex = 1 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - endif - enddo - - ;; for the 12 APs that are being used, - ;; should be 68 (0x44) since they are active and pass - ;; rest should be 51 (0x33) since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= APResultEntries) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 68) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 2.6 Dump WRT and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtPktId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004;3001;3001.1;3004;3006) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" - -else - write "<*> Passed (2003;2003.2;2003.3;2004;3001;3001.1;3004;3006) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 2.7 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 3.0: Test LC Disabled, All Ap Active, no thresholds are reached" -write ";*********************************************************************" -write "; Step 3.1: Send a Set LC Application State to Disabled Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) then - write "<*> Passed (1003;4002) - Set LC Application State to Disabled command properly sent." - - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Set LC Application State to Disabled command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.2: Send a Set All APs to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then - CmdStatus = CMDFAIL - break - endif -enddo -for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4004) - Set All APs to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, ")." - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.3 Send packets for all WP defined in WDT" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendmonpackets("3.3") - -write ";*********************************************************************" -write "; Step 3.4 Send Sample Request for all 12 APs. Nothing should" -write "; happen since LC is Disabled (and all WP evaluate to False anyway)" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 3.5 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 12) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 20) AND ($SC_$CPU_LC_RTSCNT = 0) THEN -;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) - for wpindex = 1 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - endif - enddo - -;; for the 10 APs that are being used, should be 68 (x44) since they are active and last results were pass -;; rest should be 51 (0x33) since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= APResultEntries) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 68) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 3.6 Dump WRT and check counters, nothing should change" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtPktId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004;3001;3001.1;3004;3006) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2004;3001;3001.1;3004;3006) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 3.7 Dump ART and check counters, nothing should change" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 4.0: Test LC Active, All AP Disabled, no thresholds are reached" -write ";*********************************************************************" -write "; Step 4.1: Send a Set LC Application State to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.2: Send a Set All APs to Disabled Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -State = LC_APSTATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4008) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4008, "P" -else - write " Failed (1003;4008) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4008, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then - CmdStatus = CMDFAIL - break - endif -enddo -for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4008) - Set All APs to Disabled command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4008, "P" -else - write " Failed (1003;4008) - Set All APs to Disabled command not sent properly (", ut_sc_status, ")." - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4008, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.3 Send packets for all WP defined in WDT" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendmonpackets("4.3") - -write ";*********************************************************************" -write "; Step 4.4 Send Sample Request for all 12 APs. Nothing should" -write "; happen since LC is passive (and all WP evaluate to False anyway)" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 4.5 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 12) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 40) AND ($SC_$CPU_LC_RTSCNT = 0) THEN -;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) - for wpindex = 1 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - endif - enddo -;; for the 10 APs that are being used, should be 204 (xCC) since they are disabled and last result was pass -;; rest should be 51 (0x33) since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= APResultEntries) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 204) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 4.6 Dump WRT and check counters, message monitored should be 2" -write "; for each entry. " -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtPktId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004;3001;3001.1;3004;3006) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2004;3001;3001.1;3004;3006) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 4.7 Dump ART and check counters, state should be disabled" -write "; other counters should remain the same as before " -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 5.0: Test LC Active, All AP Active, no thresholds are reached" -write ";*********************************************************************" -write "; Step 5.1: Send a Set All APs to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then - CmdStatus = CMDFAIL - break - endif -enddo -for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4004) - Set All APs to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, ")." - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.3 Send packets for all WP defined in WDT" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendmonpackets("5.3") - -write ";*********************************************************************" -write "; Step 5.4 Send Sample Request for all 12 APs. Nothing should" -write "; happen since LC is passive (and all WP evaluate to False anyway)" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 5.5 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 24) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 60) AND ($SC_$CPU_LC_RTSCNT = 0) THEN -;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) - for wpindex = 1 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - endif - enddo -;; for the 10 APs that are being used, should be 68 (x44) since they are active and pass -;; rest should be 51 (0x33) since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= APResultEntries) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 68) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 5.6 Dump WRT and check counters, message monitored should be 3 " -write "; for all entries. " -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtPktId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 5.7 Dump ART and check counters" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 6.0: Test LC Active, All AP Passive, no thresholds are reached" -write ";*********************************************************************" -write "; Step 6.1: Send a Set All APs to Passive Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4006) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4006, "P" -else - write " Failed (1003;4006) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4006, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then - CmdStatus = CMDFAIL - break - endif -enddo -for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4006) - Set All APs to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4006, "P" -else - write " Failed (1003;4006) - Set All APs to Passive command not sent properly (", ut_sc_status, ")." - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4006, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 6.2 Send packets for all WP defined in WDT" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendmonpackets("6.2") - -write ";*********************************************************************" -write "; Step 6.3 Send Sample Request for all 12 APs. Nothing should" -write "; happen since LC is passive (and all WP evaluate to False anyway)" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 6.4 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 36) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 80) AND ($SC_$CPU_LC_RTSCNT = 0) THEN -;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) - for wpindex = 1 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - endif - enddo -;; for the 10 APs that are being used, should be 136 (x88) since they are passive and pass -;; rest should be 51 (0x33) since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= APResultEntries) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 136) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 6.5 Dump WRT and check counters, message monitored should be 4 " -write "; for all" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtPktId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 6.6 Dump ART and check counters, state is passive" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 7.0: Test LC Active, APs a mix of states, no thresholds reached" -write ";*********************************************************************" -write "; Step 7.1: Send commands to set APs to mix of states" -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" - -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" - -State = LC_APSTATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" - -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" -/$SC_$CPU_LC_SETAPPERMOFF APNumber=3 - -CmdStatus = CMDSUCCESS - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -index = 0 -if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then - CmdStatus = CMDFAIL -endif -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then - CmdStatus = CMDFAIL - endif -endif -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then - CmdStatus = CMDFAIL - endif -endif -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PERMOFF) then - CmdStatus = CMDFAIL - endif -endif -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then - CmdStatus = CMDFAIL - endif -endif -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then - CmdStatus = CMDFAIL - endif -endif -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then - CmdStatus = CMDFAIL - endif -endif -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then - CmdStatus = CMDFAIL - endif -endif -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then - CmdStatus = CMDFAIL - endif -endif -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif - enddo -endif - -if (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4003;4005;4007;4009) - APs set to mix of states correctly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" - ut_setrequirements LCX_4005, "P" - ut_setrequirements LCX_4007, "P" - ut_setrequirements LCX_4009, "P" -else - write " Failed (1003;4003;4005;4007;4009) - APs not set to mix of states correctly." - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4003, "F" - ut_setrequirements LCX_4005, "F" - ut_setrequirements LCX_4007, "F" - ut_setrequirements LCX_4009, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.2 Send packets for all WP defined in WDT" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendmonpackets("7.2") - -write ";*********************************************************************" -write "; Step 7.3 Send Sample Request for all 12 APs. Nothing should" -write "; happen since LC is passive (and all WP evaluate to False anyway)" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 7.4 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 44) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 100) AND ($SC_$CPU_LC_RTSCNT = 0) THEN -;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) - for wpindex = 1 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then - break - endif - elseif (wpindex > 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - endif - enddo -;; for the 10 APs that are being used, 132 (x84), 12 (x0C), 68 (x44), -;; 204 (xCC), and 136 (x88) -;; rest should be 51 (0x33) since they are not used and not measured - CmdStatus = CMDSUCCESS - apindex = 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 132) then - CmdStatus = CMDFAIL - endif - - if (CMDStatus = CMDSUCCESS) then - apindex = apindex + 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 12) then - CmdStatus = CMDFAIL - endif - endif - - if (CMDStatus = CMDSUCCESS) then - apindex = apindex + 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 68) then - CmdStatus = CMDFAIL - endif - endif - - if (CMDStatus = CMDSUCCESS) then - apindex = apindex + 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 204) then - CmdStatus = CMDFAIL - endif - endif - - if (CMDStatus = CMDSUCCESS) then - apindex = apindex + 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 136) then - CmdStatus = CMDFAIL - endif - endif - - if (CmdStatus = CMDSUCCESS) then - for apindex = 7 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - endif - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 7.5 Dump WRT and check counters, message monitored should be 5 for all" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtPktId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 5) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004;3001;3001.1;3004;3006) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2004;3001;3001.1;3004;3006) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 7.6 Dump ART and check counters, states are mixed" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artPktId) -wait 5 - -;checking that States did not change -CmdStatus = CMDSUCCESS -index = 0 -if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PERMOFF) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - enddo -endif - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3002;3003;3004;3005;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3005, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3002;3003;3004;3005;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3005, "P" - ut_setrequirements LCX_3006, "P" -endif - -step8_0: -write ";*********************************************************************" -write "; Step 8.0: Clean-up" -write ";*********************************************************************" - -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_monitoring " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_monitoring +;******************************************************************************* +; Test Name: lc_monitoring +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) functions +; properly when monitoring WatchPoints (WP). All WP evaluate to false so +; no thresholds will be reached to cause ActionPoints (AP) to take action. +; During this test the LC is set as follows: +; LC Active with all AP disabled. +; LC Active with all AP active. +; LC Active with all AP passive +; LC Active with AP in mix of states (active, passive, disabled, +; permanently disabled, unused) +; LC Passive with all AP active +; LC Disabled with all AP active +; +; Requirements Tested +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message +; LC2003 Upon receipt of a message, LC shall compare the data in the +; message to the table-defined value using the table-defined +; comparison value and comparison operator for each data point +; defined in the Watchpoint Definition Table (WDT) if the LC +; Application State is one of the following: +; a) Active +; b) Passive +; LC2003.1 LC shall support the following comparison values: +; a) = +; b) != +; c) > +; d) >= +; e) < +; f) <= +; LC2003.2 If the WDT comparison operator specifies that a Custom Function +; shall be performed, LC shall apply the custom function to the +; data contained in the message +; LC2004 For each Watchpoint, the flight software shall maintain the +; following statistics in the dump-only Watchpoint Results Table: +; a) The result of the last relational comparison (False, True, +; Error or Stale) +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) Most recent FALSE to TRUE transition value +; g) Most recent FALSE to TRUE transition timestamp +; h) Most recent TRUE to FALSE transition value +; i) Most recent TRUE to FALSE transition timestamp +; LC3001 Upon receipt of a Sample Request, LC shall process the request +; specified actionpoints defined in the Actionpoint Definition +; Table (ADT) if the LC Application State is one of the +; following: +; a) Active +; b) Passive +; LC3001.1 LC shall support the following Reverse Polish Operators: +; a) and +; b) or +; c) xor +; d) not +; e) equals +; LC3002 Each table-defined Actionpoint shall be evaluated and the +; results stored in the dump-only Actionpoint Results Table if the +; Actionpoint state is either: +; a) Active +; b) Passive +; LC3003 If the Actionpoint is Disabled, LC shall skip processing that +; actionpoint +; LC3004 If the Actionpoint is Unused, LC shall skip processing that +; actionpoint +; LC3005 If the Actionpoint is Permanently Disabled, LC shall skip +; processing that actionpoint +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample(Pass,Fail,Error, or Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result = +; Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC4001 Upon receipt of a Set LC Application State to Passive Command, +; LC shall set the LC Application State to Passive +; LC4002 Upon receipt of a Set LC Application State to Disable Command, +; LC shall set the LC Application State to Disabled +; LC4003 Upon receipt of a Set Actionpoint to Active Command, LC shall +; set the state for the command-specified Actionpoint to ACTIVE +; such that the actionpoint is evaluated and the table-defined +; actions are taken based on the evaluation +; LC4004 Upon receipt of a Set All Actionpoints to Active Command, LC +; shall set the state for all Actionpoints to ACTIVE such that the +; actionpoints are evaluated and the table-defined actions are +; taken based on the evaluation +; LC4005 Upon receipt of a Set Actionpoint to Passive Command, LC shall +; set the state for the command-specified Actionpoint to PASSIVE +; such that the actionpoint is evaluated, however, no actions +; are taken +; LC4006 Upon receipt of a Set All Actionpoints to Passive Command, LC +; shall set the state for the all Actionpoints to PASSIVE such +; that all actionpoints are evaluated, however, no actions are +; taken +; LC4007 Upon receipt of a Set Actionpoint to Disabled Command, LC shall +; set the state for the command-specified Actionpoint to DISABLED +; such that the actionpoints are not evaluated and no actions +; are taken +; LC4008 Upon receipt of a Set All Actionpoints to Disabled Command, LC +; shall set the state for all Actionpoint to DISABLED such that: +; a) the actionpoints are not evaluated +; b) no actions are taken +; c) no event messages generated. +; LC4009 Upon receipt of a Set Actionpoint to Permanent Disable, LC +; shall mark the command-specified Actionpoint such that the +; Actionpoint cannot be Activated +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; telemetry) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded +; a True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result =Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC9005 Upon any initialization, LC shall validate the Watchpoint +; Definition Table for the following: +; a) valid operator +; b) data size +; c) Message ID +; LC9006 Upon any initialization, LC shall validate the Actionpoint +; Definition Table for the following: +; a) valid default state +; b) RTS number (in range) +; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) +; d) Failure Count (in range) +; e) Action Equation syntax +; LC9007 Upon any initialization, LC shall subscribe to the messages +; defined in the WDT. +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 Walt Moleski Original Procedure for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files +; lc_adt1b Sets up the Actionpoint Definition table files +; +; Expected Test Results and Analysis +; +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "to_lab_events.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_1003 0 +#define LC_2003 1 +#define LC_20031 2 +#define LC_20032 3 +#define LC_2004 4 +#define LC_3001 5 +#define LC_30011 6 +#define LC_3002 7 +#define LC_3003 8 +#define LC_3004 9 +#define LC_3005 10 +#define LC_3006 11 +#define LC_4000 12 +#define LC_4001 13 +#define LC_4002 14 +#define LC_4003 15 +#define LC_4004 16 +#define LC_4005 17 +#define LC_4006 18 +#define LC_4007 19 +#define LC_4008 20 +#define LC_4009 21 +#define LC_8000 22 +#define LC_9000 23 +#define LC_9001 24 +#define LC_9002 25 +#define LC_9005 26 +#define LC_9006 27 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +#define CMDFAIL 1 +#define CMDSUCCESS 2 +global ut_req_array_size = 27 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1003","LC_2003", ;; + "LC_2003.1","LC_2003.2","LC_2004","LC_3001","LC_3001.1","LC_3002", ;; + "LC_3003","LC_3004","LC_3005","LC_3006","LC_4000","LC_4001", ;; + "LC_4002","LC_4003","LC_4004","LC_4005","LC_4006","LC_4007", ;; + "LC_4008","LC_4009","LC_8000","LC_9000","LC_9001","LC_9002", ;; + "LC_9005","LC_9006"] + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL rawcmd +LOCAL stream1 +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL ADTentries = 12 +LOCAL APResultEntries = ADTentries/2 +LOCAL WDTentries = 30 +LOCAL CmdStatus +LOCAL State +Local rdlindex +Local maxwp = LC_MAX_WATCHPOINTS - 1 +Local maxap = LC_MAX_ACTIONPOINTS - 1 +Local MsgId[20] +Local Size +Local Pattern[32] +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local ARTTblName = LCAppName & ".LC_ART" +local WRTTblName = LCAppName & ".LC_WRT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Creating the WDT and ADT used for testing and upload it" +write ";********************************************************************" +s $SC_$CPU_lc_wdt1 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file("CF:0/apps", "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +;; Generate the Actionpoint Definition Table +s $SC_$CPU_lc_adt1b + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file("CF:0/apps", "lc_def_adt1b.tbl", adtFileName, hostCPU, "P") + +;; Display the pages used by this test +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " +write "; initialized to zero (0). " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId, artPktId, wrtPktId + +;; Set the SC HK packet ID based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" +artPktId = "0FB8" +wrtPktId = "0FB9" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being received." + ut_setrequirements LC_8000, "P" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 12 APs that are being used +;;255 is because they are disabled and not measured + for apindex = 1 to APResultEntries do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = APResultEntries+1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000;9005;9006) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_9005, "F" + ut_setrequirements LC_9006, "F" + else + write "<*> Passed (9000;9005;9006) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + ut_setrequirements LC_9005, "P" + ut_setrequirements LC_9006, "P" + endif +else + write " Failed (9000;9005;9006) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_9005, "F" + ut_setrequirements LC_9006, "F" +endif + +;; Dump the WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtPktId) +wait 5 + +;check initialization of WRT +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001) - Watchpoint Results Table NOT initialized at startup." + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" +else + write "<*> Passed (9001) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" +endif + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +;check initialization of ART +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002) - Actionpoint Results Table NOT initialized at startup." + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" +else + write "<*> Passed (9002) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" +endif + +write ";*********************************************************************" +write "; Step 1.6: Setup Data Packet message ids " +write ";*********************************************************************" +;; For CPU1 use CPU2 Message IDs +MsgId[1] = 0x987 +MsgId[2] = 0x988 +MsgId[3] = 0x989 +MsgId[4] = 0x98a +MsgId[5] = 0x98b +MsgId[6] = 0x98c +MsgId[7] = 0x98d +MsgId[8] = 0x98e +MsgId[9] = 0x98f +MsgId[10] = 0x990 +MsgId[11] = 0x991 +MsgId[12] = 0x992 +MsgId[13] = 0x993 +MsgId[14] = 0x994 +MsgId[15] = 0x995 +MsgId[16] = 0x996 +MsgId[17] = 0x997 +MsgId[18] = 0x998 +MsgId[19] = 0x999 +MsgId[20] = 0x99a + +write ";*********************************************************************" +write "; Step 2.0: Test LC Passive, All Ap Active, no thresholds are reached" +write ";*********************************************************************" +write "; Step 2.1: Send a Set LC Application State to Passive Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_PASSIVE + +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then + write "<*> Passed (1003;4001) - Set LC Application State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else + write " Failed (1003;4001) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else + write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2: Send a Set All APs to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then + CmdStatus = CMDFAIL + break + endif +enddo +for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4004) - Set All APs to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, ")." + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.3 Send packets for all WP defined in WDT" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendmonpackets("2.3") + +write ";*********************************************************************" +write "; Step 2.4 Send Sample Request for all 12 APs. Nothing should" +write "; happen since LC is passive (and all WP evaluate to False anyway)" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +wait 10 + +write ";*********************************************************************" +write "; Step 2.5 Check housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 12) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 20) AND ($SC_$CPU_LC_RTSCNT = 0) THEN + ;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) + for wpindex = 1 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + endif + enddo + + ;; for the 12 APs that are being used, + ;; should be 68 (0x44) since they are active and pass + ;; rest should be 51 (0x33) since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= APResultEntries) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 68) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 2.6 Dump WRT and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtPktId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2004;3001;3001.1;3004;3006) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_2004, "F" + +else + write "<*> Passed (2003;2003.1;2003.2;2004;3001;3001.1;3004;3006) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 2.7 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 3.0: Test LC Disabled, All Ap Active, no thresholds are reached" +write ";*********************************************************************" +write "; Step 3.1: Send a Set LC Application State to Disabled Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) then + write "<*> Passed (1003;4002) - Set LC Application State to Disabled command properly sent." + + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Set LC Application State to Disabled command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.2: Send a Set All APs to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then + CmdStatus = CMDFAIL + break + endif +enddo +for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4004) - Set All APs to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, ")." + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.3 Send packets for all WP defined in WDT" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendmonpackets("3.3") + +write ";*********************************************************************" +write "; Step 3.4 Send Sample Request for all 12 APs. Nothing should" +write "; happen since LC is Disabled (and all WP evaluate to False anyway)" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 3.5 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 12) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 20) AND ($SC_$CPU_LC_RTSCNT = 0) THEN +;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) + for wpindex = 1 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + endif + enddo + +;; for the 10 APs that are being used, should be 68 (x44) since they are active and last results were pass +;; rest should be 51 (0x33) since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= APResultEntries) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 68) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 3.6 Dump WRT and check counters, nothing should change" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtPktId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2004;3001;3001.1;3004;3006) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2004;3001;3001.1;3004;3006) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 3.7 Dump ART and check counters, nothing should change" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 4.0: Test LC Active, All AP Disabled, no thresholds are reached" +write ";*********************************************************************" +write "; Step 4.1: Send a Set LC Application State to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.2: Send a Set All APs to Disabled Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +State = LC_APSTATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4008) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4008, "P" +else + write " Failed (1003;4008) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4008, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then + CmdStatus = CMDFAIL + break + endif +enddo +for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4008) - Set All APs to Disabled command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4008, "P" +else + write " Failed (1003;4008) - Set All APs to Disabled command not sent properly (", ut_sc_status, ")." + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4008, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.3 Send packets for all WP defined in WDT" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendmonpackets("4.3") + +write ";*********************************************************************" +write "; Step 4.4 Send Sample Request for all 12 APs. Nothing should" +write "; happen since LC is passive (and all WP evaluate to False anyway)" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 4.5 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 12) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 40) AND ($SC_$CPU_LC_RTSCNT = 0) THEN +;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) + for wpindex = 1 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + endif + enddo +;; for the 10 APs that are being used, should be 204 (xCC) since they are disabled and last result was pass +;; rest should be 51 (0x33) since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= APResultEntries) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 204) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 4.6 Dump WRT and check counters, message monitored should be 2" +write "; for each entry. " +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtPktId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2004;3001;3001.1;3004;3006) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2004;3001;3001.1;3004;3006) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 4.7 Dump ART and check counters, state should be disabled" +write "; other counters should remain the same as before " +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 5.0: Test LC Active, All AP Active, no thresholds are reached" +write ";*********************************************************************" +write "; Step 5.1: Send a Set All APs to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then + CmdStatus = CMDFAIL + break + endif +enddo +for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4004) - Set All APs to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, ")." + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.3 Send packets for all WP defined in WDT" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendmonpackets("5.3") + +write ";*********************************************************************" +write "; Step 5.4 Send Sample Request for all 12 APs. Nothing should" +write "; happen since LC is passive (and all WP evaluate to False anyway)" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 5.5 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 24) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 60) AND ($SC_$CPU_LC_RTSCNT = 0) THEN +;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) + for wpindex = 1 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + endif + enddo +;; for the 10 APs that are being used, should be 68 (x44) since they are active and pass +;; rest should be 51 (0x33) since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= APResultEntries) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 68) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 5.6 Dump WRT and check counters, message monitored should be 3 " +write "; for all entries. " +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtPktId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 5.7 Dump ART and check counters" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 6.0: Test LC Active, All AP Passive, no thresholds are reached" +write ";*********************************************************************" +write "; Step 6.1: Send a Set All APs to Passive Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4006) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4006, "P" +else + write " Failed (1003;4006) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4006, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then + CmdStatus = CMDFAIL + break + endif +enddo +for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4006) - Set All APs to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4006, "P" +else + write " Failed (1003;4006) - Set All APs to Passive command not sent properly (", ut_sc_status, ")." + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4006, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 6.2 Send packets for all WP defined in WDT" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendmonpackets("6.2") + +write ";*********************************************************************" +write "; Step 6.3 Send Sample Request for all 12 APs. Nothing should" +write "; happen since LC is passive (and all WP evaluate to False anyway)" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 6.4 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 36) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 80) AND ($SC_$CPU_LC_RTSCNT = 0) THEN +;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) + for wpindex = 1 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + endif + enddo +;; for the 10 APs that are being used, should be 136 (x88) since they are passive and pass +;; rest should be 51 (0x33) since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= APResultEntries) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 136) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 6.5 Dump WRT and check counters, message monitored should be 4 " +write "; for all" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtPktId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 6.6 Dump ART and check counters, state is passive" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 7.0: Test LC Active, APs a mix of states, no thresholds reached" +write ";*********************************************************************" +write "; Step 7.1: Send commands to set APs to mix of states" +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" + +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" + +State = LC_APSTATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" + +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" +/$SC_$CPU_LC_SETAPPERMOFF APNumber=3 + +CmdStatus = CMDSUCCESS + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +index = 0 +if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then + CmdStatus = CMDFAIL +endif +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then + CmdStatus = CMDFAIL + endif +endif +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then + CmdStatus = CMDFAIL + endif +endif +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PERMOFF) then + CmdStatus = CMDFAIL + endif +endif +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then + CmdStatus = CMDFAIL + endif +endif +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then + CmdStatus = CMDFAIL + endif +endif +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then + CmdStatus = CMDFAIL + endif +endif +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) then + CmdStatus = CMDFAIL + endif +endif +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then + CmdStatus = CMDFAIL + endif +endif +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif + enddo +endif + +if (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4003;4005;4007;4009) - APs set to mix of states correctly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" + ut_setrequirements LC_4005, "P" + ut_setrequirements LC_4007, "P" + ut_setrequirements LC_4009, "P" +else + write " Failed (1003;4003;4005;4007;4009) - APs not set to mix of states correctly." + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4003, "F" + ut_setrequirements LC_4005, "F" + ut_setrequirements LC_4007, "F" + ut_setrequirements LC_4009, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.2 Send packets for all WP defined in WDT" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendmonpackets("7.2") + +write ";*********************************************************************" +write "; Step 7.3 Send Sample Request for all 12 APs. Nothing should" +write "; happen since LC is passive (and all WP evaluate to False anyway)" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 7.4 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 44) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 100) AND ($SC_$CPU_LC_RTSCNT = 0) THEN +;; for the WP measured results for wpindex 1-7 should be 0 (false), wpindex 8 which is 240 (0xF0), rest 255 (0xFF) + for wpindex = 1 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 240) then + break + endif + elseif (wpindex > 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + endif + enddo +;; for the 10 APs that are being used, 132 (x84), 12 (x0C), 68 (x44), +;; 204 (xCC), and 136 (x88) +;; rest should be 51 (0x33) since they are not used and not measured + CmdStatus = CMDSUCCESS + apindex = 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 132) then + CmdStatus = CMDFAIL + endif + + if (CMDStatus = CMDSUCCESS) then + apindex = apindex + 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 12) then + CmdStatus = CMDFAIL + endif + endif + + if (CMDStatus = CMDSUCCESS) then + apindex = apindex + 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 68) then + CmdStatus = CMDFAIL + endif + endif + + if (CMDStatus = CMDSUCCESS) then + apindex = apindex + 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 204) then + CmdStatus = CMDFAIL + endif + endif + + if (CMDStatus = CMDSUCCESS) then + apindex = apindex + 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 136) then + CmdStatus = CMDFAIL + endif + endif + + if (CmdStatus = CMDSUCCESS) then + for apindex = 7 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + endif + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 7.5 Dump WRT and check counters, message monitored should be 5 for all" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtPktId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 5) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2004;3001;3001.1;3004;3006) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.2;2003.3;2004;3001;3001.1;3004;3006) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 7.6 Dump ART and check counters, states are mixed" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artPktId) +wait 5 + +;checking that States did not change +CmdStatus = CMDSUCCESS +index = 0 +if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PERMOFF) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + enddo +endif + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3002;3003;3004;3005;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3005, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3002;3003;3004;3005;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3005, "P" + ut_setrequirements LC_3006, "P" +endif + +step8_0: +write ";*********************************************************************" +write "; Step 8.0: Clean-up" +write ";*********************************************************************" + +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_monitoring " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_noaction.prc b/test_and_ground/asist/prc/template/template_lc_noaction.prc similarity index 85% rename from test_and_ground/asist/prc/template/template_lcx_noaction.prc rename to test_and_ground/asist/prc/template/template_lc_noaction.prc index 0c5c198..f756dc0 100644 --- a/test_and_ground/asist/prc/template/template_lcx_noaction.prc +++ b/test_and_ground/asist/prc/template/template_lc_noaction.prc @@ -1,2302 +1,2254 @@ -PROC $sc_$cpu_lcx_noaction -;******************************************************************************* -; Test Name: lcx_noaction -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker eXtended (LCX) -; functions properly when monitoring WatchPoints (WP). All WP evaluate to -; a mix of true, false, and not measured. All ActionPoints (AP) Pass so a -; threshold is not reached causing and action to take place. -; During this test the LCX is set as follows: -; LCX Active with all AP disabled. -; LCX Active with all AP active. -; LCX Active with all AP passive -; LCX Active with AP in mix of states (active, passive, disabled, -; permanently disabled, unused) -; -; The following WP true/false transitions will be tested: -; WP1 T, T, T, T WP7 F, T, F, T -; WP2 T, T, T, F WP8 F, T, T, F -; WP3 T, T, F, F WP9 F, T, T, T -; WP4 T, F, F, F WP10 F, F, T, T -; WP5 T, F, F, T WP11 F, F, F, T -; WP6 T, F, T, F WP12 F, F, F, F -; -; Requirements Tested -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message -; LCX2003 Upon receipt of a message, LCX shall compare the data in the -; message to the table-defined value using the table-defined -; comparison value and comparison operator for each data point -; defined in the Watchpoint Definition Table (WDT) if the LCX -; Application State is one of the following: -; a) Active -; b) Passive -; LCX2003.2 LCX shall support the following comparison values: -; a) = -; b) != -; c) > -; d) >= -; e) < -; f) <= -; LCX2003.4 If the comparison result for a Watchpoint results in a False, -; LCX shall set the Number of Consecutive True values to zero -; LCX2004 For each Watchpoint, the flight software shall maintain the -; following statistics in the dump-only Watchpoint Results Table: -; a) The result of the last relational comparison (False, True, -; Error or Stale) -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a; True result -; f) Most recent FALSE to TRUE transition value -; g) Most recent FALSE to TRUE transition timestamp -; h) Most recent TRUE to FALSE transition value -; i) Most recent TRUE to FALSE transition timestamp -; LCX3001 Upon receipt of a Sample Request, LCX shall process the request -; specified actionpoints defined in the Actionpoint Definition -; Table (ADT) if the LCX Application State is one of the -; following: -; a) Active -; b) Passive -; LCX3001.1 LCX shall support the following Reverse Polish Operators: -; a) and -; b) or -; c) xor -; d) not -; e) equals -; LCX3002 Each table-defined Actionpoint shall be evaluated and the -; results stored in the dump-only Actionpoint Results Table if the -; Actionpoint state is either: -; a) Active -; b) Passive -; LCX3003 If the Actionpoint is Disabled, LCX shall skip processing that -; actionpoint -; LCX3004 If the Actionpoint is Unused, LCX shall skip processing that -; actionpoint -; LCX3005 If the Actionpoint is Permanently Disabled, LCX shall skip -; processing that actionpoint -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample(Pass,Fail,Error,Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result =Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LCX Application to Active -; LCX4003 Upon receipt of a Set Actionpoint to Active Command, LCX shall -; set the state for the command-specified Actionpoint to ACTIVE -; such that the actionpoint is evaluated and the table-defined -; actions are taken based on the evaluation -; LCX4004 Upon receipt of a Set All Actionpoints to Active Command, LCX -; shall set the state for all Actionpoints to ACTIVE such that the -; actionpoints are evaluated and the table-defined actions are -; taken based on the evaluation -; LCX4005 Upon receipt of a Set Actionpoint to Passive Command, LCX shall -; set the state for the command-specified Actionpoint to PASSIVE -; such that the actionpoint is evaluated, however, no actions -; are taken -; LCX4006 Upon receipt of a Set All Actionpoints to Passive Command, LCX -; shall set the state for all Actionpoints to PASSIVE such that -; all actionpoints are evaluated, however, no actions are taken -; LCX4007 Upon receipt of a Set Actionpoint to Disabled Command, LCX shall -; set the state for the command-specified Actionpoint to DISABLED -; such that the actionpoints are not evaluated and no actions are -; taken -; LCX4009 Upon receipt of a Set Actionpoint to Permanent Disable, LCX -; shall mark the command-specified Actionpoint such that the -; Actionpoint cannot be Activated -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LC Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; tlm) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LC State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 01/30/09 Barbie Medina Original Procedure. -; 02/07/11 Walt Moleski Added variable for app and table names -; and replaced hard-coded instances -; 08/10/12 Walt Moleski Added UpdateAge argument to the TST_LC -; SendSample command for the LCx app -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lcx_wdt1 Sets up the Watchpoint Definition table files for testing -; lcx_adt1a Sets up the Actionpoint Definition table files for testing -; -; Expected Test Results and Analysis -; -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "to_lab_events.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1003 0 -#define LCX_2003 1 -#define LCX_20032 2 -#define LCX_20033 3 -#define LCX_2004 4 -#define LCX_3001 5 -#define LCX_30011 6 -#define LCX_3002 7 -#define LCX_3003 8 -#define LCX_3004 9 -#define LCX_3005 10 -#define LCX_3006 11 -#define LCX_4000 12 -#define LCX_4003 13 -#define LCX_4004 14 -#define LCX_4005 15 -#define LCX_4006 16 -#define LCX_4007 17 -#define LCX_4009 18 -#define LCX_8000 19 -#define LCX_9000 20 -#define LCX_9001 21 -#define LCX_9002 22 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -#define CMDFAIL 1 -#define CMDSUCCESS 2 -global ut_req_array_size = 22 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1003","LCX_2003", ;; - "LCX_2003.2","LCX_2003.3","LCX_2004","LCX_3001","LCX_30011","LCX_3002", ;; - "LCX_3003","LCX_3004","LCX_3005","LCX_3006","LCX_4000","LCX_4003", ;; - "LCX_4004","LCX_4005","LCX_4006","LCX_4007","LCX_4009","LCX_8000", ;; - "LCX_9000","LCX_9001","LCX_9002"] - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL rawcmd -LOCAL stream1 -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL ADTentries = 10 -LOCAL APResults = ADTentries/2 -LOCAL WDTentries = 30 -LOCAL CmdStatus -LOCAL State -Local rdlindex -Local maxwp = LC_MAX_WATCHPOINTS - 1 -Local maxap = LC_MAX_ACTIONPOINTS - 1 -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local WRTTblName = LCAppName & ".LC_WRT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Creating the WDT and ADT used for testing and upload it" -write ";********************************************************************" -s $SC_$CPU_lcx_wdt1 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt1a - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt1a.tbl", adtFileName, "$CPU", "P") - -;; Display the pages -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ADT -page $SC_$CPU_LC_WDT -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " -write "; initialized to zero (0). " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the SC HK packet ID based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being received." - ut_setrequirements LCX_8000, "P" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ($SC_$CPU_LC_APSAMPLECNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 0) AND ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;first check the 10 APs that are being used -;;255 is because they are disabled and not measured - for apindex = 1 to 10 do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo -;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 11 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_9000, "F" -endif - -;check initialization of WRT -;;; CPU1 is the default -wpindex = "0FB9" - -if ("$CPU" = "CPU2") then - wpindex = "0FD7" -elseif ("$CPU" = "CPU3") then - wpindex = "0FF7" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpindex) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001) - Watchpoint Results Table NOT initialized at startup." - write " Error occurred at index = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" -else - write "<*> Passed (9001) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" -endif - -;check initialization of ART -;;; CPU1 is the default -apindex = "0FB8" - -if ("$CPU" = "CPU2") then - apindex = "0FD6" -elseif ("$CPU" = "CPU3") then - apindex = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apindex) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002) - Actionpoint Results Table NOT initialized at startup." - write " Error occurred at index = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" -else - write "<*> Passed (9002) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" -endif - -write ";*********************************************************************" -write "; Step 2.0: Test LC Active All AP disabled, WP cause a mix of " -write "; thresholds to be reached. All AP pass " -write ";*********************************************************************" -write "; Step 2.1: Send a Set LC Application State to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2 Send packets for all WP defined in WDT, data run 1" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.2",1) - -write ";*********************************************************************" -write "; Step 2.3 Send Sample Request for all 10 APs. Nothing should" -write "; happen since all AP disabled" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 2.4 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then - break - endif - elseif (wpindex >=3) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - -;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured -;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xff) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 2.5 Dump WRT and check counters" -write ";*********************************************************************" - -;;; CPU1 is the default -wpindex = "0FB9" - -if ("$CPU" = "CPU2") then - wpindex = "0FD7" -elseif ("$CPU" = "CPU3") then - wpindex = "0FF7" -endif -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpindex) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index > 5) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 2.6 Dump ART and check counters" -write ";*********************************************************************" -;;; CPU1 is the default -apindex = "0FB8" - -if ("$CPU" = "CPU2") then - apindex = "0FD6" -elseif ("$CPU" = "CPU3") then - apindex = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apindex) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 3.0: Test LC Active All AP active, WP cause a mix of thresholds" -write "; to be reached. All AP pass" -write ";*********************************************************************" -write "; Step 3.1: Send a Set all AP to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apindex) -wait 5 - -for index = 0 to ADTEntries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then - CmdStatus = CMDFAIL - break - endif -enddo - -for index = ADTEntries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4004) - Set All APs to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, ")." - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.2 Send packets for all WP defined in WDT, data run 2" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("3.2",2) - -write ";*********************************************************************" -write "; Step 3.3 Send Sample Request for all 10 APs. Nothing should" -write "; all AP Pass" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 3.4 Check housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_APSAMPLECNT = 10) AND ($SC_$CPU_LC_MONMSGCNT = 40) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 10) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN - CmdStatus = CMDSUCCESS - if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x15) then - CmdStatus = CMDFAIL - wpindex = 1 - endif - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x50) then - CmdStatus = CMDFAIL - wpindex = 2 - endif - endif - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x01) then - CmdStatus = CMDFAIL - wpindex = 3 - endif - endif - - if (CmdStatus = CMDSUCCESS) then - for wpindex = 4 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - endif - - ;; for the 10 APs that are being used, the result should be 0x44 since they - ;; are active and pass. 2 APs are represented by each packed result - ;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 3.5 Dump WRT and check counters, message monitored should be 2 " -write "; for all entries " -write ";*********************************************************************" -;;; CPU1 is the default -wpindex = "0FB9" - -if ("$CPU" = "CPU2") then - wpindex = "0FD7" -elseif ("$CPU" = "CPU3") then - wpindex = "0FF7" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpindex) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x45) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0230) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x130) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x542) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then - break - endif - elseif (index= 9) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then - break - endif - elseif (index > 10) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 3.6 Dump ART and check counters" -write ";*********************************************************************" -;;; CPU1 is the default -apindex = "0FB8" - -if ("$CPU" = "CPU2") then - apindex = "0FD6" -elseif ("$CPU" = "CPU3") then - apindex = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apindex) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 4.0: Test LC Active All AP passive, WP cause a mix of " -write "; thresholds to be reached. All AP pass" -write ";*********************************************************************" -write "; Step 4.1: Send a Set all AP to Passive Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" -CmdStatus = CMDSUCCESS - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4006) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4006, "P" -else - write " Failed (1003;4006) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4006, "F" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apindex) -wait 5 - -for index = 0 to ADTentries-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then - CmdStatus = CMDFAIL - break - endif -enddo -for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then - CmdStatus = CMDFAIL - break - endif -enddo - -if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then - write "<*> Passed (1003;4006) - Set All APs to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4006, "P" -else - write " Failed (1003;4006) - Set All APs to Passive command not sent properly (", ut_sc_status, ")." - write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4006, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.2 Send packets for all WP defined in WDT, data run 3" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("4.2",3) - -write ";*********************************************************************" -write "; Step 4.3 Send Sample Request for all 10 APs. Nothing should" -write "; happen since all AP are passive" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - -write ";*********************************************************************" -write "; Step 4.4 Check housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_APSAMPLECNT = 20) AND ($SC_$CPU_LC_MONMSGCNT = 60) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN - CmdStatus = CMDSUCCESS - if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x05) then - CmdStatus = CMDFAIL - wpindex = 1 - endif - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x44) then - CmdStatus = CMDFAIL - wpindex = 2 - endif - endif - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x05) then - CmdStatus = CMDFAIL - wpindex = 3 - endif - endif - - if (CmdStatus = CMDSUCCESS) then - for wpindex = 4 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - endif - - ;; for the 10 APs that are being used, should be 136 (x88) since they are passive and pass - ;; rest should be 51 (0x33) since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 136) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 4.5 Dump WRT and check counters, message monitored should be 4" -write "; for all entries." -write ";*********************************************************************" -;;; CPU1 is the default -wpindex = "0FB9" - -if ("$CPU" = "CPU2") then - wpindex = "0FD7" -elseif ("$CPU" = "CPU3") then - wpindex = "0FF7" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpindex) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x1345) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0045) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0133) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0130) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00000542) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then - break - endif - elseif (index= 9) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00ab1543) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then - break - endif - elseif (index > 10) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.2;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 4.6 Dump ART and check counters, state is passive" -write ";*********************************************************************" -;;; CPU1 is the default -apindex = "0FB8" - -if ("$CPU" = "CPU2") then - apindex = "0FD6" -elseif ("$CPU" = "CPU3") then - apindex = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apindex) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 5.0: Test LC Active, AP in mixed states, WP cause a mix of " -write "; thresholds to be reached. All AP pass" -write ";*********************************************************************" -write "; Step 5.1: Set AP to mix of States" -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" - -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" - -State = LC_APSTATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" - -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" -/$SC_$CPU_LC_SETAPPERMOFF APNumber=3 - -write ";*********************************************************************" -write "; Step 5.2 Send packets for all WP defined in WDT, data run 4" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("5.2",4) - -write ";*********************************************************************" -write "; Step 5.3 Send Sample Request for all 10 APs. Nothing should" -write "; happen since all AP pass" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 5.4 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_APSAMPLECNT = 26) AND ($SC_$CPU_LC_MONMSGCNT = 80) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 3) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN - CmdStatus = CMDSUCCESS - if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x01) then - CmdStatus = CMDFAIL - wpindex = 1 - endif - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x11) then - CmdStatus = CMDFAIL - wpindex = 2 - endif - endif - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x15) then - CmdStatus = CMDFAIL - wpindex = 3 - endif - endif - - if (CmdStatus = CMDSUCCESS) then - for wpindex = 4 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - endif - - CmdStatus = CMDSUCCESS - apindex = 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x84) then - CmdStatus = CMDFAIL - endif - - if (CMDStatus = CMDSUCCESS) then - apindex = apindex + 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x0C) then - CmdStatus = CMDFAIL - endif - endif - - if (CMDStatus = CMDSUCCESS) then - apindex = apindex + 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - CmdStatus = CMDFAIL - endif - endif - - if (CMDStatus = CMDSUCCESS) then - apindex = apindex + 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xCC) then - CmdStatus = CMDFAIL - endif - endif - - if (CMDStatus = CMDSUCCESS) then - apindex = apindex + 1 - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x88) then - CmdStatus = CMDFAIL - endif - endif - - if (CmdStatus = CMDSUCCESS) then - for apindex = 6 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - enddo - endif - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed index =", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - - -write ";*********************************************************************" -write "; Step 5.5 Dump WRT and check counters, message monitored should be 5" -write "; for all entries." -write ";*********************************************************************" -;;; CPU1 is the default -wpindex = "0FB9" - -if ("$CPU" = "CPU2") then - wpindex = "0FD7" -elseif ("$CPU" = "CPU3") then - wpindex = "0FF7" -endif -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpindex) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x50) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x1345) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0045) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0133) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0130) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00000542) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00ab1543) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> $SC_$CPU_LC_WDT[index].ComparisonValue.UnSigned32) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then - break - endif - elseif (index > 10) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 5.6 Dump ART and check counters, states are mixed" -write ";*********************************************************************" -;;; CPU1 is the default -apindex = "0FB8" - -if ("$CPU" = "CPU2") then - apindex = "0FD6" -elseif ("$CPU" = "CPU3") then - apindex = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apindex) -wait 5 - -;checking that States did not change -CmdStatus = CMDSUCCESS -index = 0 -if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PERMOFF) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - index = index + 1 - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - CmdStatus = CMDFAIL - endif -endif - -if (CmdStatus = CMDSUCCESS) then - for index = 10 to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - enddo -endif - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3002;3003;3004;3005;3006;4003;4005;4007;4009) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3005, "F" - ut_setrequirements LCX_3006, "F" - ut_setrequirements LCX_4003, "F" - ut_setrequirements LCX_4005, "F" - ut_setrequirements LCX_4007, "F" - ut_setrequirements LCX_4009, "F" -else - write "<*> Passed (3001;3001.1;3002;3003;3004;3005;3006;4003;4005;4007;4009) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3005, "P" - ut_setrequirements LCX_3006, "P" - ut_setrequirements LCX_4003, "P" - ut_setrequirements LCX_4005, "P" - ut_setrequirements LCX_4007, "P" - ut_setrequirements LCX_4009, "P" -endif - -write ";*********************************************************************" -write "; Step 6.0: Clean-up" -write ";*********************************************************************" - -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_noaction " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_noaction +;******************************************************************************* +; Test Name: lc_noaction +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) +; functions properly when monitoring WatchPoints (WP). All WP evaluate to +; a mix of true, false, and not measured. All ActionPoints (AP) Pass so a +; threshold is not reached causing and action to take place. +; During this test the LC is set as follows: +; LC Active with all AP disabled. +; LC Active with all AP active. +; LC Active with all AP passive +; LC Active with AP in mix of states (active, passive, disabled, +; permanently disabled, unused) +; +; The following WP true/false transitions will be tested: +; WP1 T, T, T, T WP7 F, T, F, T +; WP2 T, T, T, F WP8 F, T, T, F +; WP3 T, T, F, F WP9 F, T, T, T +; WP4 T, F, F, F WP10 F, F, T, T +; WP5 T, F, F, T WP11 F, F, F, T +; WP6 T, F, T, F WP12 F, F, F, F +; +; Requirements Tested +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message +; LC2003 Upon receipt of a message, LC shall compare the data in the +; message to the table-defined value using the table-defined +; comparison value and comparison operator for each data point +; defined in the Watchpoint Definition Table (WDT) if the LC +; Application State is one of the following: +; a) Active +; b) Passive +; LC2003.1 LC shall support the following comparison values: +; a) = +; b) != +; c) > +; d) >= +; e) < +; f) <= +; LC2003.3 If the comparison result for a Watchpoint results in a False, +; LC shall set the Number of Consecutive True values to zero +; LC2004 For each Watchpoint, the flight software shall maintain the +; following statistics in the dump-only Watchpoint Results Table: +; a) The result of the last relational comparison (False, True, +; Error or Stale) +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a; True result +; f) Most recent FALSE to TRUE transition value +; g) Most recent FALSE to TRUE transition timestamp +; h) Most recent TRUE to FALSE transition value +; i) Most recent TRUE to FALSE transition timestamp +; LC3001 Upon receipt of a Sample Request, LC shall process the request +; specified actionpoints defined in the Actionpoint Definition +; Table (ADT) if the LC Application State is one of the +; following: +; a) Active +; b) Passive +; LC3001.1 LC shall support the following Reverse Polish Operators: +; a) and +; b) or +; c) xor +; d) not +; e) equals +; LC3002 Each table-defined Actionpoint shall be evaluated and the +; results stored in the dump-only Actionpoint Results Table if the +; Actionpoint state is either: +; a) Active +; b) Passive +; LC3003 If the Actionpoint is Disabled, LC shall skip processing that +; actionpoint +; LC3004 If the Actionpoint is Unused, LC shall skip processing that +; actionpoint +; LC3005 If the Actionpoint is Permanently Disabled, LC shall skip +; processing that actionpoint +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample(Pass,Fail,Error,Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result =Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC4003 Upon receipt of a Set Actionpoint to Active Command, LC shall +; set the state for the command-specified Actionpoint to ACTIVE +; such that the actionpoint is evaluated and the table-defined +; actions are taken based on the evaluation +; LC4004 Upon receipt of a Set All Actionpoints to Active Command, LC +; shall set the state for all Actionpoints to ACTIVE such that the +; actionpoints are evaluated and the table-defined actions are +; taken based on the evaluation +; LC4005 Upon receipt of a Set Actionpoint to Passive Command, LC shall +; set the state for the command-specified Actionpoint to PASSIVE +; such that the actionpoint is evaluated, however, no actions +; are taken +; LC4006 Upon receipt of a Set All Actionpoints to Passive Command, LC +; shall set the state for all Actionpoints to PASSIVE such that +; all actionpoints are evaluated, however, no actions are taken +; LC4007 Upon receipt of a Set Actionpoint to Disabled Command, LC shall +; set the state for the command-specified Actionpoint to DISABLED +; such that the actionpoints are not evaluated and no actions are +; taken +; LC4009 Upon receipt of a Set Actionpoint to Permanent Disable, LC +; shall mark the command-specified Actionpoint such that the +; Actionpoint cannot be Activated +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; tlm) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 01/30/09 Barbie Medina Original Procedure. +; 02/07/11 Walt Moleski Added variable for app and table names +; and replaced hard-coded instances +; 08/10/12 Walt Moleski Added UpdateAge argument to the TST_LC +; SendSample command for the LCx app +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files for testing +; lc_adt1a Sets up the Actionpoint Definition table files for testing +; +; Expected Test Results and Analysis +; +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "to_lab_events.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_1003 0 +#define LC_2003 1 +#define LC_20031 2 +#define LC_20033 3 +#define LC_2004 4 +#define LC_3001 5 +#define LC_30011 6 +#define LC_3002 7 +#define LC_3003 8 +#define LC_3004 9 +#define LC_3005 10 +#define LC_3006 11 +#define LC_4000 12 +#define LC_4003 13 +#define LC_4004 14 +#define LC_4005 15 +#define LC_4006 16 +#define LC_4007 17 +#define LC_4009 18 +#define LC_8000 19 +#define LC_9000 20 +#define LC_9001 21 +#define LC_9002 22 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +#define CMDFAIL 1 +#define CMDSUCCESS 2 +global ut_req_array_size = 22 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1003","LC_2003", ;; + "LC_2003.1","LC_2003.3","LC_2004","LC_3001","LC_30011","LC_3002", ;; + "LC_3003","LC_3004","LC_3005","LC_3006","LC_4000","LC_4003", ;; + "LC_4004","LC_4005","LC_4006","LC_4007","LC_4009","LC_8000", ;; + "LC_9000","LC_9001","LC_9002"] + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL rawcmd +LOCAL stream1 +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL ADTentries = 10 +LOCAL APResults = ADTentries/2 +LOCAL WDTentries = 30 +LOCAL CmdStatus +LOCAL State +Local rdlindex +Local maxwp = LC_MAX_WATCHPOINTS - 1 +Local maxap = LC_MAX_ACTIONPOINTS - 1 +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local WRTTblName = LCAppName & ".LC_WRT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset on $CPU. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Creating the WDT and ADT used for testing and upload it" +write ";********************************************************************" +s $SC_$CPU_lc_wdt1 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt1a + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt1a.tbl", adtFileName, hostCPU, "P") + +;; Display the pages +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ADT +page $SC_$CPU_LC_WDT +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " +write "; initialized to zero (0). " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the SC HK packet ID based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being received." + ut_setrequirements LC_8000, "P" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ($SC_$CPU_LC_APSAMPLECNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 0) AND ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;first check the 10 APs that are being used +;;255 is because they are disabled and not measured + for apindex = 1 to 10 do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo +;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 11 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_9000, "F" +endif + +;check initialization of WRT +;;; CPU1 is the default +wpindex = "0FB9" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpindex) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001) - Watchpoint Results Table NOT initialized at startup." + write " Error occurred at index = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" +else + write "<*> Passed (9001) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" +endif + +;check initialization of ART +;;; CPU1 is the default +apindex = "0FB8" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apindex) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002) - Actionpoint Results Table NOT initialized at startup." + write " Error occurred at index = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" +else + write "<*> Passed (9002) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" +endif + +write ";*********************************************************************" +write "; Step 2.0: Test LC Active All AP disabled, WP cause a mix of " +write "; thresholds to be reached. All AP pass " +write ";*********************************************************************" +write "; Step 2.1: Send a Set LC Application State to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2 Send packets for all WP defined in WDT, data run 1" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.2",1) + +write ";*********************************************************************" +write "; Step 2.3 Send Sample Request for all 10 APs. Nothing should" +write "; happen since all AP disabled" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 2.4 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then + break + endif + elseif (wpindex >=3) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + +;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured +;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xff) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 2.5 Dump WRT and check counters" +write ";*********************************************************************" + +;;; CPU1 is the default +wpindex = "0FB9" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpindex) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index > 5) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 2.6 Dump ART and check counters" +write ";*********************************************************************" +;;; CPU1 is the default +apindex = "0FB8" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apindex) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 3.0: Test LC Active All AP active, WP cause a mix of thresholds" +write "; to be reached. All AP pass" +write ";*********************************************************************" +write "; Step 3.1: Send a Set all AP to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4004) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apindex) +wait 5 + +for index = 0 to ADTEntries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) then + CmdStatus = CMDFAIL + break + endif +enddo + +for index = ADTEntries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4004) - Set All APs to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set All APs to Active command not sent properly (", ut_sc_status, ")." + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.2 Send packets for all WP defined in WDT, data run 2" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("3.2",2) + +write ";*********************************************************************" +write "; Step 3.3 Send Sample Request for all 10 APs. Nothing should" +write "; all AP Pass" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 3.4 Check housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_APSAMPLECNT = 10) AND ($SC_$CPU_LC_MONMSGCNT = 40) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 10) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN + CmdStatus = CMDSUCCESS + if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x15) then + CmdStatus = CMDFAIL + wpindex = 1 + endif + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x50) then + CmdStatus = CMDFAIL + wpindex = 2 + endif + endif + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x01) then + CmdStatus = CMDFAIL + wpindex = 3 + endif + endif + + if (CmdStatus = CMDSUCCESS) then + for wpindex = 4 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + endif + + ;; for the 10 APs that are being used, the result should be 0x44 since they + ;; are active and pass. 2 APs are represented by each packed result + ;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 3.5 Dump WRT and check counters, message monitored should be 2 " +write "; for all entries " +write ";*********************************************************************" +;;; CPU1 is the default +wpindex = "0FB9" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpindex) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x45) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0230) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x130) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x542) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then + break + endif + elseif (index= 9) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then + break + endif + elseif (index > 10) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 3.6 Dump ART and check counters" +write ";*********************************************************************" +;;; CPU1 is the default +apindex = "0FB8" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apindex) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 4.0: Test LC Active All AP passive, WP cause a mix of " +write "; thresholds to be reached. All AP pass" +write ";*********************************************************************" +write "; Step 4.1: Send a Set all AP to Passive Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSTATE_INF_EID, "INFO", 1 +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" +CmdStatus = CMDSUCCESS + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4006) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4006, "P" +else + write " Failed (1003;4006) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_APSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4006, "F" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apindex) +wait 5 + +for index = 0 to ADTentries-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) then + CmdStatus = CMDFAIL + break + endif +enddo +for index = ADTentries to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) then + CmdStatus = CMDFAIL + break + endif +enddo + +if (ut_sc_status = UT_SC_Success) and (CmdStatus = CMDSUCCESS) then + write "<*> Passed (1003;4006) - Set All APs to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4006, "P" +else + write " Failed (1003;4006) - Set All APs to Passive command not sent properly (", ut_sc_status, ")." + write "<*> AP State = ", $SC_$CPU_LC_ART[index].CurrentState + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4006, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.2 Send packets for all WP defined in WDT, data run 3" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("4.2",3) + +write ";*********************************************************************" +write "; Step 4.3 Send Sample Request for all 10 APs. Nothing should" +write "; happen since all AP are passive" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + +write ";*********************************************************************" +write "; Step 4.4 Check housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_APSAMPLECNT = 20) AND ($SC_$CPU_LC_MONMSGCNT = 60) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN + CmdStatus = CMDSUCCESS + if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x05) then + CmdStatus = CMDFAIL + wpindex = 1 + endif + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x44) then + CmdStatus = CMDFAIL + wpindex = 2 + endif + endif + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x05) then + CmdStatus = CMDFAIL + wpindex = 3 + endif + endif + + if (CmdStatus = CMDSUCCESS) then + for wpindex = 4 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + endif + + ;; for the 10 APs that are being used, should be 136 (x88) since they are passive and pass + ;; rest should be 51 (0x33) since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 136) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 4.5 Dump WRT and check counters, message monitored should be 4" +write "; for all entries." +write ";*********************************************************************" +;;; CPU1 is the default +wpindex = "0FB9" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpindex) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x1345) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0045) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0133) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0130) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00000542) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then + break + endif + elseif (index= 9) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00ab1543) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then + break + endif + elseif (index > 10) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 4.6 Dump ART and check counters, state is passive" +write ";*********************************************************************" +;;; CPU1 is the default +apindex = "0FB8" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apindex) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3002;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3002;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 5.0: Test LC Active, AP in mixed states, WP cause a mix of " +write "; thresholds to be reached. All AP pass" +write ";*********************************************************************" +write "; Step 5.1: Set AP to mix of States" +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State" + +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State" + +State = LC_APSTATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State" +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State" + +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State" +/$SC_$CPU_LC_SETAPPERMOFF APNumber=3 + +write ";*********************************************************************" +write "; Step 5.2 Send packets for all WP defined in WDT, data run 4" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("5.2",4) + +write ";*********************************************************************" +write "; Step 5.3 Send Sample Request for all 10 APs. Nothing should" +write "; happen since all AP pass" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 5.4 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_APSAMPLECNT = 26) AND ($SC_$CPU_LC_MONMSGCNT = 80) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 3) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN + CmdStatus = CMDSUCCESS + if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x01) then + CmdStatus = CMDFAIL + wpindex = 1 + endif + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x11) then + CmdStatus = CMDFAIL + wpindex = 2 + endif + endif + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x15) then + CmdStatus = CMDFAIL + wpindex = 3 + endif + endif + + if (CmdStatus = CMDSUCCESS) then + for wpindex = 4 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + endif + + CmdStatus = CMDSUCCESS + apindex = 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x84) then + CmdStatus = CMDFAIL + endif + + if (CMDStatus = CMDSUCCESS) then + apindex = apindex + 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x0C) then + CmdStatus = CMDFAIL + endif + endif + + if (CMDStatus = CMDSUCCESS) then + apindex = apindex + 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + CmdStatus = CMDFAIL + endif + endif + + if (CMDStatus = CMDSUCCESS) then + apindex = apindex + 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xCC) then + CmdStatus = CMDFAIL + endif + endif + + if (CMDStatus = CMDSUCCESS) then + apindex = apindex + 1 + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x88) then + CmdStatus = CMDFAIL + endif + endif + + if (CmdStatus = CMDSUCCESS) then + for apindex = 6 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + enddo + endif + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed index =", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + + +write ";*********************************************************************" +write "; Step 5.5 Dump WRT and check counters, message monitored should be 5" +write "; for all entries." +write ";*********************************************************************" +;;; CPU1 is the default +wpindex = "0FB9" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpindex) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x50) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x1345) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0045) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0133) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0130) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00000542) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00ab1543) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> $SC_$CPU_LC_WDT[index].ComparisonValue.UnSigned32) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then + break + endif + elseif (index > 10) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 5.6 Dump ART and check counters, states are mixed" +write ";*********************************************************************" +;;; CPU1 is the default +apindex = "0FB8" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apindex) +wait 5 + +;checking that States did not change +CmdStatus = CMDSUCCESS +index = 0 +if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PERMOFF) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + index = index + 1 + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + CmdStatus = CMDFAIL + endif +endif + +if (CmdStatus = CMDSUCCESS) then + for index = 10 to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassiveAPCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + enddo +endif + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3002;3003;3004;3005;3006;4003;4005;4007;4009) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3005, "F" + ut_setrequirements LC_3006, "F" + ut_setrequirements LC_4003, "F" + ut_setrequirements LC_4005, "F" + ut_setrequirements LC_4007, "F" + ut_setrequirements LC_4009, "F" +else + write "<*> Passed (3001;3001.1;3002;3003;3004;3005;3006;4003;4005;4007;4009) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3005, "P" + ut_setrequirements LC_3006, "P" + ut_setrequirements LC_4003, "P" + ut_setrequirements LC_4005, "P" + ut_setrequirements LC_4007, "P" + ut_setrequirements LC_4009, "P" +endif + +write ";*********************************************************************" +write "; Step 6.0: Clean-up" +write ";*********************************************************************" + +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_noaction " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_resetcds.prc b/test_and_ground/asist/prc/template/template_lc_resetcds.prc similarity index 86% rename from test_and_ground/asist/prc/template/template_lcx_resetcds.prc rename to test_and_ground/asist/prc/template/template_lc_resetcds.prc index a5a4f8a..d9559c8 100644 --- a/test_and_ground/asist/prc/template/template_lcx_resetcds.prc +++ b/test_and_ground/asist/prc/template/template_lc_resetcds.prc @@ -1,5313 +1,5173 @@ -PROC $sc_$cpu_lcx_resetcds -;******************************************************************************* -; Test Name: lcx_resetcds -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker eXtended (LCX) -; functions properly properly when an application, cFE processor, or cFE -; power-on reset is performed. This test verifies that the appropriate -; data items are initialized to their proper values after each reset. -; Also, this test verifies that the data is restored from the cFE Critical -; Data Store (CDS) after an Application and Processesor reset is -; performed. Finally, this test verifies that the LCX application restores -; the default values if the CDS is corrupted. -; -; NOTE: This test SHOULD NOT be executed if the configuration parameter -; indicating Save Critical Data is set to NO by the Mission. -; -; Requirements Tested -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message -; LCX2004 For each Watchpoint, the flight software shall maintain the -; following statistics in the dump-only Watchpoint Results Table: -; a) The result of the last relational comparison (False, True, -; Error or Stale) -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) Most recent FALSE to TRUE transition value -; g) Most recent FALSE to TRUE transition timestamp -; h) Most recent TRUE to FALSE transition value -; i) Most recent TRUE to FALSE transition timestamp -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample(Pass,Fail,Error,Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result = -; Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LCX Application to Active -; LCX4004 Upon receipt of a Set All Actionpoints to Active Command, LCX -; shall set the state for all Actionpoints to ACTIVE such that the -; actionpoints are evaluated and the table-defined actions are -; taken based on the evaluation -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LC Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; telemetry) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LC State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded -; a True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX9004 Upon a cFE Processor Reset or LCX Application Reset, if the -; Save Critical Data parameter is set to YES, -; LCX shall restore the following data: -; a) LCX housekeeping data -; b) WDT -; c) Watchpoint statistics -; d) ADT -; e) Actionpoint statistics -; LCX9004.1 LCX shall initialize the LCX Application State to -; Default Reset State -; LCX9004.1.1 If the platform defined Default Reset State indicates to use the -; state of the LCX Application prior to the reset, LCX shall set -; the state of the LCX Application to the state restored from the -; CDS -; LCX9004.3 If LCX determines the Critical Data is invalid, LCX shall -; perform the same initialization as a cFE Power-On (see LCX9000, -; LCX9001 and LCX9002) -; LCX9005 Upon any initialization, LCX shall validate the Watchpoint -; Definition Table for the following: -; a) valid operator -; b) data size -; c) Message ID -; LCX9006 Upon any initialization, LCX shall validate the Actionpoint -; Definition Table for the following: -; a) valid default state -; b) RTS number (in range) -; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) -; d) Failure Count (in range) -; e) Action Equation syntax -; LCX9007 Upon any initialization, LCX shall subscribe to the messages -; defined in the WDT. -; LCX9007.1 For a cFE Processor Reset, if the Save Critical Data parameter -; is YES, LCX shall subscribe to the messages defined in the WDT -; restored from the CDS -; LCX9007.2 For an LCX Application Reset, if the Save Critical Data -; parameter is YES, LCX shall subscribe to the messages defined -; in the WDT restored from the CDS -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LCX commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application exists and can be loaded and executed -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 09/27/12 Walt Moleski Original Procedure for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lcx_wdt1 Sets up the Watchpoint Definition table files for -; testing -; lcx_adt1 Sets up the Actionpoint Definition table files for -; testing -; lcx_wdt2 Sets up the Watchpoint Definition table files for -; testing -; lcx_adt2 Sets up the Actionpoint Definition table files for -; testing -; -; Expected Test Results and Analysis -; -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "cfe_sb_events.h" -#include "to_lab_events.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1003 0 -#define LCX_2004 1 -#define LCX_3006 2 -#define LCX_4000 3 -#define LCX_4004 4 -#define LCX_8000 5 -#define LCX_9000 6 -#define LCX_9001 7 -#define LCX_9002 8 -#define LCX_9004 9 -#define LCX_90041 10 -#define LCX_900411 11 -#define LCX_90043 12 -#define LCX_9005 13 -#define LCX_9006 14 -#define LCX_9007 15 -#define LCX_90071 16 -#define LCX_90072 17 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -#define CMDFAIL 1 -#define CMDSUCCESS 2 - -global ut_req_array_size = 17 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1003","LCX_2004", ;; - "LCX_3006","LCX_4000","LCX_4004","LCX_8000","LCX_9000","LCX_9001", ;; - "LCX_9002","LCX_9004","LCX_9004.1","LCX_9004.1.1","LCX_9004.3", ;; - "LCX_9005","LCX_9006","LCX_9007","LCX_9007.1","LCX_9007.2"] - - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL rawcmd -LOCAL stream1 -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL ADTentries = 12 -LOCAL APResults = 6 -LOCAL ADT2entries = 9 -LOCAL AP2Results = 5 -LOCAL WDTentries = 30 -LOCAL WDT2entries = 28 -LOCAL CmdStatus -LOCAL State -Local cmdctr -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local WRTTblName = LCAppName & ".LC_WRT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" -write "; to the spacecraft default file location for the LC application. " -write ";********************************************************************" -s $SC_$CPU_lcx_wdt1 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt1 - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, "$CPU", "P") - -;; Display the pages used by this test -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT -page $SC_$CPU_LC_ADT -page $SC_$CPU_LC_WDT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the SC HK packet ID based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 12 APs that are being used -;;255 is because they are disabled and not measured -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= APResults) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - elseif ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" -endif - -;; CPU1 is the default -local wpAPID = "0FB9" - -if ("$CPU" = "CPU2") then - wpAPID = "0FD7" -elseif ("$CPU" = "CPU3") then - wpAPID = "0FF7" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -;check initialization of WRT -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_9005, "P" -endif - -;check initialization of ART -;; CPU1 is the default -local apAPID = "0FB8" - -if ("$CPU" = "CPU2") then - apAPID = "0FD6" -elseif ("$CPU" = "CPU3") then - apAPID = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 1.6: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the LC and "CFE_SB" applications ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 2.0: Application Reset Test" -write ";*********************************************************************" -write "; Step 2.1: Set the LC Application State to Active. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2: Set the Action Point States to Active. " -write ";*********************************************************************" -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" - -if (ut_sc_status = UT_SC_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.3: Send packets for all WP defined in WDT, data run #1 " -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.3",1) - -write ";*********************************************************************" -write "; Step 2.4: Send Sample Requests for the first 10 APs. " -write ";*********************************************************************" -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 2.5: Check the housekeeping counters " -write ";*********************************************************************" -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 10) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; - ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; - ($SC_$CPU_LC_ACTIVEAPS = 11) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then - break - endif - elseif (wpindex >=3) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - -;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured -;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 3) then - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif (apindex = 4) then - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - elseif (apindex = 5) then - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then - break - endif - elseif (apindex = 6) then - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then - break - endif - else - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" -endif - -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC =", $SC_$CPU_LC_CMDPC - write " CMDEC =", $SC_$CPU_LC_CMDEC - write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT =", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT - write " WP in use =", $SC_$CPU_LC_WPSINUSE - write " Active APs =", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 2.6: Dump the WRT and ART to verify the statistics. " -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index > 5) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2004) - WRT contains an entry that is not set properly." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2004) - WRT contains the proper values." - ut_setrequirements LCX_2004, "P" -endif - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif ((index >= 6) and (index < 9)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif ((index = 10) or (index = 11)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3006) - ART contains an entry that is not set properly." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3006) - ART contains the proper values." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 2.7: Perform an Application Reset" -write ";*********************************************************************" -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application=LCAppName -wait 5 - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - LC app stop command sent properly." -else - write " Failed - LC app stop command did not increment CMDPC." -endif - -wait 5 - -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application="TST_LC" - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC app stop command sent properly." -else - write " Failed - TST_LC app stop command did not increment CMDPC." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.8: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;; 20 subscriptions + 3 for LC App -if ($SC_$CPU_find_event[3].num_found_messages = 23) then - write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." - ut_setrequirements LCX_9007, "P" - ut_setrequirements LCX_90072, "P" -else - write " Failed (9007;9007.2) - Expected 23 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages - ut_setrequirements LCX_9007, "F" - ut_setrequirements LCX_90072, "F" -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 2.9: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 2.10: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -;; These should be the values set prior to the Application Restart -if ($SC_$CPU_LC_CMDPC = 2) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 10) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; - ($SC_$CPU_LC_RTSCNT = 1) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then - break - endif - elseif (wpindex >=3) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - -;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured -;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 3) then - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif (apindex = 4) then - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - elseif (apindex = 5) then - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then - break - endif - elseif (apindex = 6) then - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then - break - endif - else - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9004) - Housekeeping telemetry NOT initialized after application reset." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9004, "F" - else - write "<*> Passed (9004) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9004, "P" - endif -else - write " Failed (9004) - Housekeeping telemetry NOT initialized after application reset." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9004, "F" -endif - -;; Check the LC Application State -if (LC_STATE_WHEN_CDS_RESTORED = LC_STATE_FROM_CDS) then - if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) then - write "<*> Passed (9004.1;9004.1.1) - LC Application State initialized properly." - ut_setrequirements LCX_90041, "P" - ut_setrequirements LCX_900411, "P" - else - write " Failed (9004.1;9004.1.1) - LC Application State NOT set properly. Expected Active. State = ",p@$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" - ut_setrequirements LCX_900411, "F" - endif -else - if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_WHEN_CDS_RESTORED) then - write "<*> Passed (9004.1) - LC Application State initialized properly." - ut_setrequirements LCX_90041, "P" - else - write " Failed (9004.1) - LC Application State NOT set properly. Expected ",LC_STATE_WHEN_CDS_RESTORED,". State = ",$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" - endif -endif - -;;check initialization of WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index > 5) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9004) - WRT NOT initialized properly after application reset." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9004, "F" -else - write "<*> Passed (9004) - WRT initialized properly." - ut_setrequirements LCX_9004, "P" -endif - -;check initialization of ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif ((index >= 6) and (index < 9)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif ((index = 10) or (index = 11)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9004) - ART NOT initialized properly after application reset." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9004, "F" -else - write "<*> Passed (9004) - ART initialized properly." - ut_setrequirements LCX_9004, "P" -endif - -write ";*********************************************************************" -write "; Step 2.11: Send packets for all WP defined in WDT, data run #2 " -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.11",2) - -write ";*********************************************************************" -write "; Step 2.12: Send Sample Request for all 12 APs " -write ";*********************************************************************" -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 2.13: Check the housekeeping counters " -write ";*********************************************************************" -if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 22) AND ($SC_$CPU_LC_MONMSGCNT = 40) AND ;; - ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; - ($SC_$CPU_LC_ACTIVEAPS = 11) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x15) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x50) then - break - endif - elseif (wpindex = 3) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x01) then - break - endif - elseif (wpindex >=4) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - - for apindex = 1 to APACKED do - if (apindex =1) or (apindex = 4) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif (apindex = 2) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x54) then - break - endif - elseif (apindex =3) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x94) then - break - endif - elseif (apindex = 6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 2.14: Dump the WRT and ART to verify the statistics. " -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x45) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0230) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x130) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x542) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then - break - endif - elseif (index > 10) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2004) - WRT contains an entry that is not set properly." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2004) - WRT contains the proper values." - ut_setrequirements LCX_2004, "P" -endif - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 3) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif ((index >= 3) and (index < 6)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif ((index >= 6) and (index < 9)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif ((index = 10) OR (index = 11)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3006) - ART contains an entry that is not set properly." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3006) - ART contains non-zero values." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 2.15: Perform a Processor Reset" -write ";*********************************************************************" -/$SC_$CPU_ES_PROCESSORRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 2.16: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 2.17: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 2.18: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the appropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;;check initialization of housekeeping -;; These should have the values from before the Reset -if ($SC_$CPU_LC_APSAMPLECNT = 22) AND ($SC_$CPU_LC_MONMSGCNT = 40) AND ;; - ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; - ($SC_$CPU_LC_ACTIVEAPS = 11) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x15) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x50) then - break - endif - elseif (wpindex = 3) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x01) then - break - endif - elseif (wpindex >=4) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - - for apindex = 1 to APACKED do - if (apindex =1) or (apindex = 4) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif (apindex = 2) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x54) then - break - endif - elseif (apindex =3) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x94) then - break - endif - elseif (apindex = 6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9004) - Housekeeping telemetry NOT correct after Processor Reset." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_9004, "F" - else - write "<*> Passed (9004) - Housekeeping telemetry was restored properly." - ut_setrequirements LCX_9004, "P" - endif -else - write " Failed (9004) - Housekeeping telemetry NOT correct after Processor Reset." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_9004, "F" -endif - -;; Check the LC Application State -;; If the CDS was restored properly, the State should be 'Active' -;; Otherwise, Disabled -if (LC_STATE_WHEN_CDS_RESTORED = LC_STATE_FROM_CDS) then - if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) then - write "<*> Passed (9004.1;9004.1.1) - LC Application State initialized properly." - ut_setrequirements LCX_90041, "P" - ut_setrequirements LCX_900411, "P" - else - write " Failed (9004.1;9004.1.1) - LC Application State NOT set properly. Expected Active. State = ",p@$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" - ut_setrequirements LCX_900411, "F" - endif -else - if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_WHEN_CDS_RESTORED) then - write "<*> Passed (9004.1) - LC Application State initialized properly." - ut_setrequirements LCX_90041, "P" - else - write " Failed (9004.1) - LC Application State NOT set properly. Expected ",LC_STATE_WHEN_CDS_RESTORED,". State = ",$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" - endif -endif - -write ";*********************************************************************" -write "; Step 2.19: Dump the WRT and ART to verify the statistics. " -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x45) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0230) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x130) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x542) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then - break - endif - elseif (index > 10) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9004) - WRT was not properly restored after the Processor Reset." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_9004, "F" -else - write "<*> Passed (9004) - WRT was restored properly." - ut_setrequirements LCX_9004, "P" -endif - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 3) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif ((index >= 3) and (index < 6)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif ((index >= 6) and (index < 9)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 11) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9004) - ART was not properly restored after the Processor Reset." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9004, "F" -else - write "<*> Passed - ART was properly restored." - ut_setrequirements LCX_9004, "P" -endif - -write ";*********************************************************************" -write "; Step 2.20: Dump the SB Routing Table and verify that the MsgIDs in " -write "; the WDT are defined." -write ";*********************************************************************" -;; CPU1 is the default -local wdtAPID = "0FB7" - -if ("$CPU" = "CPU2") then - wdtAPID = "0FD5" -elseif ("$CPU" = "CPU3") then - wdtAPID = "0FF5" -endif - -;; Dump the WDT table to make sure we have the correct one -s get_tbl_to_cvt(ramDir, "LC.LC_WDT", "A", "$cpu_lc_wdt.dat", "$CPU", wdtAPID) -wait 5 - -;; Dump the SB Routing table -s get_file_to_cvt (ramDir, "cfe_sb_route.dat", "$cpu_sb_route.dat", "$CPU") -wait 5 - -local wdtMsgID -local foundSubscription = 0 - -for index = 0 to WDTentries-1 do - wdtMsgID = $SC_$CPU_LC_WDT[index].MessageID - write "== Looking for wdt #",index, " msgID = ", %hex(wdtMsgId,4) - for sbIndex = 1 to 16320 do - if ($SC_$CPU_SB_RouteEntry[sbIndex].SB_AppName = LCAppName) AND ;; - ($SC_$CPU_SB_RouteEntry[sbIndex].SB_MsgID = wdtMsgID) then - foundSubscription = foundSubscription + 1 - break - elseif ($SC_$CPU_SB_RouteEntry[sbIndex].SB_AppName = "") then - break - endif - enddo -enddo - -if (foundSubscription = WDTentries) then - write "<*> Passed (9007;9007.1) - All message IDs in WDT have subscriptions." - ut_setrequirements LCX_9007, "P" - ut_setrequirements LCX_90071, "P" -else - write " Failed (9007;9007.1) - Expected 30 message ID subscriptions. Found ",foundSubscription - ut_setrequirements LCX_9007, "F" - ut_setrequirements LCX_90071, "F" -endif - -write ";*********************************************************************" -write "; Step 3.0: Invalid CDS Data Tests - Processor Resets" -write ";***********************************************************************" -;; Display the CDS Registry page -page $SC_$CPU_ES_CDS_REGISTRY - -;; Dump the CDS Registry -s get_file_to_cvt(ramDir, "cfe_cds_reg.log", "$cpu_cds_reg.log", "$CPU") -wait 5 - -write ";***********************************************************************" -write "; Step 3.1: Send the command to set the Processor Reset Counter to 0. " -write ";**********************************************************************" -cmdCtr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_RESETPRCNT - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Reset PR Counter Command." -else - write " Failed - Reset PR Counter Command did not increment the CMDPC." -endif - -; Check the telemetry counter -if ($SC_$CPU_ES_PROCRESETCNT = 0) then - write "<*> Passed - Processor Reset Counter set to 0." -else - write " Failed - Processor Reset Counter did not reset." -endif - -write ";*********************************************************************" -write "; Step 3.2: Corrupt the CDS for the WDT Table " -write ";*********************************************************************" -local addval - -addval = 16 + CFE_ES_RESET_AREA_SIZE + (CFE_ES_RAM_DISK_SECTOR_SIZE * CFE_ES_RAM_DISK_NUM_SECTORS) + 20 + 4 - -write " Corrupt the SC Table Data Critical Data Store by performing the " -write " following steps:" -write " 1. Enter 'sysMemTop ""OS_BSPReservedMemoryPtr""' in the UART window" -write " 2. Add ", addval, " to the displayed value" -write " 3. Note the CDS ""Handle"" for LC.LC_WDT on the CDS_Registry page" -write " 4. Add the CDS Handle to the sum calculated in Step 2." -write " 5. Enter 'm ,2' in the UART window" -write " 6. Enter 4 and hit the enter or return key in the UART window" -write " 7. Enter 5 and hit the enter or return key in the UART window" -write " 8. Enter 6 and hit the enter or return key in the UART window" -write " 9. Type to end the modification command." -write " Type 'g' or 'go' in the ASIST command input field to continue." -wait - -write ";*********************************************************************" -write "; Step 3.3: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -;; Dumpt the WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -;; Set the LC Application State to ACTIVE -State = LC_STATE_ACTIVE - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.4: Perform a Processor Reset" -write ";*********************************************************************" -/$SC_$CPU_ES_PROCESSORRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 3.5: Create the WDT and ADT used for testing and upload them" -write "; to the spacecraft default file location for the LC application. " -write ";********************************************************************" -s $SC_$CPU_lcx_wdt2 - -s ftp_file(defaultTblDir, "lc_def_wdt2.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt2 - -s ftp_file(defaultTblDir, "lc_def_adt2.tbl", adtFileName, "$CPU", "P") - -write ";*********************************************************************" -write "; Step 3.6: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 3.7: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 3.8: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 9 APs that are being used -;;255 is because they are disabled and not measured -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 1 to APACKED do - if (apindex < AP2Results) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000;9004.3) - WP or AP Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" - else - write "<*> Passed (9000;9004.3) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - ut_setrequirements LCX_90043, "P" - endif -else - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" -endif - -;; Since the CDS was corrupted, the LC Application State should be set to -;; the POWER_ON_RESET state -if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_POWER_ON_RESET) then - write "<*> Passed (9004.1;9004.1.1) - LC Application State initialized properly." - ut_setrequirements LCX_90041, "P" - ut_setrequirements LCX_900411, "P" -else - write " Failed (9004.1;9004.1.1) - LC Application State NOT set properly. Expected Disabled. State = ",p@$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" - ut_setrequirements LCX_900411, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9004.3;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9004.3;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9005, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2entries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9004.3;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9004.3;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 3.9: Corrupt the CDS for the ADT Table " -write ";*********************************************************************" - -write " Corrupt the SC Table Data Critical Data Store by entering the following" -write " commands in the UART/minicom window:" -write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" -write " 2. Add ", addval, " to the displayed value" -write " 3. Note the CDS ""Handle"" for LC.LC_ADT on that page" -write " 4. Add the CDS Handle to the sum calculated in Step 2." -write " 5. m ,2" -write " 6. Enter 4 and hit the enter or return key" -write " 7. Enter 5 and hit the enter or return key" -write " 8. Enter 6 and hit the enter or return key" -write " 9. Type to end the modification command." -write " Type 'g' or 'go' in the ASIST command input field to continue." -wait - -write ";*********************************************************************" -write "; Step 3.10: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -;; Dumpt the WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -;; Set the LC Application State to PASSIVE -State = LC_STATE_PASSIVE - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.11: Perform a Processor Reset" -write ";*********************************************************************" -/$SC_$CPU_ES_PROCESSORRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 3.12: Upload a different WDT and ADT to the spacecraft default" -write "; file location for the LC application. " -write ";********************************************************************" -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, "$CPU", "P") - -write ";*********************************************************************" -write "; Step 3.13: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 3.14: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 3.15: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 12 APs that are being used -;;255 is because they are disabled and not measured -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= APResults) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - elseif ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" - else - write "<*> Passed (9000;9004.3) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - ut_setrequirements LCX_90043, "P" - endif -else - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" -endif - -;; Check the LC Application State -if ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) then - write "<*> Passed (9004.1;9004.1.1) - LC Application State initialized properly." - ut_setrequirements LCX_90041, "P" - ut_setrequirements LCX_900411, "P" -else - write " Failed (9004.1;9004.1.1) - LC Application State NOT set properly. Expected Passive. State = ",p@$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" - ut_setrequirements LCX_900411, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9004.3;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9004.3;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9005, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9004.3;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9004.3;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 3.16: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the LC application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 4.0: Invalid CDS Data Tests - Application Resets" -write ";***********************************************************************" -write "; Step 4.1: Corrupt the CDS for the WDT Table " -write ";**********************************************************************" - -write " Corrupt the SC Table Data Critical Data Store by entering the following" -write " commands in the UART/minicom window:" -write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" -write " 2. Add ", addval, " to the displayed value" -write " 3. Note the CDS ""Handle"" for LC.LC_WDT on that page" -write " 4. Add the CDS Handle to the sum calculated in Step 2." -write " 5. m ,2" -write " 6. Enter 4 and hit the enter or return key" -write " 7. Enter 5 and hit the enter or return key" -write " 8. Enter 6 and hit the enter or return key" -write " 9. Type to end the modification command." -write " Type 'g' or 'go' in the ASIST command input field to continue." -wait - -write ";*********************************************************************" -write "; Step 4.2: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -;; Dumpt the WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -;; Set the LC Application State to ACTIVE -State = LC_STATE_ACTIVE - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.3: Stop the LC and TST_LC applications (Application Reset) " -write ";*********************************************************************" -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application=LCAppName -wait 5 - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - LC app stop command sent properly." -else - write " Failed - LC app stop command did not increment CMDPC." -endif - -wait 5 - -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application="TST_LC" - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC app stop command sent properly." -else - write " Failed - TST_LC app stop command did not increment CMDPC." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.4: Create the WDT and ADT used for testing and upload them" -write "; to the spacecraft default file location for the LC application. " -write ";********************************************************************" -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, "$CPU", "P") - -write ";*********************************************************************" -write "; Step 4.5: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;; 20 subscriptions + 3 for LC App -if ($SC_$CPU_find_event[3].num_found_messages = 23) then - write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." - ut_setrequirements LCX_9007, "P" - ut_setrequirements LCX_90072, "P" -else - write " Failed (9007;9007.2) - Expected 23 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages - ut_setrequirements LCX_9007, "F" - ut_setrequirements LCX_90072, "F" -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 4.6: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 4.7: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 12 APs that are being used -;;255 is because they are disabled and not measured -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= APResults) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - elseif ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" - else - write "<*> Passed (9000;9004.3) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - ut_setrequirements LCX_90043, "P" - endif -else - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9004.3;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9004.3;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9005, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9004.3;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9004.3;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 4.8: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the LC application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 4.9: Corrupt the CDS for the ADT Table " -write ";*********************************************************************" - -write " Corrupt the SC Table Data Critical Data Store by entering the following" -write " commands in the UART/minicom window:" -write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" -write " 2. Add ", addval, " to the displayed value" -write " 3. Note the CDS ""Handle"" for LC.LC_ADT on that page" -write " 4. Add the CDS Handle to the sum calculated in Step 2." -write " 5. m ,2" -write " 6. Enter 4 and hit the enter or return key" -write " 7. Enter 5 and hit the enter or return key" -write " 8. Enter 6 and hit the enter or return key" -write " 9. Type to end the modification command." -write " Type 'g' or 'go' in the ASIST command input field to continue." -wait - -write ";*********************************************************************" -write "; Step 4.10: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -;; Dumpt the WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -;; Set the LC Application State to ACTIVE -State = LC_STATE_PASSIVE - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.11: Stop the LC and TST_LC applications (Application Reset) " -write ";*********************************************************************" -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application=LCAppName -wait 5 - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - LC app stop command sent properly." -else - write " Failed - LC app stop command did not increment CMDPC." -endif - -wait 5 - -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application="TST_LC" - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC app stop command sent properly." -else - write " Failed - TST_LC app stop command did not increment CMDPC." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.12: Create the WDT and ADT used for testing and upload them" -write "; to the spacecraft default file location for the LC application. " -write ";********************************************************************" -s ftp_file(defaultTblDir, "lc_def_wdt2.tbl", wdtFileName, "$CPU", "P") - -s ftp_file(defaultTblDir, "lc_def_adt2.tbl", adtFileName, "$CPU", "P") - -write ";*********************************************************************" -write "; Step 4.13: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;; 19 subscriptions + 3 for LC App -if ($SC_$CPU_find_event[3].num_found_messages = 22) then - write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." - ut_setrequirements LCX_9007, "P" - ut_setrequirements LCX_90072, "P" -else - write " Failed (9007;9007.2) - Expected 22 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages - ut_setrequirements LCX_9007, "F" - ut_setrequirements LCX_90072, "F" -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 4.14: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 4.15: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 9 APs that are being used -;;255 is because they are disabled and not measured -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 1 to APACKED do - if (apindex < AP2Results) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" - else - write "<*> Passed (9000;9004.3) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - ut_setrequirements LCX_90043, "P" - endif -else - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9004.3;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9004.3;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9005, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2entries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9004.3;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9004.3;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 4.16: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the LC application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 4.17: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -;; Dumpt the WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -;; Set the LC Application State to ACTIVE -State = LC_STATE_ACTIVE - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.18: Stop the LC and TST_LC applications (Application Reset) " -write ";*********************************************************************" -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application=LCAppName -wait 5 - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - LC app stop command sent properly." -else - write " Failed - LC app stop command did not increment CMDPC." -endif - -wait 5 - -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application="TST_LC" - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC app stop command sent properly." -else - write " Failed - TST_LC app stop command did not increment CMDPC." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.19: Corrupt the CDS for the WRT Statistics " -write ";*********************************************************************" - -write " Corrupt the SC Table Data Critical Data Store by entering the following" -write " commands in the UART/minicom window:" -write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" -write " 2. Add ", addval, " to the displayed value" -write " 3. Note the CDS ""Handle"" for LC.LC_CDS_WRT on that page" -write " 4. Add the CDS Handle to the sum calculated in Step 2." -write " 5. m ,2" -write " 6. Enter 4 and hit the enter or return key" -write " 7. Enter 5 and hit the enter or return key" -write " 8. Enter 6 and hit the enter or return key" -write " 9. Type to end the modification command." -write " Type 'g' or 'go' in the ASIST command input field to continue." -wait - -write ";*********************************************************************" -write "; Step 4.20: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1, 45 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;; 19 subscriptions + 3 for LC App -if ($SC_$CPU_find_event[3].num_found_messages = 22) then - write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." - ut_setrequirements LCX_9007, "P" - ut_setrequirements LCX_90072, "P" -else - write " Failed (9007;9007.2) - Expected 22 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages - ut_setrequirements LCX_9007, "F" - ut_setrequirements LCX_90072, "F" -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 4.21: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 4.22: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 9 APs that are being used -;;255 is because they are disabled and not measured -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 1 to APACKED do - if (apindex < AP2Results) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" - else - write "<*> Passed (9000;9004.3) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - ut_setrequirements LCX_90043, "P" - endif -else - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_9005, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2entries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9004.3;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9004.3;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 4.23: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the LC application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 4.24: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -;; Dumpt the WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -;; Set the LC Application State to ACTIVE -State = LC_STATE_PASSIVE - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.25: Stop the LC and TST_LC applications (Application Reset) " -write ";*********************************************************************" -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application=LCAppName -wait 5 - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - LC app stop command sent properly." -else - write " Failed - LC app stop command did not increment CMDPC." -endif - -wait 5 - -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application="TST_LC" - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC app stop command sent properly." -else - write " Failed - TST_LC app stop command did not increment CMDPC." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.26: Corrupt the CDS for the ART Statistics " -write ";*********************************************************************" - -write " Corrupt the SC Table Data Critical Data Store by entering the following" -write " commands in the UART/minicom window:" -write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" -write " 2. Add ", addval, " to the displayed value" -write " 3. Note the CDS ""Handle"" for LC.LC_CDS_ART on that page" -write " 4. Add the CDS Handle to the sum calculated in Step 2." -write " 5. m ,2" -write " 6. Enter 4 and hit the enter or return key" -write " 7. Enter 5 and hit the enter or return key" -write " 8. Enter 6 and hit the enter or return key" -write " 9. Type to end the modification command." -write " Type 'g' or 'go' in the ASIST command input field to continue." -wait - -write ";*********************************************************************" -write "; Step 4.27: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;; 19 subscriptions + 3 for LC App -if ($SC_$CPU_find_event[3].num_found_messages = 22) then - write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." - ut_setrequirements LCX_9007, "P" - ut_setrequirements LCX_90072, "P" -else - write " Failed (9007;9007.2) - Expected 22 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages - ut_setrequirements LCX_9007, "F" - ut_setrequirements LCX_90072, "F" -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 4.28: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 4.29: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 9 APs that are being used -;;255 is because they are disabled and not measured -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 1 to APACKED do - if (apindex < AP2Results) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" - else - write "<*> Passed (9000;9004.3) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - ut_setrequirements LCX_90043, "P" - endif -else - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9004.3;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9004.3;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9005, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2entries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9004.3;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9004.3;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 4.30: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the LC application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 4.31: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -;; Dumpt the WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -;; Set the LC Application State to ACTIVE -State = LC_STATE_ACTIVE - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.32: Stop the LC and TST_LC applications (Application Reset) " -write ";*********************************************************************" -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application=LCAppName -wait 5 - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - LC app stop command sent properly." -else - write " Failed - LC app stop command did not increment CMDPC." -endif - -wait 5 - -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application="TST_LC" - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC app stop command sent properly." -else - write " Failed - TST_LC app stop command did not increment CMDPC." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.33: Corrupt the CDS for the LC housekeeping data" -write ";*********************************************************************" - -write " Corrupt the SC Table Data Critical Data Store by entering the following" -write " commands in the UART/minicom window:" -write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" -write " 2. Add ", addval, " to the displayed value" -write " 3. Note the CDS ""Handle"" for LC.LC_CDS_AppData on that page" -write " 4. Add the CDS Handle to the sum calculated in Step 2." -write " 5. m ,2" -write " 6. Enter 4 and hit the enter or return key" -write " 7. Enter 5 and hit the enter or return key" -write " 8. Enter 6 and hit the enter or return key" -write " 9. Type to end the modification command." -write " Type 'g' or 'go' in the ASIST command input field to continue." -wait - -write ";*********************************************************************" -write "; Step 4.34: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;; 19 subscriptions + 3 for LC App -if ($SC_$CPU_find_event[3].num_found_messages = 22) then - write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." - ut_setrequirements LCX_9007, "P" - ut_setrequirements LCX_90072, "P" -else - write " Failed (9007;9007.2) - Expected 22 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages - ut_setrequirements LCX_9007, "F" - ut_setrequirements LCX_90072, "F" -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 4.35: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 4.36: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 9 APs that are being used -;;255 is because they are disabled and not measured -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 1 to APACKED do - if (apindex < AP2Results) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" - else - write "<*> Passed (9000;9004.3) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - ut_setrequirements LCX_90043, "P" - endif -else - write " Failed (9000;9004.3) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - ut_setrequirements LCX_90043, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9004.3;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9004.3;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9005, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2entries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9004.3;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_90043, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9004.3;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_90043, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 5.0: Clean-up" -write ";*********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_resetcds" -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_resetcds +;******************************************************************************* +; Test Name: lc_resetcds +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) +; functions properly properly when an application, cFE processor, or cFE +; power-on reset is performed. This test verifies that the appropriate +; data items are initialized to their proper values after each reset. +; Also, this test verifies that the data is restored from the cFE Critical +; Data Store (CDS) after an Application and Processesor reset is +; performed. Finally, this test verifies that the LC application restores +; the default values if the CDS is corrupted. +; +; NOTE: This test SHOULD NOT be executed if the configuration parameter +; indicating Save Critical Data is set to NO by the Mission. +; +; Requirements Tested +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message +; LC2004 For each Watchpoint, the flight software shall maintain the +; following statistics in the dump-only Watchpoint Results Table: +; a) The result of the last relational comparison (False, True, +; Error or Stale) +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) Most recent FALSE to TRUE transition value +; g) Most recent FALSE to TRUE transition timestamp +; h) Most recent TRUE to FALSE transition value +; i) Most recent TRUE to FALSE transition timestamp +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample(Pass,Fail,Error,Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result = +; Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC4004 Upon receipt of a Set All Actionpoints to Active Command, LC +; shall set the state for all Actionpoints to ACTIVE such that the +; actionpoints are evaluated and the table-defined actions are +; taken based on the evaluation +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; telemetry) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded +; a True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC9004 Upon a cFE Processor Reset or LC Application Reset, if the +; Save Critical Data parameter is set to YES, +; LC shall restore the following data: +; a) LC housekeeping data +; b) WDT +; c) Watchpoint statistics +; d) ADT +; e) Actionpoint statistics +; LC9004.1 LC shall initialize the LC Application State to +; Default Reset State +; LC9004.1.1 If the platform defined Default Reset State indicates to use the +; state of the LC Application prior to the reset, LC shall set +; the state of the LC Application to the state restored from the +; CDS +; LC9004.2 If LC determines the Critical Data is invalid, LC shall +; perform the same initialization as a cFE Power-On (see LC9000, +; LC9001 and LC9002) +; LC9005 Upon any initialization, LC shall validate the Watchpoint +; Definition Table for the following: +; a) valid operator +; b) data size +; c) Message ID +; LC9006 Upon any initialization, LC shall validate the Actionpoint +; Definition Table for the following: +; a) valid default state +; b) RTS number (in range) +; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) +; d) Failure Count (in range) +; e) Action Equation syntax +; LC9007 Upon any initialization, LC shall subscribe to the messages +; defined in the WDT. +; LC9007.1 For a cFE Processor Reset, if the Save Critical Data parameter +; is YES, LC shall subscribe to the messages defined in the WDT +; restored from the CDS +; LC9007.2 For an LC Application Reset, if the Save Critical Data +; parameter is YES, LC shall subscribe to the messages defined +; in the WDT restored from the CDS +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application exists and can be loaded and executed +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 09/27/12 Walt Moleski Original Procedure for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files for +; testing +; lc_adt1 Sets up the Actionpoint Definition table files for +; testing +; lc_wdt2 Sets up the Watchpoint Definition table files for +; testing +; lc_adt2 Sets up the Actionpoint Definition table files for +; testing +; +; Expected Test Results and Analysis +; +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "cfe_sb_events.h" +#include "to_lab_events.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_1003 0 +#define LC_2004 1 +#define LC_3006 2 +#define LC_4000 3 +#define LC_4004 4 +#define LC_8000 5 +#define LC_9000 6 +#define LC_9001 7 +#define LC_9002 8 +#define LC_9004 9 +#define LC_90041 10 +#define LC_900411 11 +#define LC_90042 12 +#define LC_9005 13 +#define LC_9006 14 +#define LC_9007 15 +#define LC_90071 16 +#define LC_90072 17 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +#define CMDFAIL 1 +#define CMDSUCCESS 2 + +global ut_req_array_size = 17 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1003","LC_2004", ;; + "LC_3006","LC_4000","LC_4004","LC_8000","LC_9000","LC_9001", ;; + "LC_9002","LC_9004","LC_9004.1","LC_9004.1.1","LC_9004.2", ;; + "LC_9005","LC_9006","LC_9007","LC_9007.1","LC_9007.2"] + + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL rawcmd +LOCAL stream1 +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL ADTentries = 12 +LOCAL APResults = 6 +LOCAL ADT2entries = 9 +LOCAL AP2Results = 5 +LOCAL WDTentries = 30 +LOCAL WDT2entries = 28 +LOCAL CmdStatus +LOCAL State +Local cmdctr +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local WRTTblName = LCAppName & ".LC_WRT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" +write "; to the spacecraft default file location for the LC application. " +write ";********************************************************************" +s $SC_$CPU_lc_wdt1 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt1 + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, hostCPU, "P") + +;; Display the pages used by this test +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT +page $SC_$CPU_LC_ADT +page $SC_$CPU_LC_WDT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the SC HK packet ID based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 12 APs that are being used +;;255 is because they are disabled and not measured +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= APResults) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + elseif ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" +endif + +;; CPU1 is the default +local wpAPID = "0FB9" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +;check initialization of WRT +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_9005, "P" +endif + +;check initialization of ART +;; CPU1 is the default +local apAPID = "0FB8" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 1.6: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the LC and "CFE_SB" applications ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 2.0: Application Reset Test" +write ";*********************************************************************" +write "; Step 2.1: Set the LC Application State to Active. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2: Set the Action Point States to Active. " +write ";*********************************************************************" +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" + +if (ut_sc_status = UT_SC_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.3: Send packets for all WP defined in WDT, data run #1 " +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.3",1) + +write ";*********************************************************************" +write "; Step 2.4: Send Sample Requests for the first 10 APs. " +write ";*********************************************************************" +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 2.5: Check the housekeeping counters " +write ";*********************************************************************" +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 10) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; + ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; + ($SC_$CPU_LC_ACTIVEAPS = 11) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then + break + endif + elseif (wpindex >=3) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + +;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured +;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 3) then + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif (apindex = 4) then + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + elseif (apindex = 5) then + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then + break + endif + elseif (apindex = 6) then + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then + break + endif + else + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" +endif + +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC =", $SC_$CPU_LC_CMDPC + write " CMDEC =", $SC_$CPU_LC_CMDEC + write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT =", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT + write " WP in use =", $SC_$CPU_LC_WPSINUSE + write " Active APs =", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 2.6: Dump the WRT and ART to verify the statistics. " +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index > 5) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2004) - WRT contains an entry that is not set properly." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2004) - WRT contains the proper values." + ut_setrequirements LC_2004, "P" +endif + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif ((index >= 6) and (index < 9)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif ((index = 10) or (index = 11)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3006) - ART contains an entry that is not set properly." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3006) - ART contains the proper values." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 2.7: Perform an Application Reset" +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app stop command sent properly." +else + write " Failed - LC app stop command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app stop command sent properly." +else + write " Failed - TST_LC app stop command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.8: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;; 20 subscriptions + 3 for LC App +if ($SC_$CPU_find_event[3].num_found_messages = 23) then + write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." + ut_setrequirements LC_9007, "P" + ut_setrequirements LC_90072, "P" +else + write " Failed (9007;9007.2) - Expected 23 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages + ut_setrequirements LC_9007, "F" + ut_setrequirements LC_90072, "F" +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 2.9: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 2.10: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +;; These should be the values set prior to the Application Restart +if ($SC_$CPU_LC_CMDPC = 2) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 10) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; + ($SC_$CPU_LC_RTSCNT = 1) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then + break + endif + elseif (wpindex >=3) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + +;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured +;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 3) then + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif (apindex = 4) then + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + elseif (apindex = 5) then + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then + break + endif + elseif (apindex = 6) then + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then + break + endif + else + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9004) - Housekeeping telemetry NOT initialized after application reset." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9004, "F" + else + write "<*> Passed (9004) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9004, "P" + endif +else + write " Failed (9004) - Housekeeping telemetry NOT initialized after application reset." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9004, "F" +endif + +;; Check the LC Application State +if (LC_STATE_WHEN_CDS_RESTORED = LC_STATE_FROM_CDS) then + if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) then + write "<*> Passed (9004.1;9004.1.1) - LC Application State initialized properly." + ut_setrequirements LC_90041, "P" + ut_setrequirements LC_900411, "P" + else + write " Failed (9004.1;9004.1.1) - LC Application State NOT set properly. Expected Active. State = ",p@$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" + ut_setrequirements LC_900411, "F" + endif +else + if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_WHEN_CDS_RESTORED) then + write "<*> Passed (9004.1) - LC Application State initialized properly." + ut_setrequirements LC_90041, "P" + else + write " Failed (9004.1) - LC Application State NOT set properly. Expected ",LC_STATE_WHEN_CDS_RESTORED,". State = ",$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" + endif +endif + +;;check initialization of WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index > 5) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9004) - WRT NOT initialized properly after application reset." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9004, "F" +else + write "<*> Passed (9004) - WRT initialized properly." + ut_setrequirements LC_9004, "P" +endif + +;check initialization of ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif ((index >= 6) and (index < 9)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif ((index = 10) or (index = 11)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9004) - ART NOT initialized properly after application reset." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9004, "F" +else + write "<*> Passed (9004) - ART initialized properly." + ut_setrequirements LC_9004, "P" +endif + +write ";*********************************************************************" +write "; Step 2.11: Send packets for all WP defined in WDT, data run #2 " +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.11",2) + +write ";*********************************************************************" +write "; Step 2.12: Send Sample Request for all 12 APs " +write ";*********************************************************************" +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 2.13: Check the housekeeping counters " +write ";*********************************************************************" +if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 22) AND ($SC_$CPU_LC_MONMSGCNT = 40) AND ;; + ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; + ($SC_$CPU_LC_ACTIVEAPS = 11) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x15) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x50) then + break + endif + elseif (wpindex = 3) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x01) then + break + endif + elseif (wpindex >=4) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + + for apindex = 1 to APACKED do + if (apindex =1) or (apindex = 4) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif (apindex = 2) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x54) then + break + endif + elseif (apindex =3) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x94) then + break + endif + elseif (apindex = 6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 2.14: Dump the WRT and ART to verify the statistics. " +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x45) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0230) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x130) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x542) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then + break + endif + elseif (index > 10) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2004) - WRT contains an entry that is not set properly." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2004) - WRT contains the proper values." + ut_setrequirements LC_2004, "P" +endif + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 3) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif ((index >= 3) and (index < 6)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif ((index >= 6) and (index < 9)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif ((index = 10) OR (index = 11)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3006) - ART contains an entry that is not set properly." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3006) - ART contains non-zero values." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 2.15: Perform a Processor Reset" +write ";*********************************************************************" +/$SC_$CPU_ES_PROCESSORRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 2.16: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 2.17: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 2.18: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the appropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;;check initialization of housekeeping +;; These should have the values from before the Reset +if ($SC_$CPU_LC_APSAMPLECNT = 22) AND ($SC_$CPU_LC_MONMSGCNT = 40) AND ;; + ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; + ($SC_$CPU_LC_ACTIVEAPS = 11) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x15) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x50) then + break + endif + elseif (wpindex = 3) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x01) then + break + endif + elseif (wpindex >=4) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + + for apindex = 1 to APACKED do + if (apindex =1) or (apindex = 4) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif (apindex = 2) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x54) then + break + endif + elseif (apindex =3) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x94) then + break + endif + elseif (apindex = 6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9004) - Housekeeping telemetry NOT correct after Processor Reset." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_9004, "F" + else + write "<*> Passed (9004) - Housekeeping telemetry was restored properly." + ut_setrequirements LC_9004, "P" + endif +else + write " Failed (9004) - Housekeeping telemetry NOT correct after Processor Reset." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_9004, "F" +endif + +;; Check the LC Application State +;; If the CDS was restored properly, the State should be 'Active' +;; Otherwise, Disabled +if (LC_STATE_WHEN_CDS_RESTORED = LC_STATE_FROM_CDS) then + if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) then + write "<*> Passed (9004.1;9004.1.1) - LC Application State initialized properly." + ut_setrequirements LC_90041, "P" + ut_setrequirements LC_900411, "P" + else + write " Failed (9004.1;9004.1.1) - LC Application State NOT set properly. Expected Active. State = ",p@$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" + ut_setrequirements LC_900411, "F" + endif +else + if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_WHEN_CDS_RESTORED) then + write "<*> Passed (9004.1) - LC Application State initialized properly." + ut_setrequirements LC_90041, "P" + else + write " Failed (9004.1) - LC Application State NOT set properly. Expected ",LC_STATE_WHEN_CDS_RESTORED,". State = ",$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" + endif +endif + +write ";*********************************************************************" +write "; Step 2.19: Dump the WRT and ART to verify the statistics. " +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x45) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0230) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x130) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x542) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then + break + endif + elseif (index > 10) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9004) - WRT was not properly restored after the Processor Reset." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_9004, "F" +else + write "<*> Passed (9004) - WRT was restored properly." + ut_setrequirements LC_9004, "P" +endif + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 3) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif ((index >= 3) and (index < 6)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif ((index >= 6) and (index < 9)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 11) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9004) - ART was not properly restored after the Processor Reset." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9004, "F" +else + write "<*> Passed - ART was properly restored." + ut_setrequirements LC_9004, "P" +endif + +write ";*********************************************************************" +write "; Step 2.20: Dump the SB Routing Table and verify that the MsgIDs in " +write "; the WDT are defined." +write ";*********************************************************************" +;; CPU1 is the default +local wdtAPID = "0FB7" + +;; Dump the WDT table to make sure we have the correct one +s get_tbl_to_cvt(ramDir, "LC.LC_WDT", "A", "$cpu_lc_wdt.dat", hostCPU, wdtAPID) +wait 5 + +;; Dump the SB Routing table +s get_file_to_cvt (ramDir, "cfe_sb_route.dat", "$cpu_sb_route.dat", hostCPU) +wait 5 + +local wdtMsgID +local foundSubscription = 0 + +for index = 0 to WDTentries-1 do + wdtMsgID = $SC_$CPU_LC_WDT[index].MessageID + write "== Looking for wdt #",index, " msgID = ", %hex(wdtMsgId,4) + for sbIndex = 1 to 16320 do + if ($SC_$CPU_SB_RouteEntry[sbIndex].SB_AppName = LCAppName) AND ;; + ($SC_$CPU_SB_RouteEntry[sbIndex].SB_MsgID = wdtMsgID) then + foundSubscription = foundSubscription + 1 + break + elseif ($SC_$CPU_SB_RouteEntry[sbIndex].SB_AppName = "") then + break + endif + enddo +enddo + +if (foundSubscription = WDTentries) then + write "<*> Passed (9007;9007.1) - All message IDs in WDT have subscriptions." + ut_setrequirements LC_9007, "P" + ut_setrequirements LC_90071, "P" +else + write " Failed (9007;9007.1) - Expected 30 message ID subscriptions. Found ",foundSubscription + ut_setrequirements LC_9007, "F" + ut_setrequirements LC_90071, "F" +endif + +write ";*********************************************************************" +write "; Step 3.0: Invalid CDS Data Tests - Processor Resets" +write ";***********************************************************************" +;; Display the CDS Registry page +page $SC_$CPU_ES_CDS_REGISTRY + +;; Dump the CDS Registry +s get_file_to_cvt(ramDir, "cfe_cds_reg.log", "$cpu_cds_reg.log", hostCPU) +wait 5 + +write ";***********************************************************************" +write "; Step 3.1: Send the command to set the Processor Reset Counter to 0. " +write ";**********************************************************************" +cmdCtr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_RESETPRCNT + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Reset PR Counter Command." +else + write " Failed - Reset PR Counter Command did not increment the CMDPC." +endif + +; Check the telemetry counter +if ($SC_$CPU_ES_PROCRESETCNT = 0) then + write "<*> Passed - Processor Reset Counter set to 0." +else + write " Failed - Processor Reset Counter did not reset." +endif + +write ";*********************************************************************" +write "; Step 3.2: Corrupt the CDS for the WDT Table " +write ";*********************************************************************" +local addval + +addval = 16 + CFE_ES_RESET_AREA_SIZE + (CFE_ES_RAM_DISK_SECTOR_SIZE * CFE_ES_RAM_DISK_NUM_SECTORS) + 20 + 4 + +write " Corrupt the SC Table Data Critical Data Store by performing the " +write " following steps:" +write " 1. Enter 'sysMemTop ""OS_BSPReservedMemoryPtr""' in the UART window" +write " 2. Add ", addval, " to the displayed value" +write " 3. Note the CDS ""Handle"" for LC.LC_WDT on the CDS_Registry page" +write " 4. Add the CDS Handle to the sum calculated in Step 2." +write " 5. Enter 'm ,2' in the UART window" +write " 6. Enter 4 and hit the enter or return key in the UART window" +write " 7. Enter 5 and hit the enter or return key in the UART window" +write " 8. Enter 6 and hit the enter or return key in the UART window" +write " 9. Type to end the modification command." +write " Type 'g' or 'go' in the ASIST command input field to continue." +wait + +write ";*********************************************************************" +write "; Step 3.3: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +;; Dumpt the WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +;; Set the LC Application State to ACTIVE +State = LC_STATE_ACTIVE + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.4: Perform a Processor Reset" +write ";*********************************************************************" +/$SC_$CPU_ES_PROCESSORRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 3.5: Create the WDT and ADT used for testing and upload them" +write "; to the spacecraft default file location for the LC application. " +write ";********************************************************************" +s $SC_$CPU_lc_wdt2 + +s ftp_file(defaultTblDir, "lc_def_wdt2.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt2 + +s ftp_file(defaultTblDir, "lc_def_adt2.tbl", adtFileName, hostCPU, "P") + +write ";*********************************************************************" +write "; Step 3.6: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 3.7: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 3.8: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 9 APs that are being used +;;255 is because they are disabled and not measured +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 1 to APACKED do + if (apindex < AP2Results) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000;9004.2) - WP or AP Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" + else + write "<*> Passed (9000;9004.2) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + ut_setrequirements LC_90042, "P" + endif +else + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" +endif + +;; Since the CDS was corrupted, the LC Application State should be set to +;; the POWER_ON_RESET state +if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_POWER_ON_RESET) then + write "<*> Passed (9004.1;9004.1.1) - LC Application State initialized properly." + ut_setrequirements LC_90041, "P" + ut_setrequirements LC_900411, "P" +else + write " Failed (9004.1;9004.1.1) - LC Application State NOT set properly. Expected Disabled. State = ",p@$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" + ut_setrequirements LC_900411, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9004.2;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9004.2;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9005, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2entries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9004.2;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9004.2;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 3.9: Corrupt the CDS for the ADT Table " +write ";*********************************************************************" + +write " Corrupt the SC Table Data Critical Data Store by entering the following" +write " commands in the UART/minicom window:" +write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" +write " 2. Add ", addval, " to the displayed value" +write " 3. Note the CDS ""Handle"" for LC.LC_ADT on that page" +write " 4. Add the CDS Handle to the sum calculated in Step 2." +write " 5. m ,2" +write " 6. Enter 4 and hit the enter or return key" +write " 7. Enter 5 and hit the enter or return key" +write " 8. Enter 6 and hit the enter or return key" +write " 9. Type to end the modification command." +write " Type 'g' or 'go' in the ASIST command input field to continue." +wait + +write ";*********************************************************************" +write "; Step 3.10: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +;; Dumpt the WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +;; Set the LC Application State to PASSIVE +State = LC_STATE_PASSIVE + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.11: Perform a Processor Reset" +write ";*********************************************************************" +/$SC_$CPU_ES_PROCESSORRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 3.12: Upload a different WDT and ADT to the spacecraft default" +write "; file location for the LC application. " +write ";********************************************************************" +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, hostCPU, "P") + +write ";*********************************************************************" +write "; Step 3.13: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 3.14: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 3.15: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 12 APs that are being used +;;255 is because they are disabled and not measured +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= APResults) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + elseif ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" + else + write "<*> Passed (9000;9004.2) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + ut_setrequirements LC_90042, "P" + endif +else + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" +endif + +;; Check the LC Application State +if ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) then + write "<*> Passed (9004.1;9004.1.1) - LC Application State initialized properly." + ut_setrequirements LC_90041, "P" + ut_setrequirements LC_900411, "P" +else + write " Failed (9004.1;9004.1.1) - LC Application State NOT set properly. Expected Passive. State = ",p@$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" + ut_setrequirements LC_900411, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9004.2;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9004.2;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9005, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9004.2;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9004.2;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 3.16: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the LC application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 4.0: Invalid CDS Data Tests - Application Resets" +write ";***********************************************************************" +write "; Step 4.1: Corrupt the CDS for the WDT Table " +write ";**********************************************************************" + +write " Corrupt the SC Table Data Critical Data Store by entering the following" +write " commands in the UART/minicom window:" +write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" +write " 2. Add ", addval, " to the displayed value" +write " 3. Note the CDS ""Handle"" for LC.LC_WDT on that page" +write " 4. Add the CDS Handle to the sum calculated in Step 2." +write " 5. m ,2" +write " 6. Enter 4 and hit the enter or return key" +write " 7. Enter 5 and hit the enter or return key" +write " 8. Enter 6 and hit the enter or return key" +write " 9. Type to end the modification command." +write " Type 'g' or 'go' in the ASIST command input field to continue." +wait + +write ";*********************************************************************" +write "; Step 4.2: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +;; Dumpt the WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +;; Set the LC Application State to ACTIVE +State = LC_STATE_ACTIVE + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.3: Stop the LC and TST_LC applications (Application Reset) " +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app stop command sent properly." +else + write " Failed - LC app stop command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app stop command sent properly." +else + write " Failed - TST_LC app stop command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.4: Create the WDT and ADT used for testing and upload them" +write "; to the spacecraft default file location for the LC application. " +write ";********************************************************************" +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, hostCPU, "P") + +write ";*********************************************************************" +write "; Step 4.5: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;; 20 subscriptions + 3 for LC App +if ($SC_$CPU_find_event[3].num_found_messages = 23) then + write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." + ut_setrequirements LC_9007, "P" + ut_setrequirements LC_90072, "P" +else + write " Failed (9007;9007.2) - Expected 23 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages + ut_setrequirements LC_9007, "F" + ut_setrequirements LC_90072, "F" +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 4.6: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 4.7: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 12 APs that are being used +;;255 is because they are disabled and not measured +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= APResults) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + elseif ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" + else + write "<*> Passed (9000;9004.2) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + ut_setrequirements LC_90042, "P" + endif +else + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9004.2;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9004.2;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9005, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9004.2;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9004.2;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 4.8: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the LC application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 4.9: Corrupt the CDS for the ADT Table " +write ";*********************************************************************" + +write " Corrupt the SC Table Data Critical Data Store by entering the following" +write " commands in the UART/minicom window:" +write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" +write " 2. Add ", addval, " to the displayed value" +write " 3. Note the CDS ""Handle"" for LC.LC_ADT on that page" +write " 4. Add the CDS Handle to the sum calculated in Step 2." +write " 5. m ,2" +write " 6. Enter 4 and hit the enter or return key" +write " 7. Enter 5 and hit the enter or return key" +write " 8. Enter 6 and hit the enter or return key" +write " 9. Type to end the modification command." +write " Type 'g' or 'go' in the ASIST command input field to continue." +wait + +write ";*********************************************************************" +write "; Step 4.10: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +;; Dumpt the WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +;; Set the LC Application State to ACTIVE +State = LC_STATE_PASSIVE + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.11: Stop the LC and TST_LC applications (Application Reset) " +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app stop command sent properly." +else + write " Failed - LC app stop command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app stop command sent properly." +else + write " Failed - TST_LC app stop command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.12: Create the WDT and ADT used for testing and upload them" +write "; to the spacecraft default file location for the LC application. " +write ";********************************************************************" +s ftp_file(defaultTblDir, "lc_def_wdt2.tbl", wdtFileName, hostCPU, "P") + +s ftp_file(defaultTblDir, "lc_def_adt2.tbl", adtFileName, hostCPU, "P") + +write ";*********************************************************************" +write "; Step 4.13: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;; 19 subscriptions + 3 for LC App +if ($SC_$CPU_find_event[3].num_found_messages = 22) then + write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." + ut_setrequirements LC_9007, "P" + ut_setrequirements LC_90072, "P" +else + write " Failed (9007;9007.2) - Expected 22 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages + ut_setrequirements LC_9007, "F" + ut_setrequirements LC_90072, "F" +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 4.14: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 4.15: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 9 APs that are being used +;;255 is because they are disabled and not measured +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 1 to APACKED do + if (apindex < AP2Results) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" + else + write "<*> Passed (9000;9004.2) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + ut_setrequirements LC_90042, "P" + endif +else + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9004.2;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9004.2;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9005, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2entries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9004.2;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9004.2;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 4.16: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the LC application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 4.17: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +;; Dumpt the WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +;; Set the LC Application State to ACTIVE +State = LC_STATE_ACTIVE + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.18: Stop the LC and TST_LC applications (Application Reset) " +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app stop command sent properly." +else + write " Failed - LC app stop command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app stop command sent properly." +else + write " Failed - TST_LC app stop command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.19: Corrupt the CDS for the WRT Statistics " +write ";*********************************************************************" + +write " Corrupt the SC Table Data Critical Data Store by entering the following" +write " commands in the UART/minicom window:" +write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" +write " 2. Add ", addval, " to the displayed value" +write " 3. Note the CDS ""Handle"" for LC.LC_CDS_WRT on that page" +write " 4. Add the CDS Handle to the sum calculated in Step 2." +write " 5. m ,2" +write " 6. Enter 4 and hit the enter or return key" +write " 7. Enter 5 and hit the enter or return key" +write " 8. Enter 6 and hit the enter or return key" +write " 9. Type to end the modification command." +write " Type 'g' or 'go' in the ASIST command input field to continue." +wait + +write ";*********************************************************************" +write "; Step 4.20: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1, 45 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;; 19 subscriptions + 3 for LC App +if ($SC_$CPU_find_event[3].num_found_messages = 22) then + write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." + ut_setrequirements LC_9007, "P" + ut_setrequirements LC_90072, "P" +else + write " Failed (9007;9007.2) - Expected 22 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages + ut_setrequirements LC_9007, "F" + ut_setrequirements LC_90072, "F" +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 4.21: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 4.22: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 9 APs that are being used +;;255 is because they are disabled and not measured +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 1 to APACKED do + if (apindex < AP2Results) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" + else + write "<*> Passed (9000;9004.2) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + ut_setrequirements LC_90042, "P" + endif +else + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_9005, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2entries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9004.2;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9004.2;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 4.23: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the LC application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 4.24: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +;; Dumpt the WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +;; Set the LC Application State to ACTIVE +State = LC_STATE_PASSIVE + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.25: Stop the LC and TST_LC applications (Application Reset) " +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app stop command sent properly." +else + write " Failed - LC app stop command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app stop command sent properly." +else + write " Failed - TST_LC app stop command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.26: Corrupt the CDS for the ART Statistics " +write ";*********************************************************************" + +write " Corrupt the SC Table Data Critical Data Store by entering the following" +write " commands in the UART/minicom window:" +write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" +write " 2. Add ", addval, " to the displayed value" +write " 3. Note the CDS ""Handle"" for LC.LC_CDS_ART on that page" +write " 4. Add the CDS Handle to the sum calculated in Step 2." +write " 5. m ,2" +write " 6. Enter 4 and hit the enter or return key" +write " 7. Enter 5 and hit the enter or return key" +write " 8. Enter 6 and hit the enter or return key" +write " 9. Type to end the modification command." +write " Type 'g' or 'go' in the ASIST command input field to continue." +wait + +write ";*********************************************************************" +write "; Step 4.27: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;; 19 subscriptions + 3 for LC App +if ($SC_$CPU_find_event[3].num_found_messages = 22) then + write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." + ut_setrequirements LC_9007, "P" + ut_setrequirements LC_90072, "P" +else + write " Failed (9007;9007.2) - Expected 22 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages + ut_setrequirements LC_9007, "F" + ut_setrequirements LC_90072, "F" +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 4.28: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 4.29: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 9 APs that are being used +;;255 is because they are disabled and not measured +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 1 to APACKED do + if (apindex < AP2Results) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" + else + write "<*> Passed (9000;9004.2) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + ut_setrequirements LC_90042, "P" + endif +else + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9004.2;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9004.2;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9005, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2entries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9004.2;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9004.2;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 4.30: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the LC application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 4.31: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +;; Dumpt the WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +;; Set the LC Application State to ACTIVE +State = LC_STATE_ACTIVE + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.32: Stop the LC and TST_LC applications (Application Reset) " +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app stop command sent properly." +else + write " Failed - LC app stop command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app stop command sent properly." +else + write " Failed - TST_LC app stop command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.33: Corrupt the CDS for the LC housekeeping data" +write ";*********************************************************************" + +write " Corrupt the SC Table Data Critical Data Store by entering the following" +write " commands in the UART/minicom window:" +write " 1. sysMemTop ""OS_BSPReservedMemoryPtr""" +write " 2. Add ", addval, " to the displayed value" +write " 3. Note the CDS ""Handle"" for LC.LC_CDS_AppData on that page" +write " 4. Add the CDS Handle to the sum calculated in Step 2." +write " 5. m ,2" +write " 6. Enter 4 and hit the enter or return key" +write " 7. Enter 5 and hit the enter or return key" +write " 8. Enter 6 and hit the enter or return key" +write " 9. Type to end the modification command." +write " Type 'g' or 'go' in the ASIST command input field to continue." +wait + +write ";*********************************************************************" +write "; Step 4.34: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;; 19 subscriptions + 3 for LC App +if ($SC_$CPU_find_event[3].num_found_messages = 22) then + write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." + ut_setrequirements LC_9007, "P" + ut_setrequirements LC_90072, "P" +else + write " Failed (9007;9007.2) - Expected 22 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages + ut_setrequirements LC_9007, "F" + ut_setrequirements LC_90072, "F" +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 4.35: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 4.36: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 9 APs that are being used +;;255 is because they are disabled and not measured +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 1 to APACKED do + if (apindex < AP2Results) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 63) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" + else + write "<*> Passed (9000;9004.2) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + ut_setrequirements LC_90042, "P" + endif +else + write " Failed (9000;9004.2) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + ut_setrequirements LC_90042, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9004.2;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9004.2;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9005, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2entries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9004.2;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_90042, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9004.2;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_90042, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 5.0: Clean-up" +write ";*********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_resetcds" +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_resetcdsstate.prc b/test_and_ground/asist/prc/template/template_lc_resetcdsstate.prc similarity index 83% rename from test_and_ground/asist/prc/template/template_lcx_resetcdsstate.prc rename to test_and_ground/asist/prc/template/template_lc_resetcdsstate.prc index f1662d7..cee078e 100644 --- a/test_and_ground/asist/prc/template/template_lcx_resetcdsstate.prc +++ b/test_and_ground/asist/prc/template/template_lc_resetcdsstate.prc @@ -1,927 +1,890 @@ -PROC $sc_$cpu_lcx_resetcdsstate -;******************************************************************************* -; Test Name: lcx_resetcds -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker (LC) restores -; the proper LC Application State when an application and cFE processor -; reset is performed. -; -; NOTE: This test SHOULD NOT be executed if the configuration parameter -; indicating Save Critical Data is set to NO by the Mission. -; -; Requirements Tested -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LC Application to Active -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; telemetry) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LCX State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; Stale -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded -; a True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to NOT MEASURED -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result = -; Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LC9004.1 LC shall initialize the LC Application State to -; Default Reset State -; LC9005 Upon any initialization, LC shall validate the Watchpoint -; Definition Table for the following: -; a) valid operator -; b) data size -; c) Message ID -; LC9006 Upon any initialization, LC shall validate the Actionpoint -; Definition Table for the following: -; a) valid default state -; b) RTS number (in range) -; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) -; d) Failure Count (in range) -; e) Action Equation syntax -; LC9007 Upon any initialization, LC shall subscribe to the messages -; defined in the WDT. -; LC9007.2 For an LC Application Reset, if the Save Critical Data parameter -; is YES, LC shall subscribe to the messages defined in the WDT -; restored from the CDS -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 05/21/09 Walt Moleski Original Procedure. -; 02/08/11 Walt Moleski Added variables for app and table names -; and replaced hard-coded instances -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lc_wdt1 Sets up the Watchpoint Definition table files for -; testing -; lc_adt1 Sets up the Actionpoint Definition table files for -; testing -; -; Expected Test Results and Analysis -; -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "cfe_sb_events.h" -#include "to_lab_events.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1003 0 -#define LCX_4000 1 -#define LCX_8000 2 -#define LCX_9000 3 -#define LCX_9001 4 -#define LCX_9002 5 -#define LCX_90041 6 -#define LCX_9005 7 -#define LCX_9006 8 -#define LCX_9007 9 -#define LCX_90072 10 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -global ut_req_array_size = 10 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1003","LCX_4000", ;; - "LCX_8000","LCX_9000","LCX_9001","LCX_9002","LCX_9004.1","LCX_9005", ;; - "LCX_9006","LCX_9007","LCX_9007.2"] - - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL stream1 -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL ADTentries = 12 -LOCAL APResults = 6 -LOCAL State -Local cmdctr -local CDSGood -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local WRTTblName = LCAppName & ".LC_WRT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" -write "; to the spacecraft default file location for the LC application. " -write ";********************************************************************" -s $SC_$CPU_lcx_wdt1 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt1 - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, "$CPU", "P") - -;; Display the pages used by this test -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the SC HK packet ID based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 12 APs that are being used -;;255 is because they are disabled and not measured -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= APResults) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - elseif ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of failure = ", apindex - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" -endif - -;check initialization of WRT -;; CPU1 is the default -local wpAPID = "0FB9" - -if ("$CPU" = "CPU2") then - wpAPID = "0FD7" -elseif ("$CPU" = "CPU3") then - wpAPID = "0FF7" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_9005, "P" -endif - -;check initialization of ART -;; CPU1 is the default -local apAPID = "0FB8" - -if ("$CPU" = "CPU2") then - apAPID = "0FD6" -elseif ("$CPU" = "CPU3") then - apAPID = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 1.6: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the LC and CFE_SB application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 2.0: Application Reset Test" -write ";*********************************************************************" -write "; Step 2.1: Set the LC Application State to a state different than the" -write "; state to be restored." -write ";*********************************************************************" -if (LC_STATE_WHEN_CDS_RESTORED <> LC_STATE_ACTIVE) then - State = LC_STATE_ACTIVE -else - State = LC_STATE_PASSIVE -endif - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) then - write "<*> Passed (1003;4000) - Set LC Application State command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2: Perform an Application Reset" -write ";*********************************************************************" -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application=LCAppName -wait 5 - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - LC app stop command sent properly." -else - write " Failed - LC app stop command did not increment CMDPC." -endif - -wait 5 - -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application="TST_LC" - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC app stop command sent properly." -else - write " Failed - TST_LC app stop command did not increment CMDPC." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_CDS_RESTORED_INF_EID, "INFO", 4 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;; 20 subscriptions + 3 for LC App -if ($SC_$CPU_find_event[3].num_found_messages = 23) then - write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." - ut_setrequirements LCX_9007, "P" - ut_setrequirements LCX_90072, "P" -else - write " Failed (9007;9007.2) - Expected 23 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages - ut_setrequirements LCX_9007, "F" - ut_setrequirements LCX_90072, "F" -endif - -CDSGood = "No" -;; See if the CDS was properly restored - Event Msg -if ($SC_$CPU_find_event[4].num_found_messages = 1) then - CDSGood = "Yes" -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 2.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 2.5: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;; Check the LC Application State -if (CDSGood = "Yes") then - if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_WHEN_CDS_RESTORED) then - write "<*> Passed (9004.1) - LC Application State initialized properly from CDS." - ut_setrequirements LCX_90041, "P" - else - write " Failed (9004.1) - LC Application State NOT set properly in CDS. Expected ",LC_STATE_WHEN_CDS_RESTORED,". State = ",$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" - endif -else - write " Failed (9004.1) - LC Application State NOT set properly after Application Reset because CDS was not properly restored. Expected ",LC_STATE_WHEN_CDS_RESTORED,". State = ",$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" -endif - -write ";*********************************************************************" -write "; Step 2.6: Set the LC Application State to a state different than the" -write "; state to be restored." -write ";*********************************************************************" -if (LC_STATE_WHEN_CDS_RESTORED <> LC_STATE_ACTIVE) then - State = LC_STATE_ACTIVE -else - State = LC_STATE_PASSIVE -endif - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) then - write "<*> Passed (1003;4000) - Set LC Application State command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - - -write ";*********************************************************************" -write "; Step 2.7: Perform a Processor Reset" -write ";*********************************************************************" -/$SC_$CPU_ES_PROCESSORRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 2.8: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_CDS_RESTORED_INF_EID, "INFO", 3 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -CDSGood = "No" -;; See if the CDS was properly restored - Event Msg -if ($SC_$CPU_find_event[3].num_found_messages = 1) then - CDSGood = "Yes" -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 2.9: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 2.10: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;; Check the LC Application State -if (CDSGood = "Yes") then - if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_WHEN_CDS_RESTORED) then - write "<*> Passed (9004.1) - LC Application State initialized properly." - ut_setrequirements LCX_90041, "P" - else - write " Failed (9004.1) - LC Application State NOT set properly. Expected ",LC_STATE_WHEN_CDS_RESTORED,". State = ",$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" - endif -else - write " Failed (9004.1) - LC Application State NOT set properly after Processor Reset because CDS was not properly restored. Expected ",LC_STATE_WHEN_CDS_RESTORED,". State = ",$SC_$CPU_LC_CURLCSTATE - ut_setrequirements LCX_90041, "F" -endif - -write ";*********************************************************************" -write "; Step 3.0: Clean-up" -write ";*********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_resetcdsstate" -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_resetcdsstate +;******************************************************************************* +; Test Name: lc_resetcds +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) restores +; the proper LC Application State when an application and cFE processor +; reset is performed. +; +; NOTE: This test SHOULD NOT be executed if the configuration parameter +; indicating Save Critical Data is set to NO by the Mission. +; +; Requirements Tested +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; telemetry) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; Stale +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded +; a True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to NOT MEASURED +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result = +; Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC9004.1 LC shall initialize the LC Application State to +; Default Reset State +; LC9005 Upon any initialization, LC shall validate the Watchpoint +; Definition Table for the following: +; a) valid operator +; b) data size +; c) Message ID +; LC9006 Upon any initialization, LC shall validate the Actionpoint +; Definition Table for the following: +; a) valid default state +; b) RTS number (in range) +; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) +; d) Failure Count (in range) +; e) Action Equation syntax +; LC9007 Upon any initialization, LC shall subscribe to the messages +; defined in the WDT. +; LC9007.2 For an LC Application Reset, if the Save Critical Data parameter +; is YES, LC shall subscribe to the messages defined in the WDT +; restored from the CDS +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 05/21/09 Walt Moleski Original Procedure. +; 02/08/11 Walt Moleski Added variables for app and table names +; and replaced hard-coded instances +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files for +; testing +; lc_adt1 Sets up the Actionpoint Definition table files for +; testing +; +; Expected Test Results and Analysis +; +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "cfe_sb_events.h" +#include "to_lab_events.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_1003 0 +#define LC_4000 1 +#define LC_8000 2 +#define LC_9000 3 +#define LC_9001 4 +#define LC_9002 5 +#define LC_90041 6 +#define LC_9005 7 +#define LC_9006 8 +#define LC_9007 9 +#define LC_90072 10 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +global ut_req_array_size = 10 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1003","LC_4000", ;; + "LC_8000","LC_9000","LC_9001","LC_9002","LC_9004.1","LC_9005", ;; + "LC_9006","LC_9007","LC_9007.2"] + + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL stream1 +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL ADTentries = 12 +LOCAL APResults = 6 +LOCAL State +Local cmdctr +local CDSGood +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local WRTTblName = LCAppName & ".LC_WRT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" +write "; to the spacecraft default file location for the LC application. " +write ";********************************************************************" +s $SC_$CPU_lc_wdt1 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt1 + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, hostCPU, "P") + +;; Display the pages used by this test +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the SC HK packet ID based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 12 APs that are being used +;;255 is because they are disabled and not measured +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= APResults) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + elseif ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of failure = ", apindex + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" +endif + +;check initialization of WRT +;; CPU1 is the default +local wpAPID = "0FB9" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_9005, "P" +endif + +;check initialization of ART +;; CPU1 is the default +local apAPID = "0FB8" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 1.6: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the LC and CFE_SB application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 2.0: Application Reset Test" +write ";*********************************************************************" +write "; Step 2.1: Set the LC Application State to a state different than the" +write "; state to be restored." +write ";*********************************************************************" +if (LC_STATE_WHEN_CDS_RESTORED <> LC_STATE_ACTIVE) then + State = LC_STATE_ACTIVE +else + State = LC_STATE_PASSIVE +endif + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) then + write "<*> Passed (1003;4000) - Set LC Application State command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2: Perform an Application Reset" +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app stop command sent properly." +else + write " Failed - LC app stop command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app stop command sent properly." +else + write " Failed - TST_LC app stop command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_CDS_RESTORED_INF_EID, "INFO", 4 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;; 20 subscriptions + 3 for LC App +if ($SC_$CPU_find_event[3].num_found_messages = 23) then + write "<*> Passed (9007;9007.2) - Rcv'd the correct number of Subscription events for LC." + ut_setrequirements LC_9007, "P" + ut_setrequirements LC_90072, "P" +else + write " Failed (9007;9007.2) - Expected 23 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages + ut_setrequirements LC_9007, "F" + ut_setrequirements LC_90072, "F" +endif + +CDSGood = "No" +;; See if the CDS was properly restored - Event Msg +if ($SC_$CPU_find_event[4].num_found_messages = 1) then + CDSGood = "Yes" +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 2.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 2.5: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 +local expectedState + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;; Check the LC Application State +if (CDSGood = "Yes") then + if (LC_STATE_WHEN_CDS_RESTORED = LC_STATE_FROM_CDS) then + expectedState = State + else + expectedState = LC_STATE_WHEN_CDS_RESTORED + endif + + if ($SC_$CPU_LC_CURLCSTATE = expectedState) then + write "<*> Passed (9004.1) - LC Application State initialized properly from CDS." + ut_setrequirements LC_90041, "P" + else + write " Failed (9004.1) - LC Application State NOT set properly in CDS. Expected ",expectedState,". State = ",$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" + endif +else + write " Failed (9004.1) - LC Application State NOT set properly after Application Reset because CDS was not properly restored. Expected ",expectedState,". State = ",$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" +endif + +write ";*********************************************************************" +write "; Step 2.6: Set the LC Application State to a state different than the" +write "; state to be restored." +write ";*********************************************************************" +if (LC_STATE_WHEN_CDS_RESTORED <> LC_STATE_ACTIVE) then + State = LC_STATE_ACTIVE +else + State = LC_STATE_PASSIVE +endif + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) then + write "<*> Passed (1003;4000) - Set LC Application State command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + + +write ";*********************************************************************" +write "; Step 2.7: Perform a Processor Reset" +write ";*********************************************************************" +/$SC_$CPU_ES_PROCESSORRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 2.8: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_CDS_RESTORED_INF_EID, "INFO", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +CDSGood = "No" +;; See if the CDS was properly restored - Event Msg +if ($SC_$CPU_find_event[3].num_found_messages = 1) then + CDSGood = "Yes" +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 2.9: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 2.10: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;; Check the LC Application State +if (CDSGood = "Yes") then + if (LC_STATE_WHEN_CDS_RESTORED = LC_STATE_FROM_CDS) then + expectedState = State + else + expectedState = LC_STATE_WHEN_CDS_RESTORED + endif + + if ($SC_$CPU_LC_CURLCSTATE = expectedState) then + write "<*> Passed (9004.1) - LC Application State initialized properly from CDS." + ut_setrequirements LC_90041, "P" + else + write " Failed (9004.1) - LC Application State NOT set properly in CDS. Expected ",expectedState,". State = ",$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" + endif +else + write " Failed (9004.1) - LC Application State NOT set properly after Application Reset because CDS was not properly restored. Expected ",expectedState,". State = ",$SC_$CPU_LC_CURLCSTATE + ut_setrequirements LC_90041, "F" +endif + +write ";*********************************************************************" +write "; Step 3.0: Clean-up" +write ";*********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_resetcdsstate" +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_resetnocds.prc b/test_and_ground/asist/prc/template/template_lc_resetnocds.prc similarity index 88% rename from test_and_ground/asist/prc/template/template_lcx_resetnocds.prc rename to test_and_ground/asist/prc/template/template_lc_resetnocds.prc index 656de03..b02782c 100644 --- a/test_and_ground/asist/prc/template/template_lcx_resetnocds.prc +++ b/test_and_ground/asist/prc/template/template_lc_resetnocds.prc @@ -1,1724 +1,1674 @@ -PROC $sc_$cpu_lcx_resetnocds -;******************************************************************************* -; Test Name: lcx_resetnocds -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker eXtended (LCX) -; functions properly properly when an application, cFE processor, or cFE -; power-on reset is performed. This test verifies that the appropriate -; data items are initialized to their default values after each reset. -; -; NOTE: This test SHOULD NOT be executed if the configuration parameter -; indicating Save Critical Data is set to YES by the Mission. -; -; Requirements Tested -; LCX2004 For each Watchpoint, the flight software shall maintain the -; following statistics in the dump-only Watchpoint Results Table: -; a) The result of the last relational comparison (False, True, -; Error or Stale) -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) Most recent FALSE to TRUE transition value -; g) Most recent FALSE to TRUE transition timestamp -; h) Most recent TRUE to FALSE transition value -; i) Most recent TRUE to FALSE transition timestamp -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample(Pass,Fail,Error,Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LC Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; tlm) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LC State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX9003 Upon a cFE Processor Reset or LCX Application Reset, if the -; Save Critical Data parameter is set to NO, -; LCX shall perform the same initialization as a cFE Power-on -; (see LCX9000, LCX9001 and LCX9002) -; LCX9005 Upon any initialization, LCX shall validate the Watchpoint -; Definition Table for the following: -; a) valid operator -; b) data size -; c) Message ID -; LCX9006 Upon any initialization, LCX shall validate the Actionpoint -; Definition Table for the following: -; a) valid default state -; b) RTS number (in range) -; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) -; d) Failure Count (in range) -; e) Action Equation syntax -; LCX9007 Upon any initialization, LCX shall subscribe to the messages -; defined in the WDT. -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 10/01/12 Walt Moleski Original Procedure. -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lc_wdt1 Sets up the Watchpoint Definition table files for -; testing -; lc_adt1 Sets up the Actionpoint Definition table files for -; testing -; -; Expected Test Results and Analysis -; -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "cfe_sb_events.h" -#include "to_lab_events.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_2004 0 -#define LCX_3006 1 -#define LCX_8000 2 -#define LCX_9000 3 -#define LCX_9001 4 -#define LCX_9002 5 -#define LCX_9003 6 -#define LCX_9005 7 -#define LCX_9006 8 -#define LCX_9007 9 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -#define CMDFAIL 1 -#define CMDSUCCESS 2 - -global ut_req_array_size = 9 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_2004","LCX_3006", ;; - "LCX_8000","LCX_9000","LCX_9001","LCX_9002","LCX_9003","LCX_9005", ;; - "LCX_9006","LCX_9007"] - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL rawcmd -LOCAL stream1 -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL ADTentries = 12 -LOCAL APResults = ADTentries/2 -LOCAL WDTentries = 30 -LOCAL CmdStatus -LOCAL State -Local cmdctr -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local WRTTblName = LCAppName & ".LC_WRT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" -write "; to the spacecraft default file location for the LC application. " -write ";********************************************************************" -s $SC_$CPU_lcx_wdt1 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt1 - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, "$CPU", "P") - -;; Display the pages used by this test -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the SC HK packet ID based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;first check the 12 APs that are being used -;;255 is because they are disabled and not measured - for apindex = 1 to APResults do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo -;;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = APResults+1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" -endif - -;check initialization of WRT -;; CPU1 is the default -local wpAPID = "0FB9" - -if ("$CPU" = "CPU2") then - wpAPID = "0FD7" -elseif ("$CPU" = "CPU3") then - wpAPID = "0FF7" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9005) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_9005, "F" -else - write "<*> Passed (9001;9005) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_9005, "P" -endif - -;check initialization of ART -;; CPU1 is the default -local apAPID = "0FB8" - -if ("$CPU" = "CPU2") then - apAPID = "0FD6" -elseif ("$CPU" = "CPU3") then - apAPID = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 1.6: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the SC and CFE_TBL application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 2.0: Application Reset Test" -write ";*********************************************************************" -write "; Step 2.1: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -write ";*********************************************************************" -write "; Step 2.2: Dump the WRT and ART to verify the statistics. " -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue = 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue = 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2004) - WRT contains an entry that is not set properly." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2004) - WRT contains non-zero values." - ut_setrequirements LCX_2004, "P" -endif - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3006) - ART contains an entry that is not set properly." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3006) - ART contains non-zero values." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 2.3: Perform an Application Reset" -write ";*********************************************************************" -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application="TST_LC" - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC app stop command sent properly." -else - write " Failed - TST_LC app stop command did not increment CMDPC." -endif - -wait 5 - -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_DELETEAPP Application=LCAppName -wait 5 - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - LC app stop command sent properly." -else - write " Failed - LC app stop command did not increment CMDPC." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.4: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;; 20 subscriptions + 3 for the LC App -if ($SC_$CPU_find_event[3].num_found_messages = 23) then - write "<*> Passed (9007) - Rcv'd the correct number of Subscription events for LC." - ut_setrequirements LCX_9007, "P" -else - write " Failed (9007) - Expected 20 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages - ut_setrequirements LCX_9007, "F" - -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 2.5: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 2.7: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the appropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN - ;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo - ;;first check the 12 APs that are being used - ;;255 is because they are disabled and not measured - for apindex = 1 to APResults do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo - ;;then check the rest of the APs - ;; 51 is because the APs are not used and not measured - for apindex = APResults+1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9003) - Housekeeping telemetry NOT initialized after application reset." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9003, "F" - else - write "<*> Passed (9003) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9003, "P" - endif -else - write " Failed (9003) - Housekeeping telemetry NOT initialized after application reset." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" -endif - -;;check initialization of WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9003) - WRT NOT initialized properly after application reset." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9003, "F" -else - write "<*> Passed (9003) - WRT initialized properly." - ut_setrequirements LCX_9003, "P" -endif - -;check initialization of ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9003) - ART NOT initialized properly after application reset." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9003, "F" -else - write "<*> Passed (9003) - ART initialized properly." - ut_setrequirements LCX_9003, "P" -endif - -write ";*********************************************************************" -write "; Step 2.8: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -write ";*********************************************************************" -write "; Step 2.9: Dump the WRT and ART to verify the statistics. " -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue = 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue = 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed - WRT contains an entry that is not set properly." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) -else - write "<*> Passed - WRT contains non-zero values." - ut_setrequirements LCX_2004, "P" -endif - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed - ART contains an entry that is not set properly." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount -else - write "<*> Passed - ART contains non-zero values." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 2.10: Restart the LC and TST_LC Applications" -write ";*********************************************************************" -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_RESTARTAPP Application=LCAppName -wait 5 - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - LC app Restart command sent properly." -else - write " Failed - LC app Restart command did not increment CMDPC." -endif - -wait 5 - -cmdctr = $SC_$CPU_ES_CMDPC + 1 - -/$SC_$CPU_ES_RESTARTAPP Application="TST_LC" - -ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC app Restart command sent properly." -else - write " Failed - TST_LC app Restart command did not increment CMDPC." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.11: Verify that the LC Housekeeping items are initialized. " -write ";*********************************************************************" -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN - ;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo - ;;first check the 12 APs that are being used - ;;255 is because they are disabled and not measured - for apindex = 1 to APResults do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo - ;;then check the rest of the APs - ;; 51 is because the APs are not used and not measured - for apindex = APResults+1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9003) - Housekeeping telemetry NOT initialized after application restart." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9003, "F" - else - write "<*> Passed (9003) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9003, "P" - endif -else - write " Failed (9003) - Housekeeping telemetry NOT initialized after application restart." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9003, "F" -endif - -;;check initialization of WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9003) - WRT NOT initialized properly after application reset." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9003, "F" -else - write "<*> Passed (9003) - WRT initialized properly." - ut_setrequirements LCX_9003, "P" -endif - -;check initialization of ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9003) - ART NOT initialized properly after application reset." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9003, "F" -else - write "<*> Passed (9003) - ART initialized properly." - ut_setrequirements LCX_9003, "P" -endif - -write ";*********************************************************************" -write "; Step 3.0: Processor Reset Test " -write ";*********************************************************************" -write "; Step 3.1: Send the commands to set the counters, Watch Point and " -write "; Action Point statistics to non-zero. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the LC Housekeeping counters to non-zero -/$SC_$CPU_TST_LC_SETCOUNTERS - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set Counters command sent properly." -else - write " Failed - TST_LC Set Counters command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set Counters Event Message rcv'd" -else - write " Failed - TST_LC Set Counters Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Watchpoint Results Table (WRT) Statistics to non-zero -/$SC_$CPU_TST_LC_SETWRT - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set WRT command sent properly." -else - write " Failed - TST_LC Set WRT command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set WRT Event Message rcv'd" -else - write " Failed - TST_LC Set WRT Event Message not received." -endif - -cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 - -;; Set the Actionpoint Results Table (ART) Statistics to non-zero -/$SC_$CPU_TST_LC_SETART - -ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Set ART command sent properly." -else - write " Failed - TST_LC Set ART command." -endif - -; Wait for event message -ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - TST_LC Set ART Event Message rcv'd" -else - write " Failed - TST_LC Set ART Event Message not received." -endif - -write ";*********************************************************************" -write "; Step 3.2: Dump the WRT and ART to verify the statistics. " -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount = 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue = 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue = 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed - WRT contains an entry that is not set properly." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) -else - write "<*> Passed - WRT contains non-zero values." - ut_setrequirements LCX_2004, "P" -endif - -;; Dump the ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed - ART contains an entry that is not set properly." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount -else - write "<*> Passed - ART contains non-zero values." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 3.3: Perform a Processor Reset" -write ";*********************************************************************" -/$SC_$CPU_ES_PROCESSORRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 3.4: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 3.5: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 3.7: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN - ;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo - ;;first check the 12 APs that are being used - ;;255 is because they are disabled and not measured - for apindex = 1 to APResults do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo - ;;then check the rest of the APs - ;; 51 is because the APs are not used and not measured - for apindex = APResults+1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9003) - Housekeeping telemetry NOT initialized after application reset." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9003, "F" - else - write "<*> Passed (9003) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9003, "P" - endif -else - write " Failed (9003) - Housekeeping telemetry NOT initialized after application reset." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" -endif - -;;check initialization of WRT -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9003) - WRT NOT initialized properly after application reset." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9003, "F" -else - write "<*> Passed (9003) - WRT initialized properly." - ut_setrequirements LCX_9003, "P" -endif - -;check initialization of ART -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9003) - ART NOT initialized properly after application reset." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9003, "F" -else - write "<*> Passed (9003) - ART initialized properly." - ut_setrequirements LCX_9003, "P" -endif - -write ";*********************************************************************" -write "; Step 4.0: Clean-up" -write ";*********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_resetnocds" -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_resetnocds +;******************************************************************************* +; Test Name: lc_resetnocds +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) +; functions properly properly when an application, cFE processor, or cFE +; power-on reset is performed. This test verifies that the appropriate +; data items are initialized to their default values after each reset. +; +; NOTE: This test SHOULD NOT be executed if the configuration parameter +; indicating Save Critical Data is set to YES by the Mission. +; +; Requirements Tested +; LC2004 For each Watchpoint, the flight software shall maintain the +; following statistics in the dump-only Watchpoint Results Table: +; a) The result of the last relational comparison (False, True, +; Error or Stale) +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) Most recent FALSE to TRUE transition value +; g) Most recent FALSE to TRUE transition timestamp +; h) Most recent TRUE to FALSE transition value +; i) Most recent TRUE to FALSE transition timestamp +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample(Pass,Fail,Error,Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; tlm) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC9003 Upon a cFE Processor Reset or LC Application Reset, if the +; Save Critical Data parameter is set to NO, +; LC shall perform the same initialization as a cFE Power-on +; (see LC9000, LC9001 and LC9002) +; LC9005 Upon any initialization, LC shall validate the Watchpoint +; Definition Table for the following: +; a) valid operator +; b) data size +; c) Message ID +; LC9006 Upon any initialization, LC shall validate the Actionpoint +; Definition Table for the following: +; a) valid default state +; b) RTS number (in range) +; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) +; d) Failure Count (in range) +; e) Action Equation syntax +; LC9007 Upon any initialization, LC shall subscribe to the messages +; defined in the WDT. +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 10/01/12 Walt Moleski Original Procedure. +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files for +; testing +; lc_adt1 Sets up the Actionpoint Definition table files for +; testing +; +; Expected Test Results and Analysis +; +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "cfe_sb_events.h" +#include "to_lab_events.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_2004 0 +#define LC_3006 1 +#define LC_8000 2 +#define LC_9000 3 +#define LC_9001 4 +#define LC_9002 5 +#define LC_9003 6 +#define LC_9005 7 +#define LC_9006 8 +#define LC_9007 9 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +#define CMDFAIL 1 +#define CMDSUCCESS 2 + +global ut_req_array_size = 9 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_2004","LC_3006", ;; + "LC_8000","LC_9000","LC_9001","LC_9002","LC_9003","LC_9005", ;; + "LC_9006","LC_9007"] + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL rawcmd +LOCAL stream1 +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL ADTentries = 12 +LOCAL APResults = ADTentries/2 +LOCAL WDTentries = 30 +LOCAL CmdStatus +LOCAL State +Local cmdctr +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local WRTTblName = LCAppName & ".LC_WRT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" +write "; to the spacecraft default file location for the LC application. " +write ";********************************************************************" +s $SC_$CPU_lc_wdt1 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt1 + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, hostCPU, "P") + +;; Display the pages used by this test +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the SC HK packet ID based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;first check the 12 APs that are being used +;;255 is because they are disabled and not measured + for apindex = 1 to APResults do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo +;;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = APResults+1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" +endif + +;check initialization of WRT +;; CPU1 is the default +local wpAPID = "0FB9" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9005) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_9005, "F" +else + write "<*> Passed (9001;9005) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_9005, "P" +endif + +;check initialization of ART +;; CPU1 is the default +local apAPID = "0FB8" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 1.6: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the SC and CFE_TBL application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 2.0: Application Reset Test" +write ";*********************************************************************" +write "; Step 2.1: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +write ";*********************************************************************" +write "; Step 2.2: Dump the WRT and ART to verify the statistics. " +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue = 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue = 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2004) - WRT contains an entry that is not set properly." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2004) - WRT contains non-zero values." + ut_setrequirements LC_2004, "P" +endif + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3006) - ART contains an entry that is not set properly." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3006) - ART contains non-zero values." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 2.3: Perform an Application Reset" +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app stop command sent properly." +else + write " Failed - TST_LC app stop command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app stop command sent properly." +else + write " Failed - LC app stop command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.4: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "CFE_SB", CFE_SB_SUBSCRIPTION_RCVD_EID, "DEBUG", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;; 20 subscriptions + 3 for the LC App +if ($SC_$CPU_find_event[3].num_found_messages = 23) then + write "<*> Passed (9007) - Rcv'd the correct number of Subscription events for LC." + ut_setrequirements LC_9007, "P" +else + write " Failed (9007) - Expected 20 message subscription events. Rcv'd ", $SC_$CPU_find_event[3].num_found_messages + ut_setrequirements LC_9007, "F" + +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 2.5: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 2.7: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the appropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN + ;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo + ;;first check the 12 APs that are being used + ;;255 is because they are disabled and not measured + for apindex = 1 to APResults do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo + ;;then check the rest of the APs + ;; 51 is because the APs are not used and not measured + for apindex = APResults+1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9003) - Housekeeping telemetry NOT initialized after application reset." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9003, "F" + else + write "<*> Passed (9003) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9003, "P" + endif +else + write " Failed (9003) - Housekeeping telemetry NOT initialized after application reset." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" +endif + +;;check initialization of WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9003) - WRT NOT initialized properly after application reset." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9003, "F" +else + write "<*> Passed (9003) - WRT initialized properly." + ut_setrequirements LC_9003, "P" +endif + +;check initialization of ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9003) - ART NOT initialized properly after application reset." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9003, "F" +else + write "<*> Passed (9003) - ART initialized properly." + ut_setrequirements LC_9003, "P" +endif + +write ";*********************************************************************" +write "; Step 2.8: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +write ";*********************************************************************" +write "; Step 2.9: Dump the WRT and ART to verify the statistics. " +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue = 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue = 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed - WRT contains an entry that is not set properly." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) +else + write "<*> Passed - WRT contains non-zero values." + ut_setrequirements LC_2004, "P" +endif + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed - ART contains an entry that is not set properly." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount +else + write "<*> Passed - ART contains non-zero values." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 2.10: Restart the LC and TST_LC Applications" +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_RESTARTAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app Restart command sent properly." +else + write " Failed - LC app Restart command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_RESTARTAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app Restart command sent properly." +else + write " Failed - TST_LC app Restart command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.11: Verify that the LC Housekeeping items are initialized. " +write ";*********************************************************************" +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN + ;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo + ;;first check the 12 APs that are being used + ;;255 is because they are disabled and not measured + for apindex = 1 to APResults do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo + ;;then check the rest of the APs + ;; 51 is because the APs are not used and not measured + for apindex = APResults+1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9003) - Housekeeping telemetry NOT initialized after application restart." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9003, "F" + else + write "<*> Passed (9003) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9003, "P" + endif +else + write " Failed (9003) - Housekeeping telemetry NOT initialized after application restart." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9003, "F" +endif + +;;check initialization of WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9003) - WRT NOT initialized properly after application reset." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9003, "F" +else + write "<*> Passed (9003) - WRT initialized properly." + ut_setrequirements LC_9003, "P" +endif + +;check initialization of ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9003) - ART NOT initialized properly after application reset." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9003, "F" +else + write "<*> Passed (9003) - ART initialized properly." + ut_setrequirements LC_9003, "P" +endif + +write ";*********************************************************************" +write "; Step 3.0: Processor Reset Test " +write ";*********************************************************************" +write "; Step 3.1: Send the commands to set the counters, Watch Point and " +write "; Action Point statistics to non-zero. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_COUNTERS_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_WRT_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SET_ART_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the LC Housekeeping counters to non-zero +/$SC_$CPU_TST_LC_SETCOUNTERS + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set Counters command sent properly." +else + write " Failed - TST_LC Set Counters command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set Counters Event Message rcv'd" +else + write " Failed - TST_LC Set Counters Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Watchpoint Results Table (WRT) Statistics to non-zero +/$SC_$CPU_TST_LC_SETWRT + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set WRT command sent properly." +else + write " Failed - TST_LC Set WRT command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set WRT Event Message rcv'd" +else + write " Failed - TST_LC Set WRT Event Message not received." +endif + +cmdctr = $SC_$CPU_TST_LC_CMDPC + 1 + +;; Set the Actionpoint Results Table (ART) Statistics to non-zero +/$SC_$CPU_TST_LC_SETART + +ut_tlmwait $SC_$CPU_TST_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Set ART command sent properly." +else + write " Failed - TST_LC Set ART command." +endif + +; Wait for event message +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC Set ART Event Message rcv'd" +else + write " Failed - TST_LC Set ART Event Message not received." +endif + +write ";*********************************************************************" +write "; Step 3.2: Dump the WRT and ART to verify the statistics. " +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount = 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue = 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue = 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed - WRT contains an entry that is not set properly." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) +else + write "<*> Passed - WRT contains non-zero values." + ut_setrequirements LC_2004, "P" +endif + +;; Dump the ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount = 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount = 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount = 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed - ART contains an entry that is not set properly." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount +else + write "<*> Passed - ART contains non-zero values." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 3.3: Perform a Processor Reset" +write ";*********************************************************************" +/$SC_$CPU_ES_PROCESSORRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 3.4: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 3.5: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 3.7: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN + ;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo + ;;first check the 12 APs that are being used + ;;255 is because they are disabled and not measured + for apindex = 1 to APResults do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo + ;;then check the rest of the APs + ;; 51 is because the APs are not used and not measured + for apindex = APResults+1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9003) - Housekeeping telemetry NOT initialized after application reset." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9003, "F" + else + write "<*> Passed (9003) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9003, "P" + endif +else + write " Failed (9003) - Housekeeping telemetry NOT initialized after application reset." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results =", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results =", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" +endif + +;;check initialization of WRT +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9003) - WRT NOT initialized properly after application reset." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9003, "F" +else + write "<*> Passed (9003) - WRT initialized properly." + ut_setrequirements LC_9003, "P" +endif + +;check initialization of ART +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9003) - ART NOT initialized properly after application reset." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9003, "F" +else + write "<*> Passed (9003) - ART initialized properly." + ut_setrequirements LC_9003, "P" +endif + +write ";*********************************************************************" +write "; Step 4.0: Clean-up" +write ";*********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_resetnocds" +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_rts10_load.scs b/test_and_ground/asist/prc/template/template_lc_rts10_load.scs similarity index 92% rename from test_and_ground/asist/prc/template/template_lcx_rts10_load.scs rename to test_and_ground/asist/prc/template/template_lc_rts10_load.scs index 079f2ae..002be4a 100644 --- a/test_and_ground/asist/prc/template/template_lcx_rts10_load.scs +++ b/test_and_ground/asist/prc/template/template_lc_rts10_load.scs @@ -1,6 +1,6 @@ -#include "table_defs.scp" - -wait 1 -/$SC_$CPU_lc_noop -wait 1 -/$SC_$CPU_sc_noop +#include "table_defs.scp" + +wait 1 +/$SC_$CPU_lc_noop +wait 1 +/$SC_$CPU_sc_noop diff --git a/test_and_ground/asist/prc/template/template_lcx_sendmonpackets.prc b/test_and_ground/asist/prc/template/template_lc_sendmonpackets.prc similarity index 86% rename from test_and_ground/asist/prc/template/template_lcx_sendmonpackets.prc rename to test_and_ground/asist/prc/template/template_lc_sendmonpackets.prc index 0f8e43e..7008289 100644 --- a/test_and_ground/asist/prc/template/template_lcx_sendmonpackets.prc +++ b/test_and_ground/asist/prc/template/template_lc_sendmonpackets.prc @@ -1,481 +1,435 @@ -PROC $sc_$cpu_lcx_sendmonpackets(step_num) -;******************************************************************************* -; Test Name: lcx_sendmonpackets -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; This procedure sends data using the Limit Checker test application -; (TST_LC) Send Packet command. -; -; Prerequisite Conditions -; The LC and TST_LC applications are loaded and running -; -; Change History -; -; Date Name Description -; 09/27/12 Walt Moleski Initial implementation for LCX -; -; Arguments -; step_num The step number to write for the current call of this proc -; -; Procedures Called -; ut_tlmupdate -; -;********************************************************************** - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" - -;********************************************************************** -; Define local variables -;********************************************************************** -Local MsgId[20] -Local Size -Local Pattern[32] - -write ";*********************************************************************" -write "; Step ",step_num, ".1: Setting up Message IDs to use " -write ";*********************************************************************" -;; For CPU1 use CPU2 Message IDs -MsgId[1] = 0x987 -MsgId[2] = 0x988 -MsgId[3] = 0x989 -MsgId[4] = 0x98a -MsgId[5] = 0x98b -MsgId[6] = 0x98c -MsgId[7] = 0x98d -MsgId[8] = 0x98e -MsgId[9] = 0x98f -MsgId[10] = 0x990 -MsgId[11] = 0x991 -MsgId[12] = 0x992 -MsgId[13] = 0x993 -MsgId[14] = 0x994 -MsgId[15] = 0x995 -MsgId[16] = 0x996 -MsgId[17] = 0x997 -MsgId[18] = 0x998 -MsgId[19] = 0x999 -MsgId[20] = 0x99a - -if ("$CPU" = "CPU2") then - ;; Use CPU3 Message IDs - MsgId[1] = 0xa87 - MsgId[2] = 0xa88 - MsgId[3] = 0xa89 - MsgId[4] = 0xa8a - MsgId[5] = 0xa8b - MsgId[6] = 0xa8c - MsgId[7] = 0xa8d - MsgId[8] = 0xa8e - MsgId[9] = 0xa8f - MsgId[10] = 0xa90 - MsgId[11] = 0xa91 - MsgId[12] = 0xa92 - MsgId[13] = 0xa93 - MsgId[14] = 0xa94 - MsgId[15] = 0xa95 - MsgId[16] = 0xa96 - MsgId[17] = 0xa97 - MsgId[18] = 0xa98 - MsgId[19] = 0xa99 - MsgId[20] = 0xa9a -elseif ("$CPU" = "CPU3") then - ;; Use CPU1 Message IDs - MsgId[1] = 0x887 - MsgId[2] = 0x888 - MsgId[3] = 0x889 - MsgId[4] = 0x88a - MsgId[5] = 0x88b - MsgId[6] = 0x88c - MsgId[7] = 0x88d - MsgId[8] = 0x88e - MsgId[9] = 0x88f - MsgId[10] = 0x890 - MsgId[11] = 0x891 - MsgId[12] = 0x892 - MsgId[13] = 0x893 - MsgId[14] = 0x894 - MsgId[15] = 0x895 - MsgId[16] = 0x896 - MsgId[17] = 0x897 - MsgId[18] = 0x898 - MsgId[19] = 0x899 - MsgId[20] = 0x89a -endif - -write ";*********************************************************************" -write "; Step ",step_num, ".2: Sending Packets " -write ";*********************************************************************" - -size = 4 -Pattern[1] = 0x21 -Pattern[2] = 0xff -Pattern[3] = 0x24 -Pattern[4] = 0xf1 -for index = 5 to 32 do - Pattern[index] = 0 -enddo -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 8 -Pattern[1] = 0x05 -Pattern[2] = 0x43 -Pattern[3] = 0xff -Pattern[4] = 0x50 -Pattern[5] = 0xff -Pattern[6] = 0xff -Pattern[7] = 0xff -Pattern[8] = 0xff -for index = 9 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 16 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0xff -Pattern[6] = 0xff -Pattern[7] = 0xff -Pattern[8] = 0x13 -Pattern[9] = 0x45 -Pattern[10] = 0xff -Pattern[11] = 0xf4 -Pattern[12] = 0xff -Pattern[13] = 0xff -Pattern[14] = 0xff -Pattern[15] = 0xff -Pattern[16] = 0xff -for index = 17 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 4 -Pattern[1] = 0xff -Pattern[2] = 0x25 -Pattern[3] = 0x45 -Pattern[4] = 0x00 -for index = 5 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 8 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0xff -Pattern[6] = 0x54 -Pattern[7] = 0xaa -Pattern[8] = 0xff -for index = 9 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 16 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0xff -Pattern[6] = 0xc5 -Pattern[7] = 0xff -Pattern[8] = 0xff -Pattern[9] = 0xff -Pattern[10] = 0xff -Pattern[11] = 0xff -Pattern[12] = 0xff -Pattern[13] = 0xff -Pattern[14] = 0xff -Pattern[15] = 0x30 -Pattern[16] = 0x01 -for index = 17 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 32 -Pattern[1] = 0x00 -Pattern[2] = 0x12 -Pattern[3] = 0x54 -Pattern[4] = 0x6f -Pattern[5] = 0xff -Pattern[6] = 0xff -Pattern[7] = 0xff -Pattern[8] = 0xff -Pattern[9] = 0xff -Pattern[10] = 0xff -Pattern[11] = 0xff -Pattern[12] = 0xc1 -Pattern[13] = 0x23 -Pattern[14] = 0xff -Pattern[15] = 0xff -Pattern[16] = 0xff -Pattern[17] = 0xff -Pattern[18] = 0xff -Pattern[19] = 0xff -Pattern[20] = 0xff -Pattern[21] = 0xff -Pattern[22] = 0xff -Pattern[23] = 0xff -Pattern[24] = 0xff -Pattern[25] = 0xff -Pattern[26] = 0xff -Pattern[27] = 0xff -Pattern[28] = 0xff -Pattern[29] = 0xff -Pattern[30] = 0xff -Pattern[31] = 0xff -Pattern[32] = 0xff - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 16 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0xff -Pattern[6] = 0xff -Pattern[7] = 0xff -Pattern[8] = 0x00 -Pattern[9] = 0x13 -Pattern[10] = 0x45 -Pattern[11] = 0x23 -Pattern[12] = 0xff -Pattern[13] = 0xff -Pattern[14] = 0xff -Pattern[15] = 0xac -Pattern[16] = 0x09 -for index = 17 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 8 -Pattern[1] = 0x00 -Pattern[2] = 0x00 -Pattern[3] = 0x05 -Pattern[4] = 0x46 -Pattern[5] = 0xfa -Pattern[6] = 0xcc -Pattern[7] = 0xff -Pattern[8] = 0xff -for index = 9 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 8 -Pattern[1] = 0xff -Pattern[2] = 0x77 -Pattern[3] = 0x06 -Pattern[4] = 0xff -Pattern[5] = 0x43 -Pattern[6] = 0x15 -Pattern[7] = 0xab -Pattern[8] = 0xf0 -for index = 9 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 4 -Pattern[1] = 0x3f -Pattern[2] = 0x9d -Pattern[3] = 0xdc -Pattern[4] = 0xc6 -for index = 5 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 8 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0x99 -Pattern[6] = 0x99 -Pattern[7] = 0xa0 -Pattern[8] = 0x43 -for index = 9 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 16 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0xff -Pattern[6] = 0xff -Pattern[7] = 0xff -Pattern[8] = 0xff -Pattern[9] = 0xff -Pattern[10] = 0xff -Pattern[11] = 0xad -Pattern[12] = 0xf9 -Pattern[13] = 0x83 -Pattern[14] = 0x42 -Pattern[15] = 0xff -Pattern[16] = 0xff -for index = 17 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 32 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0xff -Pattern[6] = 0xff -Pattern[7] = 0xff -Pattern[8] = 0xff -Pattern[9] = 0xff -Pattern[10] = 0xff -Pattern[11] = 0xff -Pattern[12] = 0xff -Pattern[13] = 0xff -Pattern[14] = 0xff -Pattern[15] = 0xff -Pattern[16] = 0xff -Pattern[17] = 0xff -Pattern[18] = 0xff -Pattern[19] = 0xff -Pattern[20] = 0xff -Pattern[21] = 0xff -Pattern[22] = 0xff -Pattern[23] = 0x40 -Pattern[24] = 0x62 -Pattern[25] = 0xf1 -Pattern[26] = 0xa9 -Pattern[27] = 0xff -Pattern[28] = 0xff -Pattern[29] = 0xff -Pattern[30] = 0xff -Pattern[31] = 0xff -Pattern[32] = 0xff - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 4 -Pattern[1] = 0x26 -Pattern[2] = 0x11 -Pattern[3] = 0x11 -Pattern[4] = 0x11 -for index = 5 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 8 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0x12 -Pattern[6] = 0xaa -Pattern[7] = 0xbb -Pattern[8] = 0xcc -for index = 9 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 4 -Pattern[1] = 0x75 -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -for index = 5 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 8 -Pattern[1] = 0xab -Pattern[2] = 0xcd -Pattern[3] = 0x12 -Pattern[4] = 0xca -Pattern[5] = 0xff -Pattern[6] = 0xff -Pattern[7] = 0xff -Pattern[8] = 0xff -for index = 9 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 8 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0xff -Pattern[6] = 0xff -Pattern[7] = 0x10 -Pattern[8] = 0x00 -for index = 9 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -size = 4 -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0x13 -Pattern[4] = 0x50 -for index = 5 to 32 do - Pattern[index] = 0 -enddo - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ENDPROC +PROC $sc_$cpu_lc_sendmonpackets(step_num) +;******************************************************************************* +; Test Name: lc_sendmonpackets +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; This procedure sends data using the Limit Checker test application +; (TST_LC) Send Packet command. +; +; Prerequisite Conditions +; The LC and TST_LC applications are loaded and running +; +; Change History +; +; Date Name Description +; 09/27/12 Walt Moleski Initial implementation for LCX +; +; Arguments +; step_num The step number to write for the current call of this proc +; +; Procedures Called +; ut_tlmupdate +; +;********************************************************************** + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" + +;********************************************************************** +; Define local variables +;********************************************************************** +Local MsgId[20] +Local Size +Local Pattern[32] + +write ";*********************************************************************" +write "; Step ",step_num, ".1: Setting up Message IDs to use " +write ";*********************************************************************" +;; For CPU1 use CPU2 Message IDs +MsgId[1] = 0x987 +MsgId[2] = 0x988 +MsgId[3] = 0x989 +MsgId[4] = 0x98a +MsgId[5] = 0x98b +MsgId[6] = 0x98c +MsgId[7] = 0x98d +MsgId[8] = 0x98e +MsgId[9] = 0x98f +MsgId[10] = 0x990 +MsgId[11] = 0x991 +MsgId[12] = 0x992 +MsgId[13] = 0x993 +MsgId[14] = 0x994 +MsgId[15] = 0x995 +MsgId[16] = 0x996 +MsgId[17] = 0x997 +MsgId[18] = 0x998 +MsgId[19] = 0x999 +MsgId[20] = 0x99a + +write ";*********************************************************************" +write "; Step ",step_num, ".2: Sending Packets " +write ";*********************************************************************" + +size = 4 +Pattern[1] = 0x21 +Pattern[2] = 0xff +Pattern[3] = 0x24 +Pattern[4] = 0xf1 +for index = 5 to 32 do + Pattern[index] = 0 +enddo +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 8 +Pattern[1] = 0x05 +Pattern[2] = 0x43 +Pattern[3] = 0xff +Pattern[4] = 0x50 +Pattern[5] = 0xff +Pattern[6] = 0xff +Pattern[7] = 0xff +Pattern[8] = 0xff +for index = 9 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 16 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0xff +Pattern[6] = 0xff +Pattern[7] = 0xff +Pattern[8] = 0x13 +Pattern[9] = 0x45 +Pattern[10] = 0xff +Pattern[11] = 0xf4 +Pattern[12] = 0xff +Pattern[13] = 0xff +Pattern[14] = 0xff +Pattern[15] = 0xff +Pattern[16] = 0xff +for index = 17 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 4 +Pattern[1] = 0xff +Pattern[2] = 0x25 +Pattern[3] = 0x45 +Pattern[4] = 0x00 +for index = 5 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 8 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0xff +Pattern[6] = 0x54 +Pattern[7] = 0xaa +Pattern[8] = 0xff +for index = 9 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 16 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0xff +Pattern[6] = 0xc5 +Pattern[7] = 0xff +Pattern[8] = 0xff +Pattern[9] = 0xff +Pattern[10] = 0xff +Pattern[11] = 0xff +Pattern[12] = 0xff +Pattern[13] = 0xff +Pattern[14] = 0xff +Pattern[15] = 0x30 +Pattern[16] = 0x01 +for index = 17 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 32 +Pattern[1] = 0x00 +Pattern[2] = 0x12 +Pattern[3] = 0x54 +Pattern[4] = 0x6f +Pattern[5] = 0xff +Pattern[6] = 0xff +Pattern[7] = 0xff +Pattern[8] = 0xff +Pattern[9] = 0xff +Pattern[10] = 0xff +Pattern[11] = 0xff +Pattern[12] = 0xc1 +Pattern[13] = 0x23 +Pattern[14] = 0xff +Pattern[15] = 0xff +Pattern[16] = 0xff +Pattern[17] = 0xff +Pattern[18] = 0xff +Pattern[19] = 0xff +Pattern[20] = 0xff +Pattern[21] = 0xff +Pattern[22] = 0xff +Pattern[23] = 0xff +Pattern[24] = 0xff +Pattern[25] = 0xff +Pattern[26] = 0xff +Pattern[27] = 0xff +Pattern[28] = 0xff +Pattern[29] = 0xff +Pattern[30] = 0xff +Pattern[31] = 0xff +Pattern[32] = 0xff + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 16 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0xff +Pattern[6] = 0xff +Pattern[7] = 0xff +Pattern[8] = 0x00 +Pattern[9] = 0x13 +Pattern[10] = 0x45 +Pattern[11] = 0x23 +Pattern[12] = 0xff +Pattern[13] = 0xff +Pattern[14] = 0xff +Pattern[15] = 0xac +Pattern[16] = 0x09 +for index = 17 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 8 +Pattern[1] = 0x00 +Pattern[2] = 0x00 +Pattern[3] = 0x05 +Pattern[4] = 0x46 +Pattern[5] = 0xfa +Pattern[6] = 0xcc +Pattern[7] = 0xff +Pattern[8] = 0xff +for index = 9 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 8 +Pattern[1] = 0xff +Pattern[2] = 0x77 +Pattern[3] = 0x06 +Pattern[4] = 0xff +Pattern[5] = 0x43 +Pattern[6] = 0x15 +Pattern[7] = 0xab +Pattern[8] = 0xf0 +for index = 9 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 4 +Pattern[1] = 0x3f +Pattern[2] = 0x9d +Pattern[3] = 0xdc +Pattern[4] = 0xc6 +for index = 5 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 8 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0x99 +Pattern[6] = 0x99 +Pattern[7] = 0xa0 +Pattern[8] = 0x43 +for index = 9 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 16 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0xff +Pattern[6] = 0xff +Pattern[7] = 0xff +Pattern[8] = 0xff +Pattern[9] = 0xff +Pattern[10] = 0xff +Pattern[11] = 0xad +Pattern[12] = 0xf9 +Pattern[13] = 0x83 +Pattern[14] = 0x42 +Pattern[15] = 0xff +Pattern[16] = 0xff +for index = 17 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 32 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0xff +Pattern[6] = 0xff +Pattern[7] = 0xff +Pattern[8] = 0xff +Pattern[9] = 0xff +Pattern[10] = 0xff +Pattern[11] = 0xff +Pattern[12] = 0xff +Pattern[13] = 0xff +Pattern[14] = 0xff +Pattern[15] = 0xff +Pattern[16] = 0xff +Pattern[17] = 0xff +Pattern[18] = 0xff +Pattern[19] = 0xff +Pattern[20] = 0xff +Pattern[21] = 0xff +Pattern[22] = 0xff +Pattern[23] = 0x40 +Pattern[24] = 0x62 +Pattern[25] = 0xf1 +Pattern[26] = 0xa9 +Pattern[27] = 0xff +Pattern[28] = 0xff +Pattern[29] = 0xff +Pattern[30] = 0xff +Pattern[31] = 0xff +Pattern[32] = 0xff + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 4 +Pattern[1] = 0x26 +Pattern[2] = 0x11 +Pattern[3] = 0x11 +Pattern[4] = 0x11 +for index = 5 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 8 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0x12 +Pattern[6] = 0xaa +Pattern[7] = 0xbb +Pattern[8] = 0xcc +for index = 9 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 4 +Pattern[1] = 0x75 +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +for index = 5 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 8 +Pattern[1] = 0xab +Pattern[2] = 0xcd +Pattern[3] = 0x12 +Pattern[4] = 0xca +Pattern[5] = 0xff +Pattern[6] = 0xff +Pattern[7] = 0xff +Pattern[8] = 0xff +for index = 9 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 8 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0xff +Pattern[6] = 0xff +Pattern[7] = 0x10 +Pattern[8] = 0x00 +for index = 9 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +size = 4 +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0x13 +Pattern[4] = 0x50 +for index = 5 to 32 do + Pattern[index] = 0 +enddo + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_sendpackets.prc b/test_and_ground/asist/prc/template/template_lc_sendpackets.prc similarity index 93% rename from test_and_ground/asist/prc/template/template_lcx_sendpackets.prc rename to test_and_ground/asist/prc/template/template_lc_sendpackets.prc index af9f90d..5b7d1ea 100644 --- a/test_and_ground/asist/prc/template/template_lcx_sendpackets.prc +++ b/test_and_ground/asist/prc/template/template_lc_sendpackets.prc @@ -1,1530 +1,1484 @@ -PROC $sc_$cpu_lcx_sendpackets(step_num,data_run) -;******************************************************************************* -; Test Name: lcx_sendpackets -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; This procedure sends data using the Limit Checker test application -; (TST_LC) Send Packet command. -; -; Prerequisite Conditions -; The LC and TST_LC applications are loaded and running -; -; Change History -; -; Date Name Description -; 09/27/12 Walt Moleski Initial implementation for LCX -; -; Arguments -; step_num The step number to write for the current call of this proc -; data_run The number representing the data to send -; -; Procedures Called -; ut_setupevt -; ut_tlmupdate -; -;********************************************************************** - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" - -;********************************************************************** -; Define local variables -;********************************************************************** -Local MsgId[20] -Local Size -Local Pattern[32] - -write ";*********************************************************************" -write "; Step ",step_num, ".1: Setting up Message IDs to use " -write ";*********************************************************************" -;; For CPU1 use CPU2 Message IDs -MsgId[1] = 0x987 -MsgId[2] = 0x988 -MsgId[3] = 0x989 -MsgId[4] = 0x98a -MsgId[5] = 0x98b -MsgId[6] = 0x98c -MsgId[7] = 0x98d -MsgId[8] = 0x98e -MsgId[9] = 0x98f -MsgId[10] = 0x990 -MsgId[11] = 0x991 -MsgId[12] = 0x992 -MsgId[13] = 0x993 -MsgId[14] = 0x994 -MsgId[15] = 0x995 -MsgId[16] = 0x996 -MsgId[17] = 0x997 -MsgId[18] = 0x998 -MsgId[19] = 0x999 -MsgId[20] = 0x99a - -if ("$CPU" = "CPU2") then - ;; Use CPU3 Message IDs - MsgId[1] = 0xa87 - MsgId[2] = 0xa88 - MsgId[3] = 0xa89 - MsgId[4] = 0xa8a - MsgId[5] = 0xa8b - MsgId[6] = 0xa8c - MsgId[7] = 0xa8d - MsgId[8] = 0xa8e - MsgId[9] = 0xa8f - MsgId[10] = 0xa90 - MsgId[11] = 0xa91 - MsgId[12] = 0xa92 - MsgId[13] = 0xa93 - MsgId[14] = 0xa94 - MsgId[15] = 0xa95 - MsgId[16] = 0xa96 - MsgId[17] = 0xa97 - MsgId[18] = 0xa98 - MsgId[19] = 0xa99 - MsgId[20] = 0xa9a -elseif ("$CPU" = "CPU3") then - ;; Use CPU1 Message IDs - MsgId[1] = 0x887 - MsgId[2] = 0x888 - MsgId[3] = 0x889 - MsgId[4] = 0x88a - MsgId[5] = 0x88b - MsgId[6] = 0x88c - MsgId[7] = 0x88d - MsgId[8] = 0x88e - MsgId[9] = 0x88f - MsgId[10] = 0x890 - MsgId[11] = 0x891 - MsgId[12] = 0x892 - MsgId[13] = 0x893 - MsgId[14] = 0x894 - MsgId[15] = 0x895 - MsgId[16] = 0x896 - MsgId[17] = 0x897 - MsgId[18] = 0x898 - MsgId[19] = 0x899 - MsgId[20] = 0x89a -endif - -write ";*********************************************************************" -write "; Step ",step_num, ".2: Sending Packets " -write ";*********************************************************************" - -;;******************** -;; Data Run #1 -;;******************** -if (data_run = 1) then - size = 4 - Pattern[1] = 0x19 - Pattern[2] = 0xff - Pattern[3] = 0x24 - Pattern[4] = 0xf1 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0x05 - Pattern[2] = 0x43 - Pattern[3] = 0xff - Pattern[4] = 0x45 - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0x13 - Pattern[9] = 0x46 - Pattern[10] = 0xff - Pattern[11] = 0xf4 - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0xff - Pattern[2] = 0x25 - Pattern[3] = 0x54 - Pattern[4] = 0x00 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0x60 - Pattern[7] = 0xaa - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xc5 - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0x30 - Pattern[16] = 0x02 - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 32 - Pattern[1] = 0x00 - Pattern[2] = 0x12 - Pattern[3] = 0x54 - Pattern[4] = 0x6f - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xc1 - Pattern[13] = 0x23 - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - Pattern[17] = 0xff - Pattern[18] = 0xff - Pattern[19] = 0xff - Pattern[20] = 0xff - Pattern[21] = 0xff - Pattern[22] = 0xff - Pattern[23] = 0xff - Pattern[24] = 0xff - Pattern[25] = 0xff - Pattern[26] = 0xff - Pattern[27] = 0xff - Pattern[28] = 0xff - Pattern[29] = 0xff - Pattern[30] = 0xff - Pattern[31] = 0xff - Pattern[32] = 0xff - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0x00 - Pattern[9] = 0x13 - Pattern[10] = 0x45 - Pattern[11] = 0x23 - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xac - Pattern[16] = 0x09 - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0x00 - Pattern[2] = 0x00 - Pattern[3] = 0x05 - Pattern[4] = 0x46 - Pattern[5] = 0xfa - Pattern[6] = 0xcc - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0x77 - Pattern[3] = 0x06 - Pattern[4] = 0xff - Pattern[5] = 0x43 - Pattern[6] = 0x15 - Pattern[7] = 0xab - Pattern[8] = 0xf0 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x3f - Pattern[2] = 0x9d - Pattern[3] = 0xdc - Pattern[4] = 0xc6 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0x99 - Pattern[6] = 0x99 - Pattern[7] = 0xa0 - Pattern[8] = 0x43 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xad - Pattern[12] = 0xf9 - Pattern[13] = 0x83 - Pattern[14] = 0x42 - Pattern[15] = 0xff - Pattern[16] = 0xff - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 32 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - Pattern[17] = 0xff - Pattern[18] = 0xff - Pattern[19] = 0xff - Pattern[20] = 0xff - Pattern[21] = 0xff - Pattern[22] = 0xff - Pattern[23] = 0x40 - Pattern[24] = 0x62 - Pattern[25] = 0xf1 - Pattern[26] = 0xa9 - Pattern[27] = 0xff - Pattern[28] = 0xff - Pattern[29] = 0xff - Pattern[30] = 0xff - Pattern[31] = 0xff - Pattern[32] = 0xff - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x26 - Pattern[2] = 0x11 - Pattern[3] = 0x11 - Pattern[4] = 0x11 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0x12 - Pattern[6] = 0xaa - Pattern[7] = 0xbb - Pattern[8] = 0xcc - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x75 - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xab - Pattern[2] = 0xcd - Pattern[3] = 0x12 - Pattern[4] = 0xca - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0x10 - Pattern[8] = 0x00 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0x13 - Pattern[4] = 0x50 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC -;;******************** -;; Data Run #2 -;;******************** -elseif (data_run = 2) then - size = 4 - Pattern[1] = 0x19 - Pattern[2] = 0xff - Pattern[3] = 0x24 - Pattern[4] = 0xf1 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0x05 - Pattern[2] = 0x43 - Pattern[3] = 0xff - Pattern[4] = 0x45 - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0x13 - Pattern[9] = 0x46 - Pattern[10] = 0xff - Pattern[11] = 0xf4 - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0xff - Pattern[2] = 0x25 - Pattern[3] = 0x45 - Pattern[4] = 0x00 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0x54 - Pattern[7] = 0xaa - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xc5 - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0x30 - Pattern[16] = 0x01 - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 32 - Pattern[1] = 0x00 - Pattern[2] = 0x12 - Pattern[3] = 0x45 - Pattern[4] = 0x6f - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xc1 - Pattern[13] = 0x23 - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - Pattern[17] = 0xff - Pattern[18] = 0xff - Pattern[19] = 0xff - Pattern[20] = 0xff - Pattern[21] = 0xff - Pattern[22] = 0xff - Pattern[23] = 0xff - Pattern[24] = 0xff - Pattern[25] = 0xff - Pattern[26] = 0xff - Pattern[27] = 0xff - Pattern[28] = 0xff - Pattern[29] = 0xff - Pattern[30] = 0xff - Pattern[31] = 0xff - Pattern[32] = 0xff - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0x00 - Pattern[9] = 0x12 - Pattern[10] = 0x45 - Pattern[11] = 0x23 - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xac - Pattern[16] = 0x09 - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0x00 - Pattern[2] = 0x00 - Pattern[3] = 0x05 - Pattern[4] = 0x42 - Pattern[5] = 0xfa - Pattern[6] = 0xcc - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0x77 - Pattern[3] = 0x06 - Pattern[4] = 0xff - Pattern[5] = 0x43 - Pattern[6] = 0x15 - Pattern[7] = 0xab - Pattern[8] = 0xf0 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x3f - Pattern[2] = 0x9d - Pattern[3] = 0xdc - Pattern[4] = 0xc6 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0x99 - Pattern[6] = 0x99 - Pattern[7] = 0xa0 - Pattern[8] = 0x43 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xad - Pattern[12] = 0xf9 - Pattern[13] = 0x83 - Pattern[14] = 0x42 - Pattern[15] = 0xff - Pattern[16] = 0xff - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 32 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - Pattern[17] = 0xff - Pattern[18] = 0xff - Pattern[19] = 0xff - Pattern[20] = 0xff - Pattern[21] = 0xff - Pattern[22] = 0xff - Pattern[23] = 0x40 - Pattern[24] = 0x62 - Pattern[25] = 0xf1 - Pattern[26] = 0xa9 - Pattern[27] = 0xff - Pattern[28] = 0xff - Pattern[29] = 0xff - Pattern[30] = 0xff - Pattern[31] = 0xff - Pattern[32] = 0xff - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x26 - Pattern[2] = 0x11 - Pattern[3] = 0x11 - Pattern[4] = 0x11 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0x12 - Pattern[6] = 0xaa - Pattern[7] = 0xbb - Pattern[8] = 0xcc - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x75 - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xab - Pattern[2] = 0xcd - Pattern[3] = 0x12 - Pattern[4] = 0xca - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0x10 - Pattern[8] = 0x00 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0x13 - Pattern[4] = 0x50 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -;;******************** -;; Data Run #3 -;;******************** -elseif (data_run = 3) then - size = 4 - Pattern[1] = 0x19 - Pattern[2] = 0xff - Pattern[3] = 0x24 - Pattern[4] = 0xf1 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0x05 - Pattern[2] = 0x43 - Pattern[3] = 0xff - Pattern[4] = 0x45 - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0x13 - Pattern[9] = 0x45 - Pattern[10] = 0xff - Pattern[11] = 0xf4 - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0xff - Pattern[2] = 0x25 - Pattern[3] = 0x45 - Pattern[4] = 0x00 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0x54 - Pattern[7] = 0xaa - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xc5 - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0x33 - Pattern[16] = 0x01 - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 32 - Pattern[1] = 0x00 - Pattern[2] = 0x12 - Pattern[3] = 0x54 - Pattern[4] = 0x6f - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xc1 - Pattern[13] = 0x23 - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - Pattern[17] = 0xff - Pattern[18] = 0xff - Pattern[19] = 0xff - Pattern[20] = 0xff - Pattern[21] = 0xff - Pattern[22] = 0xff - Pattern[23] = 0xff - Pattern[24] = 0xff - Pattern[25] = 0xff - Pattern[26] = 0xff - Pattern[27] = 0xff - Pattern[28] = 0xff - Pattern[29] = 0xff - Pattern[30] = 0xff - Pattern[31] = 0xff - Pattern[32] = 0xff - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0x00 - Pattern[9] = 0x12 - Pattern[10] = 0x45 - Pattern[11] = 0x23 - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xac - Pattern[16] = 0x09 - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0x00 - Pattern[2] = 0x00 - Pattern[3] = 0x05 - Pattern[4] = 0x42 - Pattern[5] = 0xfa - Pattern[6] = 0xcc - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0x77 - Pattern[3] = 0x06 - Pattern[4] = 0xff - Pattern[5] = 0x43 - Pattern[6] = 0x15 - Pattern[7] = 0xab - Pattern[8] = 0x00 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x3f - Pattern[2] = 0x9d - Pattern[3] = 0xdc - Pattern[4] = 0xc6 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0x99 - Pattern[6] = 0x99 - Pattern[7] = 0xa0 - Pattern[8] = 0x43 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xad - Pattern[12] = 0xf9 - Pattern[13] = 0x83 - Pattern[14] = 0x42 - Pattern[15] = 0xff - Pattern[16] = 0xff - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 32 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - Pattern[17] = 0xff - Pattern[18] = 0xff - Pattern[19] = 0xff - Pattern[20] = 0xff - Pattern[21] = 0xff - Pattern[22] = 0xff - Pattern[23] = 0x40 - Pattern[24] = 0x62 - Pattern[25] = 0xf1 - Pattern[26] = 0xa9 - Pattern[27] = 0xff - Pattern[28] = 0xff - Pattern[29] = 0xff - Pattern[30] = 0xff - Pattern[31] = 0xff - Pattern[32] = 0xff - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x26 - Pattern[2] = 0x11 - Pattern[3] = 0x11 - Pattern[4] = 0x11 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0x12 - Pattern[6] = 0xaa - Pattern[7] = 0xbb - Pattern[8] = 0xcc - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x75 - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xab - Pattern[2] = 0xcd - Pattern[3] = 0x12 - Pattern[4] = 0xca - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0x10 - Pattern[8] = 0x00 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0x13 - Pattern[4] = 0x50 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -;;******************** -;; Data Run #4 -;;******************** -elseif (data_run = 4) then - size = 4 - Pattern[1] = 0x19 - Pattern[2] = 0xff - Pattern[3] = 0x24 - Pattern[4] = 0xf1 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0x05 - Pattern[2] = 0x43 - Pattern[3] = 0xff - Pattern[4] = 0x50 - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0x13 - Pattern[9] = 0x45 - Pattern[10] = 0xff - Pattern[11] = 0xf4 - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0xff - Pattern[2] = 0x25 - Pattern[3] = 0x45 - Pattern[4] = 0x00 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0x60 - Pattern[7] = 0xaa - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xc5 - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0x30 - Pattern[16] = 0x01 - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 32 - Pattern[1] = 0x00 - Pattern[2] = 0x12 - Pattern[3] = 0x45 - Pattern[4] = 0x6f - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xc1 - Pattern[13] = 0x23 - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - Pattern[17] = 0xff - Pattern[18] = 0xff - Pattern[19] = 0xff - Pattern[20] = 0xff - Pattern[21] = 0xff - Pattern[22] = 0xff - Pattern[23] = 0xff - Pattern[24] = 0xff - Pattern[25] = 0xff - Pattern[26] = 0xff - Pattern[27] = 0xff - Pattern[28] = 0xff - Pattern[29] = 0xff - Pattern[30] = 0xff - Pattern[31] = 0xff - Pattern[32] = 0xff - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0x00 - Pattern[9] = 0x13 - Pattern[10] = 0x45 - Pattern[11] = 0x23 - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xac - Pattern[16] = 0x09 - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0x00 - Pattern[2] = 0x00 - Pattern[3] = 0x05 - Pattern[4] = 0x42 - Pattern[5] = 0xfa - Pattern[6] = 0xcc - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0x77 - Pattern[3] = 0x06 - Pattern[4] = 0xff - Pattern[5] = 0x43 - Pattern[6] = 0x15 - Pattern[7] = 0xab - Pattern[8] = 0xf1 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x3f - Pattern[2] = 0x9e - Pattern[3] = 0x04 - Pattern[4] = 0x19 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0x99 - Pattern[6] = 0x99 - Pattern[7] = 0xa0 - Pattern[8] = 0x43 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 16 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xad - Pattern[12] = 0xf9 - Pattern[13] = 0x83 - Pattern[14] = 0x42 - Pattern[15] = 0xff - Pattern[16] = 0xff - for index = 17 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 32 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - Pattern[9] = 0xff - Pattern[10] = 0xff - Pattern[11] = 0xff - Pattern[12] = 0xff - Pattern[13] = 0xff - Pattern[14] = 0xff - Pattern[15] = 0xff - Pattern[16] = 0xff - Pattern[17] = 0xff - Pattern[18] = 0xff - Pattern[19] = 0xff - Pattern[20] = 0xff - Pattern[21] = 0xff - Pattern[22] = 0xff - Pattern[23] = 0x40 - Pattern[24] = 0x62 - Pattern[25] = 0xf1 - Pattern[26] = 0xa9 - Pattern[27] = 0xff - Pattern[28] = 0xff - Pattern[29] = 0xff - Pattern[30] = 0xff - Pattern[31] = 0xff - Pattern[32] = 0xff - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x26 - Pattern[2] = 0x11 - Pattern[3] = 0x11 - Pattern[4] = 0x11 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0x12 - Pattern[6] = 0xaa - Pattern[7] = 0xbb - Pattern[8] = 0xcc - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0x75 - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xab - Pattern[2] = 0xcd - Pattern[3] = 0x12 - Pattern[4] = 0xca - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0xff - Pattern[8] = 0xff - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 8 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0xff - Pattern[4] = 0xff - Pattern[5] = 0xff - Pattern[6] = 0xff - Pattern[7] = 0x10 - Pattern[8] = 0x00 - for index = 9 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - size = 4 - Pattern[1] = 0xff - Pattern[2] = 0xff - Pattern[3] = 0x13 - Pattern[4] = 0x50 - for index = 5 to 32 do - Pattern[index] = 0 - enddo - /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern - ut_tlmupdate $SC_$CPU_TST_LC_CMDPC -endif - -ENDPROC +PROC $sc_$cpu_lc_sendpackets(step_num,data_run) +;******************************************************************************* +; Test Name: lc_sendpackets +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; This procedure sends data using the Limit Checker test application +; (TST_LC) Send Packet command. +; +; Prerequisite Conditions +; The LC and TST_LC applications are loaded and running +; +; Change History +; +; Date Name Description +; 09/27/12 Walt Moleski Initial implementation for LCX +; +; Arguments +; step_num The step number to write for the current call of this proc +; data_run The number representing the data to send +; +; Procedures Called +; ut_setupevt +; ut_tlmupdate +; +;********************************************************************** + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" + +;********************************************************************** +; Define local variables +;********************************************************************** +Local MsgId[20] +Local Size +Local Pattern[32] + +write ";*********************************************************************" +write "; Step ",step_num, ".1: Setting up Message IDs to use " +write ";*********************************************************************" +;; For CPU1 use CPU2 Message IDs +MsgId[1] = 0x987 +MsgId[2] = 0x988 +MsgId[3] = 0x989 +MsgId[4] = 0x98a +MsgId[5] = 0x98b +MsgId[6] = 0x98c +MsgId[7] = 0x98d +MsgId[8] = 0x98e +MsgId[9] = 0x98f +MsgId[10] = 0x990 +MsgId[11] = 0x991 +MsgId[12] = 0x992 +MsgId[13] = 0x993 +MsgId[14] = 0x994 +MsgId[15] = 0x995 +MsgId[16] = 0x996 +MsgId[17] = 0x997 +MsgId[18] = 0x998 +MsgId[19] = 0x999 +MsgId[20] = 0x99a + +write ";*********************************************************************" +write "; Step ",step_num, ".2: Sending Packets " +write ";*********************************************************************" + +;;******************** +;; Data Run #1 +;;******************** +if (data_run = 1) then + size = 4 + Pattern[1] = 0x19 + Pattern[2] = 0xff + Pattern[3] = 0x24 + Pattern[4] = 0xf1 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0x05 + Pattern[2] = 0x43 + Pattern[3] = 0xff + Pattern[4] = 0x45 + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0x13 + Pattern[9] = 0x46 + Pattern[10] = 0xff + Pattern[11] = 0xf4 + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0xff + Pattern[2] = 0x25 + Pattern[3] = 0x54 + Pattern[4] = 0x00 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0x60 + Pattern[7] = 0xaa + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xc5 + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0x30 + Pattern[16] = 0x02 + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 32 + Pattern[1] = 0x00 + Pattern[2] = 0x12 + Pattern[3] = 0x54 + Pattern[4] = 0x6f + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xc1 + Pattern[13] = 0x23 + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + Pattern[17] = 0xff + Pattern[18] = 0xff + Pattern[19] = 0xff + Pattern[20] = 0xff + Pattern[21] = 0xff + Pattern[22] = 0xff + Pattern[23] = 0xff + Pattern[24] = 0xff + Pattern[25] = 0xff + Pattern[26] = 0xff + Pattern[27] = 0xff + Pattern[28] = 0xff + Pattern[29] = 0xff + Pattern[30] = 0xff + Pattern[31] = 0xff + Pattern[32] = 0xff + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0x00 + Pattern[9] = 0x13 + Pattern[10] = 0x45 + Pattern[11] = 0x23 + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xac + Pattern[16] = 0x09 + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0x00 + Pattern[2] = 0x00 + Pattern[3] = 0x05 + Pattern[4] = 0x46 + Pattern[5] = 0xfa + Pattern[6] = 0xcc + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0x77 + Pattern[3] = 0x06 + Pattern[4] = 0xff + Pattern[5] = 0x43 + Pattern[6] = 0x15 + Pattern[7] = 0xab + Pattern[8] = 0xf0 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x3f + Pattern[2] = 0x9d + Pattern[3] = 0xdc + Pattern[4] = 0xc6 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0x99 + Pattern[6] = 0x99 + Pattern[7] = 0xa0 + Pattern[8] = 0x43 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xad + Pattern[12] = 0xf9 + Pattern[13] = 0x83 + Pattern[14] = 0x42 + Pattern[15] = 0xff + Pattern[16] = 0xff + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 32 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + Pattern[17] = 0xff + Pattern[18] = 0xff + Pattern[19] = 0xff + Pattern[20] = 0xff + Pattern[21] = 0xff + Pattern[22] = 0xff + Pattern[23] = 0x40 + Pattern[24] = 0x62 + Pattern[25] = 0xf1 + Pattern[26] = 0xa9 + Pattern[27] = 0xff + Pattern[28] = 0xff + Pattern[29] = 0xff + Pattern[30] = 0xff + Pattern[31] = 0xff + Pattern[32] = 0xff + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x26 + Pattern[2] = 0x11 + Pattern[3] = 0x11 + Pattern[4] = 0x11 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0x12 + Pattern[6] = 0xaa + Pattern[7] = 0xbb + Pattern[8] = 0xcc + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x75 + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xab + Pattern[2] = 0xcd + Pattern[3] = 0x12 + Pattern[4] = 0xca + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0x10 + Pattern[8] = 0x00 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0x13 + Pattern[4] = 0x50 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC +;;******************** +;; Data Run #2 +;;******************** +elseif (data_run = 2) then + size = 4 + Pattern[1] = 0x19 + Pattern[2] = 0xff + Pattern[3] = 0x24 + Pattern[4] = 0xf1 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0x05 + Pattern[2] = 0x43 + Pattern[3] = 0xff + Pattern[4] = 0x45 + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0x13 + Pattern[9] = 0x46 + Pattern[10] = 0xff + Pattern[11] = 0xf4 + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0xff + Pattern[2] = 0x25 + Pattern[3] = 0x45 + Pattern[4] = 0x00 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0x54 + Pattern[7] = 0xaa + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xc5 + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0x30 + Pattern[16] = 0x01 + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 32 + Pattern[1] = 0x00 + Pattern[2] = 0x12 + Pattern[3] = 0x45 + Pattern[4] = 0x6f + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xc1 + Pattern[13] = 0x23 + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + Pattern[17] = 0xff + Pattern[18] = 0xff + Pattern[19] = 0xff + Pattern[20] = 0xff + Pattern[21] = 0xff + Pattern[22] = 0xff + Pattern[23] = 0xff + Pattern[24] = 0xff + Pattern[25] = 0xff + Pattern[26] = 0xff + Pattern[27] = 0xff + Pattern[28] = 0xff + Pattern[29] = 0xff + Pattern[30] = 0xff + Pattern[31] = 0xff + Pattern[32] = 0xff + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0x00 + Pattern[9] = 0x12 + Pattern[10] = 0x45 + Pattern[11] = 0x23 + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xac + Pattern[16] = 0x09 + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0x00 + Pattern[2] = 0x00 + Pattern[3] = 0x05 + Pattern[4] = 0x42 + Pattern[5] = 0xfa + Pattern[6] = 0xcc + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0x77 + Pattern[3] = 0x06 + Pattern[4] = 0xff + Pattern[5] = 0x43 + Pattern[6] = 0x15 + Pattern[7] = 0xab + Pattern[8] = 0xf0 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x3f + Pattern[2] = 0x9d + Pattern[3] = 0xdc + Pattern[4] = 0xc6 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0x99 + Pattern[6] = 0x99 + Pattern[7] = 0xa0 + Pattern[8] = 0x43 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xad + Pattern[12] = 0xf9 + Pattern[13] = 0x83 + Pattern[14] = 0x42 + Pattern[15] = 0xff + Pattern[16] = 0xff + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 32 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + Pattern[17] = 0xff + Pattern[18] = 0xff + Pattern[19] = 0xff + Pattern[20] = 0xff + Pattern[21] = 0xff + Pattern[22] = 0xff + Pattern[23] = 0x40 + Pattern[24] = 0x62 + Pattern[25] = 0xf1 + Pattern[26] = 0xa9 + Pattern[27] = 0xff + Pattern[28] = 0xff + Pattern[29] = 0xff + Pattern[30] = 0xff + Pattern[31] = 0xff + Pattern[32] = 0xff + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x26 + Pattern[2] = 0x11 + Pattern[3] = 0x11 + Pattern[4] = 0x11 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0x12 + Pattern[6] = 0xaa + Pattern[7] = 0xbb + Pattern[8] = 0xcc + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x75 + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xab + Pattern[2] = 0xcd + Pattern[3] = 0x12 + Pattern[4] = 0xca + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0x10 + Pattern[8] = 0x00 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0x13 + Pattern[4] = 0x50 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +;;******************** +;; Data Run #3 +;;******************** +elseif (data_run = 3) then + size = 4 + Pattern[1] = 0x19 + Pattern[2] = 0xff + Pattern[3] = 0x24 + Pattern[4] = 0xf1 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0x05 + Pattern[2] = 0x43 + Pattern[3] = 0xff + Pattern[4] = 0x45 + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0x13 + Pattern[9] = 0x45 + Pattern[10] = 0xff + Pattern[11] = 0xf4 + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0xff + Pattern[2] = 0x25 + Pattern[3] = 0x45 + Pattern[4] = 0x00 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0x54 + Pattern[7] = 0xaa + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xc5 + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0x33 + Pattern[16] = 0x01 + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 32 + Pattern[1] = 0x00 + Pattern[2] = 0x12 + Pattern[3] = 0x54 + Pattern[4] = 0x6f + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xc1 + Pattern[13] = 0x23 + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + Pattern[17] = 0xff + Pattern[18] = 0xff + Pattern[19] = 0xff + Pattern[20] = 0xff + Pattern[21] = 0xff + Pattern[22] = 0xff + Pattern[23] = 0xff + Pattern[24] = 0xff + Pattern[25] = 0xff + Pattern[26] = 0xff + Pattern[27] = 0xff + Pattern[28] = 0xff + Pattern[29] = 0xff + Pattern[30] = 0xff + Pattern[31] = 0xff + Pattern[32] = 0xff + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0x00 + Pattern[9] = 0x12 + Pattern[10] = 0x45 + Pattern[11] = 0x23 + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xac + Pattern[16] = 0x09 + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0x00 + Pattern[2] = 0x00 + Pattern[3] = 0x05 + Pattern[4] = 0x42 + Pattern[5] = 0xfa + Pattern[6] = 0xcc + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0x77 + Pattern[3] = 0x06 + Pattern[4] = 0xff + Pattern[5] = 0x43 + Pattern[6] = 0x15 + Pattern[7] = 0xab + Pattern[8] = 0x00 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x3f + Pattern[2] = 0x9d + Pattern[3] = 0xdc + Pattern[4] = 0xc6 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0x99 + Pattern[6] = 0x99 + Pattern[7] = 0xa0 + Pattern[8] = 0x43 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xad + Pattern[12] = 0xf9 + Pattern[13] = 0x83 + Pattern[14] = 0x42 + Pattern[15] = 0xff + Pattern[16] = 0xff + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 32 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + Pattern[17] = 0xff + Pattern[18] = 0xff + Pattern[19] = 0xff + Pattern[20] = 0xff + Pattern[21] = 0xff + Pattern[22] = 0xff + Pattern[23] = 0x40 + Pattern[24] = 0x62 + Pattern[25] = 0xf1 + Pattern[26] = 0xa9 + Pattern[27] = 0xff + Pattern[28] = 0xff + Pattern[29] = 0xff + Pattern[30] = 0xff + Pattern[31] = 0xff + Pattern[32] = 0xff + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x26 + Pattern[2] = 0x11 + Pattern[3] = 0x11 + Pattern[4] = 0x11 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0x12 + Pattern[6] = 0xaa + Pattern[7] = 0xbb + Pattern[8] = 0xcc + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x75 + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xab + Pattern[2] = 0xcd + Pattern[3] = 0x12 + Pattern[4] = 0xca + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0x10 + Pattern[8] = 0x00 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0x13 + Pattern[4] = 0x50 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +;;******************** +;; Data Run #4 +;;******************** +elseif (data_run = 4) then + size = 4 + Pattern[1] = 0x19 + Pattern[2] = 0xff + Pattern[3] = 0x24 + Pattern[4] = 0xf1 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[1], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0x05 + Pattern[2] = 0x43 + Pattern[3] = 0xff + Pattern[4] = 0x50 + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[2], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0x13 + Pattern[9] = 0x45 + Pattern[10] = 0xff + Pattern[11] = 0xf4 + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[3], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0xff + Pattern[2] = 0x25 + Pattern[3] = 0x45 + Pattern[4] = 0x00 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[4], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0x60 + Pattern[7] = 0xaa + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[5], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xc5 + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0x30 + Pattern[16] = 0x01 + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[6], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 32 + Pattern[1] = 0x00 + Pattern[2] = 0x12 + Pattern[3] = 0x45 + Pattern[4] = 0x6f + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xc1 + Pattern[13] = 0x23 + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + Pattern[17] = 0xff + Pattern[18] = 0xff + Pattern[19] = 0xff + Pattern[20] = 0xff + Pattern[21] = 0xff + Pattern[22] = 0xff + Pattern[23] = 0xff + Pattern[24] = 0xff + Pattern[25] = 0xff + Pattern[26] = 0xff + Pattern[27] = 0xff + Pattern[28] = 0xff + Pattern[29] = 0xff + Pattern[30] = 0xff + Pattern[31] = 0xff + Pattern[32] = 0xff + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[7], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0x00 + Pattern[9] = 0x13 + Pattern[10] = 0x45 + Pattern[11] = 0x23 + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xac + Pattern[16] = 0x09 + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[8], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0x00 + Pattern[2] = 0x00 + Pattern[3] = 0x05 + Pattern[4] = 0x42 + Pattern[5] = 0xfa + Pattern[6] = 0xcc + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[9], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0x77 + Pattern[3] = 0x06 + Pattern[4] = 0xff + Pattern[5] = 0x43 + Pattern[6] = 0x15 + Pattern[7] = 0xab + Pattern[8] = 0xf1 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[10], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x3f + Pattern[2] = 0x9e + Pattern[3] = 0x04 + Pattern[4] = 0x19 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[11], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0x99 + Pattern[6] = 0x99 + Pattern[7] = 0xa0 + Pattern[8] = 0x43 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[12], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 16 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xad + Pattern[12] = 0xf9 + Pattern[13] = 0x83 + Pattern[14] = 0x42 + Pattern[15] = 0xff + Pattern[16] = 0xff + for index = 17 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[13], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 32 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + Pattern[9] = 0xff + Pattern[10] = 0xff + Pattern[11] = 0xff + Pattern[12] = 0xff + Pattern[13] = 0xff + Pattern[14] = 0xff + Pattern[15] = 0xff + Pattern[16] = 0xff + Pattern[17] = 0xff + Pattern[18] = 0xff + Pattern[19] = 0xff + Pattern[20] = 0xff + Pattern[21] = 0xff + Pattern[22] = 0xff + Pattern[23] = 0x40 + Pattern[24] = 0x62 + Pattern[25] = 0xf1 + Pattern[26] = 0xa9 + Pattern[27] = 0xff + Pattern[28] = 0xff + Pattern[29] = 0xff + Pattern[30] = 0xff + Pattern[31] = 0xff + Pattern[32] = 0xff + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[14], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x26 + Pattern[2] = 0x11 + Pattern[3] = 0x11 + Pattern[4] = 0x11 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[15], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0x12 + Pattern[6] = 0xaa + Pattern[7] = 0xbb + Pattern[8] = 0xcc + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[16], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0x75 + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[17], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xab + Pattern[2] = 0xcd + Pattern[3] = 0x12 + Pattern[4] = 0xca + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0xff + Pattern[8] = 0xff + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[18], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 8 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0xff + Pattern[4] = 0xff + Pattern[5] = 0xff + Pattern[6] = 0xff + Pattern[7] = 0x10 + Pattern[8] = 0x00 + for index = 9 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[19], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + size = 4 + Pattern[1] = 0xff + Pattern[2] = 0xff + Pattern[3] = 0x13 + Pattern[4] = 0x50 + for index = 5 to 32 do + Pattern[index] = 0 + enddo + /$SC_$CPU_TST_LC_SENDPACKET MsgId=MsgId[20], DataSize=Size, DataPattern=Pattern + ut_tlmupdate $SC_$CPU_TST_LC_CMDPC +endif + +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_stale.prc b/test_and_ground/asist/prc/template/template_lc_stale.prc similarity index 86% rename from test_and_ground/asist/prc/template/template_lcx_stale.prc rename to test_and_ground/asist/prc/template/template_lc_stale.prc index 2655f3a..806b532 100644 --- a/test_and_ground/asist/prc/template/template_lcx_stale.prc +++ b/test_and_ground/asist/prc/template/template_lc_stale.prc @@ -1,1084 +1,1066 @@ -PROC $sc_$cpu_lcx_stale -;******************************************************************************* -; Test Name: lcx_stale -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker eXtended (LCX) -; Application properly handles "stale" data. Stale data is data that has -; not been received for x Sample commands as specified in the WatchPoint -; Definition. -; -; Requirements Tested -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message -; LCX2001 For each Watchpoint specified in the Watchpoint Definition Table -; (WDT), LCX shall specify an age value when the data becomes -; "stale". -; LCX2002 For each Watchpoint specified in the Watchpoint Definition Table -; (WDT), LCX shall maintain the age of the data. -; LCX2004 For each Watchpoint, the flight software shall maintain the -; following statistics in the dump-only Watchpoint Results Table: -; a) The result of the last relational comparison (False, True, -; Error, or Stale) -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded a -; True result -; e) The cumulative number of times the comparison has yeilded a -; True result -; f) Most recent FALSE to TRUE transition value -; g) Most recent FALSE to TRUE transition timestamp -; h) Most recent TRUE to FALSE transition value -; i) Most recent TRUE to FALSE transition timestamp -; j) Most recent comparison age -; LCX3001 Upon receipt of a Sample Request, LCX shall process the request -; specified actionpoints defined in the Actionpoint Definition -; Table (ADT) if the LC Application State is one of the following: -; a) Active -; b) Passive -; LCX3002 Each table-defined Actionpoint shall be evaluated and the -; results stored in the dump-only Actionpoint Results Table if the -; Actionpoint state is either: -; a) Active -; b) Passive -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample (Pass,Fail,Error,Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LCX Application to Active -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LC Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED) -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE -; f) Total count of packets monitored for watchpoints (cmd and -; tlm) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LC State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 Walt Moleski Initial implementation. -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lcx_wdt5 Sets up the Watchpoint Definition table file for testing -; lcx_adt6 Sets up the Actionpoint Definition table file for testing -; -; Expected Test Results and Analysis -; The tables below depict the expected Actionpoint and Watchpoint evaluations. -; After the first Sample request: -; AP Result WP Result Age -; 0 Pass 0 True 2 -; 1 Pass 4 False 2 -; 2 Pass 8 True 2 -; 3 Fail 12 False 2 -; 4 Pass 22 False 2 -; 5 Fail 23 False 2 -; 6 Pass 30 Error 0 -; 7 Error -; -; After the WPs go "stale": -; AP Result WP Result Age -; 0 Stale 0 Stale 0 -; 1 Pass 4 Stale 0 -; 2 Stale 8 Stale 0 -; 3 Fail 12 Stale 0 -; 4 Stale 22 Stale 0 -; 5 Stale 23 Stale 0 -; 6 Error 30 Error 0 -; 7 Error -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "to_lab_events.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1003 0 -#define LCX_2001 1 -#define LCX_2002 2 -#define LCX_2004 3 -#define LCX_3001 4 -#define LCX_3002 5 -#define LCX_3006 6 -#define LCX_4000 7 -#define LCX_8000 8 -#define LCX_9000 9 -#define LCX_9001 10 -#define LCX_9002 11 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -#define CMDFAIL 1 -#define CMDSUCCESS 2 - -global ut_req_array_size = 11 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1003","LCX_2001", ;; - "LCX_2002","LCX_2004","LCX_3001","LCX_3002","LCX_3006","LCX_4000", ;; - "LCX_8000","LCX_9000","LCX_9001","LCX_9002"] - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL stream1 -LOCAL WRTAppid -LOCAL ARTAppid -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL ADTentries = 8 -LOCAL WDTentries = 31 -LOCAL CmdStatus -LOCAL State -Local maxwp = LC_MAX_WATCHPOINTS - 1 -Local maxap = LC_MAX_ACTIONPOINTS - 1 -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local WRTTblName = LCAppName & ".LC_WRT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Create the WDT and ADT table loads used for testing and " -write "; upload them to the proper location. Also, display the LC pages." -write ";********************************************************************" -s $SC_$CPU_lcx_wdt5 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt5.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt6 - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt6.tbl", adtFileName, "$CPU", "P") - -;; Display the pages -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ADT -page $SC_$CPU_LC_WDT -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions." -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " -write "; initialized to zero (0). " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the SC HK packet ID and table AppIDs based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" -ARTAppid = "0FB8" -WRTAppid = "0FB9" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" - ARTAppid = "0FD6" - WRTAppid = "0FD7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" - ARTAppid = "0FF6" - WRTAppid = "0FF7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all "stale" to start - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;first check the APs that are being used -;;255 is because they are disabled and not measured - for apindex = 1 to ADTentries do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo -;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = ADTentries+1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", WRTAppid) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001) - Watchpoint Results Table NOT initialized at startup. Index = ",index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" -else - write "<*> Passed (9001) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002) - Actionpoint Results Table NOT initialized at startup. Index = ",index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" -else - write "<*> Passed (9002) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" -endif - -write ";*********************************************************************" -write "; Step 1.6: Verify that the WDT specifies the age for some entries." -write ";*********************************************************************" -local ageSpecified = FALSE - -for index = 0 to WDTentries do - if ($SC_$CPU_LC_WDT[index].StaleAge > 0) then - ageSpecified = TRUE - break - endif -enddo - -;; Check if at least 1 entry specified an Age -if (ageSpecified = TRUE) then - write "<*> Passed (2001) - Watchpoint Definition Table specified an Age." - ut_setrequirements LCX_2001, "P" -else - write " Failed (2001) - Watchpoint Definition Table does not contain an entry with a stale age." - ut_setrequirements LCX_2001, "F" - write " Terminating test...." - goto step3 -endif - -write ";*********************************************************************" -write "; Step 2.0: Send packets to make APs transition. " -write ";*********************************************************************" -write "; Step 2.1: Set LC Application State to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2 Send packets for data run 1" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.2",1) - -write ";*********************************************************************" -write "; Step 2.3 Send Sample Request for all APs." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=7 UpdateAge=1 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3001) - Received the expected Sample event" - ut_setrequirements LCX_3001, "P" -else - write " Failed (3001) - Did not rcv expected Sample event; count = ",$SC_$CPU_find_event[1].num_found_messages - ut_setrequirements LCX_3001, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.4 Dump ART and WRT" -write ";*********************************************************************" - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", WRTAppid) -wait 5 - -;; Write out AP info -for index = 0 to ADTentries - 1 do - write " Action Point ",index,":" - write " Action Result = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - write " " -enddo - -;; Check the APs for the correct evaluation -if ($SC_$CPU_LC_ART[0].ActionResult = LC_ACTION_PASS) AND ;; - ($SC_$CPU_LC_ART[1].ActionResult = LC_ACTION_FAIL) AND ;; - ($SC_$CPU_LC_ART[2].ActionResult = LC_ACTION_FAIL) AND ;; - ($SC_$CPU_LC_ART[3].ActionResult = LC_ACTION_FAIL) AND ;; - ($SC_$CPU_LC_ART[4].ActionResult = LC_ACTION_FAIL) AND ;; - ($SC_$CPU_LC_ART[5].ActionResult = LC_ACTION_PASS) AND ;; - ($SC_$CPU_LC_ART[6].ActionResult = LC_ACTION_PASS) AND ;; - ($SC_$CPU_LC_ART[7].ActionResult = LC_ACTION_ERROR) then - write "<*> Passed (3002) - All APs evaluated correctly" - ut_setrequirements LCX_3002, "P" -else - write " Failed (3002) - At least one AP did not evaluate to the expected result" - ut_setrequirements LCX_3002, "F" -endif - -write " Watch Point 0:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[0].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[0].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[0].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[0].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[0].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[0].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[0].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[0].CountdownToStale - -;; Check the Watchpoints to determine if the Statistics are correct -if ($SC_$CPU_LC_WRT[0].WatchResults = LC_WATCH_TRUE) AND ;; - ($SC_$CPU_LC_WRT[0].CountdownToStale = 2) then - write "<*> Passed (2002;2004) - WRT entry 0 specifies correct statistics." - ut_setrequirements LCX_2002, "P" - ut_setrequirements LCX_2004, "P" -else - write " Failed (2002;2004) - WRT entry 0 does not contain the expected statistics." - ut_setrequirements LCX_2002, "F" - ut_setrequirements LCX_2004, "F" -endif - -write " " -write " Watch Point 4:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[4].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[4].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[4].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[4].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[4].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[4].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[4].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[4].CountdownToStale - -;; Check the Watchpoints to determine if the Statistics are correct -if ($SC_$CPU_LC_WRT[4].WatchResults = LC_WATCH_TRUE) AND ;; - ($SC_$CPU_LC_WRT[4].CountdownToStale = 2) then - write "<*> Passed (2002;2004) - WRT entry 4 specifies correct statistics." - ut_setrequirements LCX_2002, "P" - ut_setrequirements LCX_2004, "P" -else - write " Failed (2002;2004) - WRT entry 4 does not contain the expected statistics." - ut_setrequirements LCX_2002, "F" - ut_setrequirements LCX_2004, "F" -endif - -write " " -write " Watch Point 8:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[8].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[8].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[8].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[8].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[8].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[8].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[8].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[8].CountdownToStale - -;; Check the Watchpoints to determine if the Statistics are correct -if ($SC_$CPU_LC_WRT[8].WatchResults = LC_WATCH_FALSE) AND ;; - ($SC_$CPU_LC_WRT[8].CountdownToStale = 2) then - write "<*> Passed (2002;2004) - WRT entry 8 specifies correct statistics." - ut_setrequirements LCX_2002, "P" - ut_setrequirements LCX_2004, "P" -else - write " Failed (2002;2004) - WRT entry 8 does not contain the expected statistics." - ut_setrequirements LCX_2002, "F" - ut_setrequirements LCX_2004, "F" -endif - -write " " -write " Watch Point 12:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[12].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[12].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[12].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[12].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[12].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[12].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[12].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[12].CountdownToStale - -;; Check the Watchpoints to determine if the Statistics are correct -if ($SC_$CPU_LC_WRT[12].WatchResults = LC_WATCH_FALSE) AND ;; - ($SC_$CPU_LC_WRT[12].CountdownToStale = 2) then - write "<*> Passed (2002;2004) - WRT entry 12 specifies correct statistics." - ut_setrequirements LCX_2002, "P" - ut_setrequirements LCX_2004, "P" -else - write " Failed (2002;2004) - WRT entry 12 does not contain the expected statistics." - ut_setrequirements LCX_2002, "F" - ut_setrequirements LCX_2004, "F" -endif - -write " " -write " Watch Point 22:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[22].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[22].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[22].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[22].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[22].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[22].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[22].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[22].CountdownToStale - -;; Check the Watchpoints to determine if the Statistics are correct -if ($SC_$CPU_LC_WRT[22].WatchResults = LC_WATCH_FALSE) AND ;; - ($SC_$CPU_LC_WRT[22].CountdownToStale = 2) then - write "<*> Passed (2002;2004) - WRT entry 22 specifies correct statistics." - ut_setrequirements LCX_2002, "P" - ut_setrequirements LCX_2004, "P" -else - write " Failed (2002;2004) - WRT entry 22 does not contain the expected statistics." - ut_setrequirements LCX_2002, "F" - ut_setrequirements LCX_2004, "F" -endif - -write " " -write " Watch Point 23:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[23].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[23].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[23].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[23].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[23].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[23].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[23].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[23].CountdownToStale - -;; Check the Watchpoints to determine if the Statistics are correct -if ($SC_$CPU_LC_WRT[23].WatchResults = LC_WATCH_FALSE) AND ;; - ($SC_$CPU_LC_WRT[23].CountdownToStale = 2) then - write "<*> Passed (2002;2004) - WRT entry 23 specifies correct statistics." - ut_setrequirements LCX_2002, "P" - ut_setrequirements LCX_2004, "P" -else - write " Failed (2002;2004) - WRT entry 23 does not contain the expected statistics." - ut_setrequirements LCX_2002, "F" - ut_setrequirements LCX_2004, "F" -endif - -write " " -write " Watch Point 30:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[30].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[30].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[30].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[30].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[30].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[30].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[30].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[30].CountdownToStale - -;; Check the Watchpoints to determine if the Statistics are correct -if ($SC_$CPU_LC_WRT[30].WatchResults = LC_WATCH_ERROR) AND ;; - ($SC_$CPU_LC_WRT[30].CountdownToStale = 0) then - write "<*> Passed (2002;2004) - WRT entry 30 specifies correct statistics." - ut_setrequirements LCX_2002, "P" - ut_setrequirements LCX_2004, "P" -else - write " Failed (2002;2004) - WRT entry 30 does not contain the expected statistics." - ut_setrequirements LCX_2002, "F" - ut_setrequirements LCX_2004, "F" -endif - -write ";*********************************************************************" -write "; Step 2.5 Send Sample Requests until Watch Points go stale. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 - -for i = 1 to 3 DO - /$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=7 UpdateAge=1 - wait 2 -enddo - -write ";*********************************************************************" -write "; Step 2.6 Dump ART and WRT" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", WRTAppid) -wait 5 - -;; Write out AP info -for index = 0 to ADTentries - 1 do - write " Action Point ",index,":" - write " Action Result = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - write " " -enddo - -;; Check the APs for the correct evaluation -if ($SC_$CPU_LC_ART[0].ActionResult = LC_ACTION_PASS) AND ;; - ($SC_$CPU_LC_ART[1].ActionResult = LC_ACTION_STALE) AND ;; - ($SC_$CPU_LC_ART[2].ActionResult = LC_ACTION_FAIL) AND ;; - ($SC_$CPU_LC_ART[3].ActionResult = LC_ACTION_FAIL) AND ;; - ($SC_$CPU_LC_ART[4].ActionResult = LC_ACTION_STALE) AND ;; - ($SC_$CPU_LC_ART[5].ActionResult = LC_ACTION_STALE) AND ;; - ($SC_$CPU_LC_ART[6].ActionResult = LC_ACTION_ERROR) AND ;; - ($SC_$CPU_LC_ART[7].ActionResult = LC_ACTION_ERROR) then - write "<*> Passed (3002;3006) - All APs evaluated correctly" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3006, "P" -else - write " Failed (3002;3006) - At least one AP did not evaluate to the expected result" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3006, "F" -endif - -write " Watch Point 0:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[0].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[0].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[0].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[0].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[0].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[0].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[0].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[0].CountdownToStale - -write " " -write " Watch Point 4:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[4].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[4].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[4].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[4].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[4].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[4].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[4].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[4].CountdownToStale -write " " -write " Watch Point 8:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[8].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[8].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[8].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[8].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[8].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[8].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[8].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[8].CountdownToStale -write " " -write " Watch Point 12:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[12].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[12].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[12].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[12].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[12].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[12].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[12].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[12].CountdownToStale -write " " -write " Watch Point 22:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[22].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[22].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[22].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[22].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[22].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[22].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[22].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[22].CountdownToStale -write " " -write " Watch Point 23:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[23].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[23].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[23].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[23].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[23].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[23].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[23].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[23].CountdownToStale - -;; Check the Watchpoints to determine if the Statistics are correct -if ($SC_$CPU_LC_WRT[0].WatchResults = LC_WATCH_STALE) AND ;; - ($SC_$CPU_LC_WRT[4].WatchResults = LC_WATCH_STALE) AND ;; - ($SC_$CPU_LC_WRT[8].WatchResults = LC_WATCH_STALE) AND ;; - ($SC_$CPU_LC_WRT[12].WatchResults = LC_WATCH_STALE) AND ;; - ($SC_$CPU_LC_WRT[22].WatchResults = LC_WATCH_STALE) AND ;; - ($SC_$CPU_LC_WRT[23].WatchResults = LC_WATCH_STALE) AND ;; - ($SC_$CPU_LC_WRT[30].WatchResults = LC_WATCH_ERROR) then - write "<*> Passed (2002;2004) - WRT specifies the correct results." - ut_setrequirements LCX_2002, "P" - ut_setrequirements LCX_2004, "P" -else - write " Failed (2002;2004) - At least one WRT entry does not contain the expected result." - ut_setrequirements LCX_2002, "F" - ut_setrequirements LCX_2004, "F" -endif - -;; Send the Sample Request one last time -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=7 UpdateAge=7 -wait 5 - -write ";*********************************************************************" -write "; Step 2.7 Dump ART and WRT" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", ARTAppid) -wait 5 - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", WRTAppid) -wait 5 - -;; Write out AP info -for index = 0 to ADTentries - 1 do - write " Action Point ",index,":" - write " Action Result = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - write " " -enddo - -write " Watch Point 0:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[0].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[0].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[0].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[0].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[0].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[0].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[0].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[0].CountdownToStale -write " " -write " Watch Point 4:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[4].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[4].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[4].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[4].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[4].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[4].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[4].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[4].CountdownToStale -write " " -write " Watch Point 8:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[8].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[8].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[8].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[8].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[8].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[8].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[8].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[8].CountdownToStale -write " " -write " Watch Point 12:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[12].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[12].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[12].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[12].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[12].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[12].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[12].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[12].CountdownToStale -write " " -write " Watch Point 22:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[22].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[22].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[22].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[22].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[22].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[22].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[22].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[22].CountdownToStale -write " " -write " Watch Point 23:" -write " WatchResults = ", p@$SC_$CPU_LC_WRT[23].WatchResults -write " Evaluation Count = ", $SC_$CPU_LC_WRT[23].EvaluationCount -write " False to True Count = ", $SC_$CPU_LC_WRT[23].FalsetoTrueCount -write " Consecutive True = ", $SC_$CPU_LC_WRT[23].ConsectiveTrueCount -write " Cum True Count = ", $SC_$CPU_LC_WRT[23].CumulativeTrueCount -write " F to T Value = ", $SC_$CPU_LC_WRT[23].FtoTValue -write " T to F Value = ", $SC_$CPU_LC_WRT[23].TtoFValue -write " Stale Counter = ", $SC_$CPU_LC_WRT[23].CountdownToStale - -step3: -write ";*********************************************************************" -write "; Step 3.0: Clean-up" -write ";*********************************************************************" - -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_stale" -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_stale +;******************************************************************************* +; Test Name: lc_stale +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) +; Application properly handles "stale" data. Stale data is data that has +; not been received for x Sample commands as specified in the WatchPoint +; Definition. +; +; Requirements Tested +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message +; LC2001 For each Watchpoint specified in the Watchpoint Definition Table +; (WDT), LC shall specify an age value when the data becomes +; "stale". +; LC2002 For each Watchpoint specified in the Watchpoint Definition Table +; (WDT), LC shall maintain the age of the data. +; LC2004 For each Watchpoint, the flight software shall maintain the +; following statistics in the dump-only Watchpoint Results Table: +; a) The result of the last relational comparison (False, True, +; Error, or Stale) +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded a +; True result +; e) The cumulative number of times the comparison has yeilded a +; True result +; f) Most recent FALSE to TRUE transition value +; g) Most recent FALSE to TRUE transition timestamp +; h) Most recent TRUE to FALSE transition value +; i) Most recent TRUE to FALSE transition timestamp +; j) Most recent comparison age +; LC3001 Upon receipt of a Sample Request, LC shall process the request +; specified actionpoints defined in the Actionpoint Definition +; Table (ADT) if the LC Application State is one of the following: +; a) Active +; b) Passive +; LC3002 Each table-defined Actionpoint shall be evaluated and the +; results stored in the dump-only Actionpoint Results Table if the +; Actionpoint state is either: +; a) Active +; b) Passive +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample (Pass,Fail,Error,Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED) +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE +; f) Total count of packets monitored for watchpoints (cmd and +; tlm) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 Walt Moleski Initial implementation. +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt5 Sets up the Watchpoint Definition table file for testing +; lc_adt6 Sets up the Actionpoint Definition table file for testing +; +; Expected Test Results and Analysis +; The tables below depict the expected Actionpoint and Watchpoint evaluations. +; After the first Sample request: +; AP Result WP Result Age +; 0 Pass 0 True 2 +; 1 Pass 4 False 2 +; 2 Pass 8 True 2 +; 3 Fail 12 False 2 +; 4 Pass 22 False 2 +; 5 Fail 23 False 2 +; 6 Pass 30 Error 0 +; 7 Error +; +; After the WPs go "stale": +; AP Result WP Result Age +; 0 Stale 0 Stale 0 +; 1 Pass 4 Stale 0 +; 2 Stale 8 Stale 0 +; 3 Fail 12 Stale 0 +; 4 Stale 22 Stale 0 +; 5 Stale 23 Stale 0 +; 6 Error 30 Error 0 +; 7 Error +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "to_lab_events.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_1003 0 +#define LC_2001 1 +#define LC_2002 2 +#define LC_2004 3 +#define LC_3001 4 +#define LC_3002 5 +#define LC_3006 6 +#define LC_4000 7 +#define LC_8000 8 +#define LC_9000 9 +#define LC_9001 10 +#define LC_9002 11 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +#define CMDFAIL 1 +#define CMDSUCCESS 2 + +global ut_req_array_size = 11 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1003","LC_2001", ;; + "LC_2002","LC_2004","LC_3001","LC_3002","LC_3006","LC_4000", ;; + "LC_8000","LC_9000","LC_9001","LC_9002"] + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL stream1 +LOCAL WRTAppid +LOCAL ARTAppid +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL ADTentries = 8 +LOCAL WDTentries = 31 +LOCAL CmdStatus +LOCAL State +Local maxwp = LC_MAX_WATCHPOINTS - 1 +Local maxap = LC_MAX_ACTIONPOINTS - 1 +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local WRTTblName = LCAppName & ".LC_WRT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Create the WDT and ADT table loads used for testing and " +write "; upload them to the proper location. Also, display the LC pages." +write ";********************************************************************" +s $SC_$CPU_lc_wdt5 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt5.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt6 + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt6.tbl", adtFileName, hostCPU, "P") + +;; Display the pages +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ADT +page $SC_$CPU_LC_WDT +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions." +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " +write "; initialized to zero (0). " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the SC HK packet ID and table AppIDs based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" +ARTAppid = "0FB8" +WRTAppid = "0FB9" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all "stale" to start + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;first check the APs that are being used +;;255 is because they are disabled and not measured + for apindex = 1 to ADTentries do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo +;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = ADTentries+1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, WRTAppid) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001) - Watchpoint Results Table NOT initialized at startup. Index = ",index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" +else + write "<*> Passed (9001) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002) - Actionpoint Results Table NOT initialized at startup. Index = ",index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" +else + write "<*> Passed (9002) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" +endif + +write ";*********************************************************************" +write "; Step 1.6: Verify that the WDT specifies the age for some entries." +write ";*********************************************************************" +local ageSpecified = FALSE + +for index = 0 to WDTentries do + if ($SC_$CPU_LC_WDT[index].StaleAge > 0) then + ageSpecified = TRUE + break + endif +enddo + +;; Check if at least 1 entry specified an Age +if (ageSpecified = TRUE) then + write "<*> Passed (2001) - Watchpoint Definition Table specified an Age." + ut_setrequirements LC_2001, "P" +else + write " Failed (2001) - Watchpoint Definition Table does not contain an entry with a stale age." + ut_setrequirements LC_2001, "F" + write " Terminating test...." + goto step3 +endif + +write ";*********************************************************************" +write "; Step 2.0: Send packets to make APs transition. " +write ";*********************************************************************" +write "; Step 2.1: Set LC Application State to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2 Send packets for data run 1" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.2",1) + +write ";*********************************************************************" +write "; Step 2.3 Send Sample Request for all APs." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=7 UpdateAge=1 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3001) - Received the expected Sample event" + ut_setrequirements LC_3001, "P" +else + write " Failed (3001) - Did not rcv expected Sample event; count = ",$SC_$CPU_find_event[1].num_found_messages + ut_setrequirements LC_3001, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.4 Dump ART and WRT" +write ";*********************************************************************" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, WRTAppid) +wait 5 + +;; Write out AP info +for index = 0 to ADTentries - 1 do + write " Action Point ",index,":" + write " Action Result = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + write " " +enddo + +;; Check the APs for the correct evaluation +if ($SC_$CPU_LC_ART[0].ActionResult = LC_ACTION_PASS) AND ;; + ($SC_$CPU_LC_ART[1].ActionResult = LC_ACTION_FAIL) AND ;; + ($SC_$CPU_LC_ART[2].ActionResult = LC_ACTION_FAIL) AND ;; + ($SC_$CPU_LC_ART[3].ActionResult = LC_ACTION_FAIL) AND ;; + ($SC_$CPU_LC_ART[4].ActionResult = LC_ACTION_FAIL) AND ;; + ($SC_$CPU_LC_ART[5].ActionResult = LC_ACTION_PASS) AND ;; + ($SC_$CPU_LC_ART[6].ActionResult = LC_ACTION_PASS) AND ;; + ($SC_$CPU_LC_ART[7].ActionResult = LC_ACTION_ERROR) then + write "<*> Passed (3002) - All APs evaluated correctly" + ut_setrequirements LC_3002, "P" +else + write " Failed (3002) - At least one AP did not evaluate to the expected result" + ut_setrequirements LC_3002, "F" +endif + +write " Watch Point 0:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[0].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[0].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[0].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[0].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[0].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[0].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[0].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[0].CountdownToStale + +;; Check the Watchpoints to determine if the Statistics are correct +if ($SC_$CPU_LC_WRT[0].WatchResults = LC_WATCH_TRUE) AND ;; + ($SC_$CPU_LC_WRT[0].CountdownToStale = 2) then + write "<*> Passed (2002;2004) - WRT entry 0 specifies correct statistics." + ut_setrequirements LC_2002, "P" + ut_setrequirements LC_2004, "P" +else + write " Failed (2002;2004) - WRT entry 0 does not contain the expected statistics." + ut_setrequirements LC_2002, "F" + ut_setrequirements LC_2004, "F" +endif + +write " " +write " Watch Point 4:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[4].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[4].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[4].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[4].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[4].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[4].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[4].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[4].CountdownToStale + +;; Check the Watchpoints to determine if the Statistics are correct +if ($SC_$CPU_LC_WRT[4].WatchResults = LC_WATCH_TRUE) AND ;; + ($SC_$CPU_LC_WRT[4].CountdownToStale = 2) then + write "<*> Passed (2002;2004) - WRT entry 4 specifies correct statistics." + ut_setrequirements LC_2002, "P" + ut_setrequirements LC_2004, "P" +else + write " Failed (2002;2004) - WRT entry 4 does not contain the expected statistics." + ut_setrequirements LC_2002, "F" + ut_setrequirements LC_2004, "F" +endif + +write " " +write " Watch Point 8:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[8].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[8].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[8].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[8].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[8].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[8].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[8].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[8].CountdownToStale + +;; Check the Watchpoints to determine if the Statistics are correct +if ($SC_$CPU_LC_WRT[8].WatchResults = LC_WATCH_FALSE) AND ;; + ($SC_$CPU_LC_WRT[8].CountdownToStale = 2) then + write "<*> Passed (2002;2004) - WRT entry 8 specifies correct statistics." + ut_setrequirements LC_2002, "P" + ut_setrequirements LC_2004, "P" +else + write " Failed (2002;2004) - WRT entry 8 does not contain the expected statistics." + ut_setrequirements LC_2002, "F" + ut_setrequirements LC_2004, "F" +endif + +write " " +write " Watch Point 12:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[12].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[12].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[12].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[12].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[12].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[12].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[12].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[12].CountdownToStale + +;; Check the Watchpoints to determine if the Statistics are correct +if ($SC_$CPU_LC_WRT[12].WatchResults = LC_WATCH_FALSE) AND ;; + ($SC_$CPU_LC_WRT[12].CountdownToStale = 2) then + write "<*> Passed (2002;2004) - WRT entry 12 specifies correct statistics." + ut_setrequirements LC_2002, "P" + ut_setrequirements LC_2004, "P" +else + write " Failed (2002;2004) - WRT entry 12 does not contain the expected statistics." + ut_setrequirements LC_2002, "F" + ut_setrequirements LC_2004, "F" +endif + +write " " +write " Watch Point 22:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[22].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[22].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[22].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[22].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[22].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[22].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[22].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[22].CountdownToStale + +;; Check the Watchpoints to determine if the Statistics are correct +if ($SC_$CPU_LC_WRT[22].WatchResults = LC_WATCH_FALSE) AND ;; + ($SC_$CPU_LC_WRT[22].CountdownToStale = 2) then + write "<*> Passed (2002;2004) - WRT entry 22 specifies correct statistics." + ut_setrequirements LC_2002, "P" + ut_setrequirements LC_2004, "P" +else + write " Failed (2002;2004) - WRT entry 22 does not contain the expected statistics." + ut_setrequirements LC_2002, "F" + ut_setrequirements LC_2004, "F" +endif + +write " " +write " Watch Point 23:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[23].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[23].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[23].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[23].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[23].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[23].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[23].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[23].CountdownToStale + +;; Check the Watchpoints to determine if the Statistics are correct +if ($SC_$CPU_LC_WRT[23].WatchResults = LC_WATCH_FALSE) AND ;; + ($SC_$CPU_LC_WRT[23].CountdownToStale = 2) then + write "<*> Passed (2002;2004) - WRT entry 23 specifies correct statistics." + ut_setrequirements LC_2002, "P" + ut_setrequirements LC_2004, "P" +else + write " Failed (2002;2004) - WRT entry 23 does not contain the expected statistics." + ut_setrequirements LC_2002, "F" + ut_setrequirements LC_2004, "F" +endif + +write " " +write " Watch Point 30:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[30].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[30].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[30].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[30].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[30].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[30].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[30].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[30].CountdownToStale + +;; Check the Watchpoints to determine if the Statistics are correct +if ($SC_$CPU_LC_WRT[30].WatchResults = LC_WATCH_ERROR) AND ;; + ($SC_$CPU_LC_WRT[30].CountdownToStale = 0) then + write "<*> Passed (2002;2004) - WRT entry 30 specifies correct statistics." + ut_setrequirements LC_2002, "P" + ut_setrequirements LC_2004, "P" +else + write " Failed (2002;2004) - WRT entry 30 does not contain the expected statistics." + ut_setrequirements LC_2002, "F" + ut_setrequirements LC_2004, "F" +endif + +write ";*********************************************************************" +write "; Step 2.5 Send Sample Requests until Watch Points go stale. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 + +for i = 1 to 3 DO + /$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=7 UpdateAge=1 + wait 2 +enddo + +write ";*********************************************************************" +write "; Step 2.6 Dump ART and WRT" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, WRTAppid) +wait 5 + +;; Write out AP info +for index = 0 to ADTentries - 1 do + write " Action Point ",index,":" + write " Action Result = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + write " " +enddo + +;; Check the APs for the correct evaluation +if ($SC_$CPU_LC_ART[0].ActionResult = LC_ACTION_PASS) AND ;; + ($SC_$CPU_LC_ART[1].ActionResult = LC_ACTION_STALE) AND ;; + ($SC_$CPU_LC_ART[2].ActionResult = LC_ACTION_FAIL) AND ;; + ($SC_$CPU_LC_ART[3].ActionResult = LC_ACTION_FAIL) AND ;; + ($SC_$CPU_LC_ART[4].ActionResult = LC_ACTION_STALE) AND ;; + ($SC_$CPU_LC_ART[5].ActionResult = LC_ACTION_STALE) AND ;; + ($SC_$CPU_LC_ART[6].ActionResult = LC_ACTION_ERROR) AND ;; + ($SC_$CPU_LC_ART[7].ActionResult = LC_ACTION_ERROR) then + write "<*> Passed (3002;3006) - All APs evaluated correctly" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3006, "P" +else + write " Failed (3002;3006) - At least one AP did not evaluate to the expected result" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3006, "F" +endif + +write " Watch Point 0:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[0].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[0].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[0].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[0].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[0].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[0].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[0].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[0].CountdownToStale + +write " " +write " Watch Point 4:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[4].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[4].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[4].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[4].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[4].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[4].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[4].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[4].CountdownToStale +write " " +write " Watch Point 8:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[8].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[8].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[8].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[8].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[8].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[8].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[8].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[8].CountdownToStale +write " " +write " Watch Point 12:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[12].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[12].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[12].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[12].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[12].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[12].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[12].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[12].CountdownToStale +write " " +write " Watch Point 22:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[22].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[22].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[22].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[22].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[22].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[22].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[22].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[22].CountdownToStale +write " " +write " Watch Point 23:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[23].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[23].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[23].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[23].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[23].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[23].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[23].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[23].CountdownToStale + +;; Check the Watchpoints to determine if the Statistics are correct +if ($SC_$CPU_LC_WRT[0].WatchResults = LC_WATCH_STALE) AND ;; + ($SC_$CPU_LC_WRT[4].WatchResults = LC_WATCH_STALE) AND ;; + ($SC_$CPU_LC_WRT[8].WatchResults = LC_WATCH_STALE) AND ;; + ($SC_$CPU_LC_WRT[12].WatchResults = LC_WATCH_STALE) AND ;; + ($SC_$CPU_LC_WRT[22].WatchResults = LC_WATCH_STALE) AND ;; + ($SC_$CPU_LC_WRT[23].WatchResults = LC_WATCH_STALE) AND ;; + ($SC_$CPU_LC_WRT[30].WatchResults = LC_WATCH_ERROR) then + write "<*> Passed (2002;2004) - WRT specifies the correct results." + ut_setrequirements LC_2002, "P" + ut_setrequirements LC_2004, "P" +else + write " Failed (2002;2004) - At least one WRT entry does not contain the expected result." + ut_setrequirements LC_2002, "F" + ut_setrequirements LC_2004, "F" +endif + +;; Send the Sample Request one last time +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=7 UpdateAge=7 +wait 5 + +write ";*********************************************************************" +write "; Step 2.7 Dump ART and WRT" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, ARTAppid) +wait 5 + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, WRTAppid) +wait 5 + +;; Write out AP info +for index = 0 to ADTentries - 1 do + write " Action Point ",index,":" + write " Action Result = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Passive AP Count = ", $SC_$CPU_LC_ART[index].PassiveAPCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + write " " +enddo + +write " Watch Point 0:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[0].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[0].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[0].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[0].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[0].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[0].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[0].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[0].CountdownToStale +write " " +write " Watch Point 4:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[4].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[4].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[4].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[4].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[4].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[4].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[4].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[4].CountdownToStale +write " " +write " Watch Point 8:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[8].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[8].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[8].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[8].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[8].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[8].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[8].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[8].CountdownToStale +write " " +write " Watch Point 12:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[12].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[12].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[12].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[12].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[12].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[12].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[12].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[12].CountdownToStale +write " " +write " Watch Point 22:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[22].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[22].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[22].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[22].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[22].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[22].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[22].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[22].CountdownToStale +write " " +write " Watch Point 23:" +write " WatchResults = ", p@$SC_$CPU_LC_WRT[23].WatchResults +write " Evaluation Count = ", $SC_$CPU_LC_WRT[23].EvaluationCount +write " False to True Count = ", $SC_$CPU_LC_WRT[23].FalsetoTrueCount +write " Consecutive True = ", $SC_$CPU_LC_WRT[23].ConsectiveTrueCount +write " Cum True Count = ", $SC_$CPU_LC_WRT[23].CumulativeTrueCount +write " F to T Value = ", $SC_$CPU_LC_WRT[23].FtoTValue +write " T to F Value = ", $SC_$CPU_LC_WRT[23].TtoFValue +write " Stale Counter = ", $SC_$CPU_LC_WRT[23].CountdownToStale + +step3: +write ";*********************************************************************" +write "; Step 3.0: Clean-up" +write ";*********************************************************************" + +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_stale" +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_stress.prc b/test_and_ground/asist/prc/template/template_lc_stress.prc similarity index 83% rename from test_and_ground/asist/prc/template/template_lcx_stress.prc rename to test_and_ground/asist/prc/template/template_lc_stress.prc index 64e1031..f68304b 100644 --- a/test_and_ground/asist/prc/template/template_lcx_stress.prc +++ b/test_and_ground/asist/prc/template/template_lc_stress.prc @@ -1,1697 +1,1673 @@ -PROC $sc_$cpu_lcx_stress -;******************************************************************************* -; Test Name: lcx_stress -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker (LC) functions -; properly when monitoring the maximum number of WatchPoints (WP). All -; evaluate to false. The maximum number of ActionPoints (AP) also evaluate -; to fail. -; -; Requirements Tested -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message -; LCX2000 The flight software shall monitor a maximum of -; Watchpoints. -; LCX2003 Upon receipt of a message, LCX shall compare the data in the -; message to the table-defined value using the table-defined -; comparison value and comparison operator for each data point -; defined in the Watchpoint Definition Table (WDT) if the LCX -; Application State is one of the following: -; a) Active -; b) Passive -; LCX2003.2 LCX shall support the following comparison values: -; a) = -; b) != -; c) > -; d) >= -; e) < -; f) <= -; LC2003.5 If the Watchpoint cannot be evaluated, LCX shall set the -; Watchpoint Results Table to Error for the erroneous Watchpoint. -; LCX2004 For each Watchpoint, the flight software shall maintain the -; following statistics in the dump-only Watchpoint Results Table: -; a) The result of the last relational comparison (False, True, -; Error or Stale) -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) Most recent FALSE to TRUE transition value -; g) Most recent FALSE to TRUE transition timestamp -; h) Most recent TRUE to FALSE transition value -; i) Most recent TRUE to FALSE transition timestamp -; LCX3000 Limit Checker shall support up to a maximum of -; Actionpoints. -; LCX3001 Upon receipt of a Sample Request, LCX shall process the request -; specified actionpoints defined in the Actionpoint Definition -; Table (ADT) if the LCX Application State is one of the -; following: -; a) Active -; b) Passive -; LCX3001.1 LCX shall support the following Reverse Polish Operators: -; a) and -; b) or -; c) xor -; d) not -; e) equals -; LCX3001.3 If the Actionpoint cannot be evaluated, LCX shall set the -; Actionpoint Results Table to ERROR for the erroneous Actionpoint -; LCX3002 Each table-defined Actionpoint shall be evaluated and the -; results stored in the dump-only Actionpoint Results Table if the -; Actionpoint state is either: -; a) Active -; b) Passive -; LCX3002.3 If the equation has yielded a Fail result for the table-defined -; consecutive number of times limit and the Actionpoint is -; currently Active, LCX shall: -; a) generate an event message -; b) send a command to start the table-defined RTS -; c) Increment the counter indicating Total count of commands -; sent to SC task to start an RTS -; LCX3002.3.1 Once an RTS is initiated, LCX shall change the current state of -; the associated Actionpoint to Passive. -; LCX3002.4 If the equation has yielded a Fail result for the defined -; consecutive number of times and the Actionpoint is currently -; Passive, LCX shall -; a) generate an event message indicating that the Actionpoint -; Failed but the action was not taken -; b) Increment the counter indicating Number of Start RTS -; commands NOT sent to SC task because LCX Application is -; PASSIVE -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample(Pass,Fail,Error,Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LCX Application to Active -; LCX4003 Upon receipt of a Set Actionpoint to Active Command, LCX shall -; set the state of the command-specified Actionpoint to ACTIVE -; such that the actionpoint is evaluated and the table-defined -; actions are taken based on the evaluation -; LCX4004 Upon receipt of a Set All Actionpoints to Active Command, LCX -; shall set the state for all Actionpoints to ACTIVE such that -; the actionpoints are evaluated and the table-defined actions are -; taken based on the evaluation -; LCX4006 Upon receipt of a Set All Actionpoints to Passive Command, LCX -; shall set the state for the all Actionpoints to PASSIVE such -; that all actionpoints are evaluated, however, no actions are -; taken -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; tlm) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LC State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 Walt Moleski Original Procedure for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lcx_wdt1 Sets up the Watchpoint Definition table files for testing -; lcx_adt1 Sets up the Actionpoint Definition table files for testing -; -; Expected Test Results and Analysis -; -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "cfe_tbl_events.h" -#include "to_lab_events.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" -#include "sc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1003 0 -#define LCX_2000 1 -#define LCX_2003 2 -#define LCX_20032 3 -#define LCX_20035 4 -#define LCX_2004 5 -#define LCX_3000 6 -#define LCX_3001 7 -#define LCX_30011 8 -#define LCX_30013 9 -#define LCX_3002 10 -#define LCX_30023 11 -#define LCX_300231 12 -#define LCX_30024 13 -#define LCX_3006 14 -#define LCX_4000 15 -#define LCX_4003 16 -#define LCX_4004 17 -#define LCX_4006 18 -#define LCX_8000 19 -#define LCX_9000 20 -#define LCX_9001 21 -#define LCX_9002 22 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -global ut_req_array_size = 22 -global ut_requirement[0 .. ut_req_array_size] -global rts001_started - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1003","LCX_2000", ;; - "LCX_2003","LCX_2003.2","LCX_2003.5","LCX_2004","LCX_3000","LCX_3001", ;; - "LCX_3001.1","LCX_3001.3","LCX_3002","LCX_3002.3","LCX_3002.3.1", ;; - "LCX_3002.4","LCX_3006","LCX_4000","LCX_4003","LCX_4004","LCX_4006", ;; - "LCX_8000","LCX_9000","LCX_9001","LCX_9002"] - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL rawcmd -LOCAL stream1 -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL wrtAppId, artAppId -LOCAL CmdStatus -LOCAL State -Local rdlindex -Local maxwp = LC_MAX_WATCHPOINTS - 1 -Local maxap = LC_MAX_ACTIONPOINTS - 1 -local msgID -local Pattern[32] -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local ADTTblName = LCAppName & ".LC_ADT" -local WRTTblName = LCAppName & ".LC_WRT" -local WDTTblName = LCAppName & ".LC_WDT" - -;;; Need to set the message ID and data pattern based upon the cpu being used -;;; CPU1 is the default -msgID = 0x989 - -if ("$CPU" = "CPU2") then - msgID = 0xa89 -elseif ("$CPU" = "CPU3") then - msgID = 0x889 -endif - -Pattern[1] = 0xff -Pattern[2] = 0xff -Pattern[3] = 0xff -Pattern[4] = 0xff -Pattern[5] = 0xff -Pattern[6] = 0xff -Pattern[7] = 0xff -Pattern[8] = 0x13 -Pattern[9] = 0x46 -Pattern[10] = 0xff -Pattern[11] = 0xf4 -Pattern[12] = 0xff -Pattern[13] = 0xff -Pattern[14] = 0xff -Pattern[15] = 0xff -Pattern[16] = 0xff -for index = 17 to 32 do - Pattern[index] = 0 -enddo - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Create the WDT and ADT table loads used for testing and " -write "; upload them to the proper location. Also, display the LC pages." -write ";********************************************************************" -s $SC_$CPU_lcx_wdt4 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt4.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt4 - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt4.tbl", adtFileName, "$CPU", "P") - -;; Display the pages -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ADT -page $SC_$CPU_LC_WDT -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " -write "; initialized to zero (0). " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the SC HK packet ID, WRT and ART app ID based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" -artAppId = "0FB8" -wrtAppId = "0FB9" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" - artAppId = "0FD6" - wrtAppId = "0FD7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" - artAppId = "0FF6" - wrtAppId = "0FF7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;;255 is because they are disabled and not measured - for apindex = 1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus <> 255) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - - if (wpindex < WPACKED) then - write " Index of failure = ", wpindex - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " Index of Failure = ", apindex - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - - ut_setrequirements LCX_9000, "F" -endif - -;; Dump the Watchpoint Results Table -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS) then - write " Failed (9001) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" -else - write "<*> Passed (9001) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" -endif - -;; Dump the Actionpoint Results Table -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" -else - write "<*> Passed (9002) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" -endif - -write ";*********************************************************************" -write "; Step 1.6: Enable DEBUG Event Messages " -write ";*********************************************************************" -local cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the LC and CFE_TBL application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_TBL" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 2.0: Test LC Active, all AP passive, all WP trigger, and all " -write "; AP fail." -write ";*********************************************************************" -write "; Step 2.1: Send a Set LC Application State to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -;; Set all APs to Passive -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" - -if (ut_sc_status = UT_SC_Success) then - write "<*> Passed (1003;4006) - Set ALL AP State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4006, "P" -else - write " Failed (1003;4006) - Set ALL AP State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4006, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2: Send packets for all WP defined in WDT, data run 1" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=msgID, DataSize=16, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - -write ";*********************************************************************" -write "; Step 2.3: Send Sample Request for all APs. All APs should fail but " -write "; no RTSs should fire since they are all PASSIVE. " -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=maxap UpdateAge=0 -wait 5 - -write ";*********************************************************************" -write "; Step 2.4: Check housekeeping counters" -write ";*********************************************************************" -;;if ($SC_$CPU_LC_PASSRTSCNT = LC_MAX_ACTIONPOINTS) AND ;; -if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = LC_MAX_ACTIONPOINTS) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 1) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ;; - ($SC_$CPU_LC_WPSINUSE = LC_MAX_WATCHPOINTS) AND ;; - ($SC_$CPU_LC_ACTIVEAPS = 0) THEN - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - enddo - - ;; rest should be 0x99 since they are passive and fail - for apindex = 1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus <> 0x99) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (2000;8000) - Housekeeping telemetry updated properly." - - ut_setrequirements LCX_2000, "P" - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (2000;8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC =", $SC_$CPU_LC_CMDPC - write " CMDEC =", $SC_$CPU_LC_CMDEC - write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT =", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT - write " WP in use =", $SC_$CPU_LC_WPSINUSE - write " Active APs =", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_2000, "F" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 2.5: Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 2.6: Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;30024;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30024, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;30024;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30024, "P" - ut_setrequirements LCX_3006, "P" -endif - - -write ";*********************************************************************" -write "; Step 2.7: Reset all statistics" -write ";*********************************************************************" - -/$SC_$CPU_LC_RESETCTRS -wait 5 -/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF -wait 5 -/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF -wait 5 - -write ";*********************************************************************" -write "; Step 3.0: Test LC Passive, all AP active, all WP trigger, and all " -write "; AP fail." -write ";*********************************************************************" -write "; Step 3.1: Send a Set LC Application State to Passive Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -;; Set all APs to Active -State = LC_APSTATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" - -if (ut_sc_status = UT_SC_Success) then - write "<*> Passed (1003;4006) - Set ALL AP State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4006, "P" -else - write " Failed (1003;4006) - Set ALL AP State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4006, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.2: Send packets for all WP defined in WDT, data run 1" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=msgID, DataSize=16, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - -write ";*********************************************************************" -write "; Step 3.3: Send Sample Request for all APs. All APs should fail but " -write "; no RTSs should fire since the LC Application state is PASSIVE. " -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=maxap UpdateAge=0 -wait 5 - -write ";*********************************************************************" -write "; Step 3.4: Check housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_PASSRTSCNT = LC_MAX_ACTIONPOINTS) AND ;; - ($SC_$CPU_LC_CURLCSTATE = LC_STATE_PASSIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = LC_MAX_ACTIONPOINTS) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 1) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ;; - ($SC_$CPU_LC_WPSINUSE = LC_MAX_WATCHPOINTS) AND ;; - ($SC_$CPU_LC_ACTIVEAPS = 0) THEN - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - enddo - - ;; rest should be 0x99 since they are passive and fail - for apindex = 1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus <> 0x99) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (2000;8000) - Housekeeping telemetry updated properly." - - ut_setrequirements LCX_2000, "P" - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (2000;8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC =", $SC_$CPU_LC_CMDPC - write " CMDEC =", $SC_$CPU_LC_CMDEC - write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT =", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT - write " WP in use =", $SC_$CPU_LC_WPSINUSE - write " Active APs =", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_2000, "F" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 3.5: Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 3.6: Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;30024;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30024, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;30024;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30024, "P" - ut_setrequirements LCX_3006, "P" -endif - - -write ";*********************************************************************" -write "; Step 3.7: Reset all statistics" -write ";*********************************************************************" - -/$SC_$CPU_LC_RESETCTRS -wait 5 -/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF -wait 5 -/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF -wait 5 - -write ";*********************************************************************" -write "; Step 4.0: Test LC Active, all AP active, all WP trigger, and all " -write "; AP fail." -write ";*********************************************************************" -write "; Step 4.1: Send a Set LC Application State to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -;; Set all APs to Active -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" - -if (ut_sc_status = UT_SC_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.2: Start the Stored Command (SC) and TST_SC Applications. " -write ";*********************************************************************" -rts001_started = FALSE -s $sc_$cpu_sc_start_apps("3.2") - -wait 5 - -write ";*********************************************************************" -write "; Step 4.3: Enable DEBUG Event Messages for the SC application." -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 1 - -;; Enable DEBUG events for the SC and CFE_TBL application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application="SC" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";***********************************************************************" -write "; Step 4.4: Create and load a valid table to RTS #10. " -write ";***********************************************************************" -local work = %env("WORK") -;; Need to check if the .scs file used below exists. If not, end the proc -local filename = work & "/image/$sc_$cpu_lcx_rts10_load.scs" -if NOT file_exists(filename) then - write " Failed - Expected load file '",filename, "' not found. Skipping this test." - goto step3_8 -endif -;; Using the SCP utilities, compile and build the RTS load file -compile_rts "$sc_$cpu_lcx_rts10_load" 10 -s $sc_$cpu_load_ats_rts("$sc_$cpu_lcx_rts10_load","$cpu_rts010_lc") - -;; Load the table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_FILE_LOADED_INF_EID, "INFO", 1 - -local cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -start load_table ("$cpu_rts010_lc", "$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load command for RTS #10 sent successfully." -else - write " Failed - Load command for RTS #10 did not execute successfully." -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - Event Msg ",$SC_$CPU_find_event[1].eventid," Found!" -else - write " Failed - Event Message not received for Load command." -endif - -wait 5 - -write ";***********************************************************************" -write "; Step 4.5: Send the Table Services Validate command for RTS #10. " -write ";***********************************************************************" -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VAL_REQ_MADE_INF_EID, "DEBUG", 1 -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VALIDATION_INF_EID, "INFO", 2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME="SC.RTS_TBL010" - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - RTS #10 Table validate command sent." - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - Event Msg ",$SC_$CPU_find_event[1].eventid," Found!" - else - write " Failed - Event Message not received for Validate command." - endif -else - write " Failed - RTS #10 Table validation failed." -endif - -;; Wait for the validation message -wait 20 - -;; If the message is rcv'd, then validation passed -if ($SC_$CPU_find_event[2].num_found_messages = 1) then - write "<*> Passed - RTS #10 Table Validation was successful. Event Msg ",$SC_$CPU_find_event[2].eventid," rcv'd." -else - write " Failed - RTS #10 Table validation failed. Expected Event Msg ",CFE_TBL_VALIDATION_INF_EID, " not rcv'd." -endif - -wait 5 - -write ";***********************************************************************" -write "; Step 4.6: Send the Table Services Activate command for RTS #10. " -write ";***********************************************************************" -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_LOAD_PEND_REQ_INF_EID,"DEBUG",1 -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO",2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -/$SC_$CPU_TBL_ACTIVATE ATableName="SC.RTS_TBL010" - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Activate RTS #10 Table command sent properly." -else - write " Failed - Activate RTS #10 Table command." -endif - -wait 5 - -if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - Event message ",$SC_$CPU_find_event[1].eventid, " received" -else - write " Failed - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_LOAD_PEND_REQ_INF_EID, "." -endif - -if ($SC_$CPU_find_event[2].num_found_messages = 1) then - write "<*> Passed - RTS #10 Table Updated successfully. Event Msg ",$SC_$CPU_find_event[2].eventid," rcv'd." -else - write " Failed - RTS #10 Table update failed. Event Msg not received for activate command." -endif - -wait 5 - -write ";***********************************************************************" -write "; Step 4.7: Send the Enable command for RTS #10. " -write ";***********************************************************************" -ut_setupevents "$SC", "$CPU", "SC", SC_ENABLE_RTS_DEB_EID, "DEBUG", 1 - -cmdctr = $SC_$CPU_SC_CMDPC + 1 -;; Send the Command -/$SC_$CPU_SC_EnableRTS RTSID=10 - -ut_tlmwait $SC_$CPU_SC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - SC Enable RTS #10 command sent properly." -else - write " Failed - SC Enable RTS #10 command did not increment CMDPC." -endif - -;; Check for the event message -ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Expected Event Msg ",SC_ENABLE_RTS_DEB_EID," rcv'd." -else - write " Failed - Event message ", $SC_$CPU_evs_eventid," rcv'd. Expected Event Msg ",SC_ENABLE_RTS_DEB_EID,"." -endif - -wait 5 - -step3_8: -write ";*********************************************************************" -write "; Step 4.8: Send a single packet for all WPs defined in WDT. The WDT " -write "; loaded contains the same entry for the maximum WPs that can be " -write "; defined. Therefore, only 1 packet needs to be sent. " -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=msgID, DataSize=16, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - - -write ";*********************************************************************" -write "; Step 4.9: Send Sample Request for all APs. All APs should fail and " -write "; RTS #10 should fire. RTS #10 contains an LC and SC NO-OP commands." -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=maxap UpdateAge=0 -wait 5 - -write ";*********************************************************************" -write "; Step 4.10: Check housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = LC_MAX_ACTIONPOINTS) AND ;; - ($SC_$CPU_LC_MONMSGCNT = 1) AND ;; - ($SC_$CPU_LC_RTSCNT = LC_MAX_ACTIONPOINTS) AND ;; - ($SC_$CPU_LC_WPSINUSE = LC_MAX_WATCHPOINTS) AND ;; - ($SC_$CPU_LC_ACTIVEAPS = 0) THEN - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - enddo - - ;; rest should be 0x99 since they are active and fail - for apindex = 1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus <> 0x99) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC =", $SC_$CPU_LC_CMDPC - write " CMDEC =", $SC_$CPU_LC_CMDEC - write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT =", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT - write " WP in use =", $SC_$CPU_LC_WPSINUSE - write " Active APs =", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 4.11: Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 4.12: Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3002.3;3002.3.1;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_30023, "F" - ut_setrequirements LCX_300231, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3002.3;3002.3.1;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_30023, "P" - ut_setrequirements LCX_300231, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 5.0: Anomaly Tests " -write ";*********************************************************************" -write "; Step 5.1: Create & load a WDT containing a Watchpoint that has an " -write "; invalid offset. " -write ";*********************************************************************" -;; Create the load file -s $SC_$CPU_lcx_wdt4a - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to load the table -s load_table("lc_def_wdt4a.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load command for WDT sent successfully." -else - write " Failed - Load command for WDT did not execute successfully." -endif - -;; Send the commands to validate each table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to validate the WDT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Validate command for WDT sent successfully." -else - write " Failed - Validate command for WDT did not execute successfully." -endif - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed - WDT Validation successful message rcv'd" - else - write " Failed - Did not rcv WDT Validation successful message" - endif -else - write " Failed - WDT Failed Validation" -endif - -;; Send the command to activate the table -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Activate command for WDT sent successfully." -else - write " Failed - Activate command for WDT did not execute successfully." -endif - -;; Wait for the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the Table Update Success message" -else - write "<*> Failed - Did not rcv the Table Update Success message for the WDT table" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.2: Create and load an ADT that has a AP that relies on the " -write "; Watchpoint above. This should set the AP Result to ERROR. " -write ";*********************************************************************" -;; Create the load file -s $SC_$CPU_lcx_adt4a - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to load the ADT table -s load_table("lc_def_adt4a.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load command for ADT sent successfully." -else - write " Failed - Load command for ADT did not execute successfully." -endif - ;; Send the command to validate the ADT table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 2 - -;; Send the command to validate the ADT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName - -;; Wait for the CFE Validation Success message -wait 10 -if ($sc_$cpu_find_event[1].num_found_messages = 1) AND ;; - ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed - ADT Validation successful message rcv'd" -else - write " Failed - Did not rcv ADT Validation successful message" -endif - -;; Send the commands to activate the table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_UPDATE_SUCCESS_INF_EID, "INFO", 1 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName - -;; Wait until you receive the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd Table Update Success messages" -else - write "<*> Failed - Did not rcv Table Update Success message for the ADT table" -endif - -;; Set the first AP to Active -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" - -if (ut_sc_status = UT_SC_Success) then - write "<*> Passed (1003;4003) - Set AP #0 State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4003, "P" -else - write " Failed (1003;4003) - Set AP #0 State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.3: Send a packet for the WP defined above. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WP_OFFSET_ERR_EID, "ERROR", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_PACKET_INF_EID, "INFO", 2 - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=msgID, DataSize=16, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -;; Wait for the expected error message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed (2003.5) - Rcv'd the expected Offset Error message." - ut_setrequirements LCX_20035, "P" -else - write " Failed (2003.5) - Event msg ",$SC_$CPU_evs_eventid," received. Expected ",LC_WP_OFFSET_ERR_EID,"." - ut_setrequirements LCX_20035, "F" -endif - -;; Verify the SendPacket Test App Command message -if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed - Send Packet command sent properly." -else - write " Failed - Did not rcv the Send Packet command message." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.4: Send a packet that WP is not subscribed to. " -write "; Nothing should happen. " -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDPACKET MsgId=0x987, DataSize=16, DataPattern=Pattern -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 5.5: Send a sample request with an invalid AP specified. " -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_APNUM_ERR_EID, "ERROR", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 2 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=LC_MAX_ACTIONPOINTS EndAP=LC_MAX_ACTIONPOINTS UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -;; Wait for the expected error message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed (3000) - Rcv'd the expected AP Sample Error message." - ut_setrequirements LCX_3000, "P" -else - write " Failed (3000) - Event msg ",$SC_$CPU_evs_eventid," received. Expected ",LC_APSAMPLE_APNUM_ERR_EID,"." - ut_setrequirements LCX_3000, "F" -endif - -;; Verify the SendPacket Test App Command message -if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed - Send Sample command sent properly." -else - write " Failed - Did not rcv the Send Sample command message." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.6: Send a Sample command for the first AP. " -write ";*********************************************************************" -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=0 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 5.7: Dump WRT and check WP #1 for Error Result " -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtAppId) -wait 5 - -if ($SC_$CPU_LC_WRT[0].WatchResults = LC_WATCH_ERROR) then - write "<*> Passed (2003.5) - WP #0 indicates ERROR in the Results." - ut_setrequirements LCX_20035, "P" -else - write " Failed (2003.5) - WP #0 was not set to ERROR as expected." - ut_setrequirements LCX_20035, "F" -endif - -write ";*********************************************************************" -write "; Step 5.8: Dump ART and AP #1 for Error Result " -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artAppId) -wait 5 - -if ($SC_$CPU_LC_ART[0].ActionResult = LC_ACTION_ERROR) then - write "<*> Passed (3001.3) - AP #0 indicates ERROR in the Results." - ut_setrequirements LCX_30013, "P" -else - write " Failed (3001.3) - AP #0 was not set to ERROR as expected." - ut_setrequirements LCX_30013, "F" -endif - -write ";*********************************************************************" -write "; Step 6.0: Clean-up" -write ";*********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_stress " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_stress +;******************************************************************************* +; Test Name: lc_stress +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) functions +; properly when monitoring the maximum number of WatchPoints (WP). All +; evaluate to false. The maximum number of ActionPoints (AP) also evaluate +; to fail. +; +; Requirements Tested +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message +; LC2000 The flight software shall monitor a maximum of +; Watchpoints. +; LC2003 Upon receipt of a message, LC shall compare the data in the +; message to the table-defined value using the table-defined +; comparison value and comparison operator for each data point +; defined in the Watchpoint Definition Table (WDT) if the LC +; Application State is one of the following: +; a) Active +; b) Passive +; LC2003.1 LC shall support the following comparison values: +; a) = +; b) != +; c) > +; d) >= +; e) < +; f) <= +; LC2003.4 If the Watchpoint cannot be evaluated, LC shall set the +; Watchpoint Results Table to Error for the erroneous Watchpoint. +; LC2004 For each Watchpoint, the flight software shall maintain the +; following statistics in the dump-only Watchpoint Results Table: +; a) The result of the last relational comparison (False, True, +; Error or Stale) +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) Most recent FALSE to TRUE transition value +; g) Most recent FALSE to TRUE transition timestamp +; h) Most recent TRUE to FALSE transition value +; i) Most recent TRUE to FALSE transition timestamp +; LC3000 Limit Checker shall support up to a maximum of +; Actionpoints. +; LC3001 Upon receipt of a Sample Request, LC shall process the request +; specified actionpoints defined in the Actionpoint Definition +; Table (ADT) if the LC Application State is one of the +; following: +; a) Active +; b) Passive +; LC3001.1 LC shall support the following Reverse Polish Operators: +; a) and +; b) or +; c) xor +; d) not +; e) equals +; LC3001.3 If the Actionpoint cannot be evaluated, LC shall set the +; Actionpoint Results Table to ERROR for the erroneous Actionpoint +; LC3002 Each table-defined Actionpoint shall be evaluated and the +; results stored in the dump-only Actionpoint Results Table if the +; Actionpoint state is either: +; a) Active +; b) Passive +; LC3002.3 If the equation has yielded a Fail result for the table-defined +; consecutive number of times limit and the Actionpoint is +; currently Active, LC shall: +; a) generate an event message +; b) send a command to start the table-defined RTS +; c) Increment the counter indicating Total count of commands +; sent to SC task to start an RTS +; LC3002.3.1 Once an RTS is initiated, LC shall change the current state of +; the associated Actionpoint to Passive. +; LC3002.4 If the equation has yielded a Fail result for the defined +; consecutive number of times and the Actionpoint is currently +; Passive, LC shall +; a) generate an event message indicating that the Actionpoint +; Failed but the action was not taken +; b) Increment the counter indicating Number of Start RTS +; commands NOT sent to SC task because LC Application is +; PASSIVE +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample(Pass,Fail,Error,Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC4003 Upon receipt of a Set Actionpoint to Active Command, LC shall +; set the state of the command-specified Actionpoint to ACTIVE +; such that the actionpoint is evaluated and the table-defined +; actions are taken based on the evaluation +; LC4004 Upon receipt of a Set All Actionpoints to Active Command, LC +; shall set the state for all Actionpoints to ACTIVE such that +; the actionpoints are evaluated and the table-defined actions are +; taken based on the evaluation +; LC4006 Upon receipt of a Set All Actionpoints to Passive Command, LC +; shall set the state for the all Actionpoints to PASSIVE such +; that all actionpoints are evaluated, however, no actions are +; taken +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; tlm) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 Walt Moleski Original Procedure for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files for testing +; lc_adt1 Sets up the Actionpoint Definition table files for testing +; +; Expected Test Results and Analysis +; +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "cfe_tbl_events.h" +#include "to_lab_events.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" +#include "sc_events.h" + +%liv (log_procedure) = logging + +#define LC_1003 0 +#define LC_2000 1 +#define LC_2003 2 +#define LC_20031 3 +#define LC_20034 4 +#define LC_2004 5 +#define LC_3000 6 +#define LC_3001 7 +#define LC_30011 8 +#define LC_30013 9 +#define LC_3002 10 +#define LC_30023 11 +#define LC_300231 12 +#define LC_30024 13 +#define LC_3006 14 +#define LC_4000 15 +#define LC_4003 16 +#define LC_4004 17 +#define LC_4006 18 +#define LC_8000 19 +#define LC_9000 20 +#define LC_9001 21 +#define LC_9002 22 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +global ut_req_array_size = 22 +global ut_requirement[0 .. ut_req_array_size] +global rts001_started + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1003","LC_2000", ;; + "LC_2003","LC_2003.1","LC_2003.4","LC_2004","LC_3000","LC_3001", ;; + "LC_3001.1","LC_3001.3","LC_3002","LC_3002.3","LC_3002.3.1", ;; + "LC_3002.4","LC_3006","LC_4000","LC_4003","LC_4004","LC_4006", ;; + "LC_8000","LC_9000","LC_9001","LC_9002"] + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL rawcmd +LOCAL stream1 +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL wrtAppId, artAppId +LOCAL CmdStatus +LOCAL State +Local rdlindex +Local maxwp = LC_MAX_WATCHPOINTS - 1 +Local maxap = LC_MAX_ACTIONPOINTS - 1 +local msgID +local Pattern[32] +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local ADTTblName = LCAppName & ".LC_ADT" +local WRTTblName = LCAppName & ".LC_WRT" +local WDTTblName = LCAppName & ".LC_WDT" +local hostCPU = "$CPU" + +;;; Need to set the message ID and data pattern based upon the cpu being used +;;; CPU1 is the default +msgID = 0x989 + +Pattern[1] = 0xff +Pattern[2] = 0xff +Pattern[3] = 0xff +Pattern[4] = 0xff +Pattern[5] = 0xff +Pattern[6] = 0xff +Pattern[7] = 0xff +Pattern[8] = 0x13 +Pattern[9] = 0x46 +Pattern[10] = 0xff +Pattern[11] = 0xf4 +Pattern[12] = 0xff +Pattern[13] = 0xff +Pattern[14] = 0xff +Pattern[15] = 0xff +Pattern[16] = 0xff +for index = 17 to 32 do + Pattern[index] = 0 +enddo + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Create the WDT and ADT table loads used for testing and " +write "; upload them to the proper location. Also, display the LC pages." +write ";********************************************************************" +s $SC_$CPU_lc_wdt4 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt4.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt4 + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt4.tbl", adtFileName, hostCPU, "P") + +;; Display the pages +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ADT +page $SC_$CPU_LC_WDT +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " +write "; initialized to zero (0). " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the SC HK packet ID, WRT and ART app ID based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" +artAppId = "0FB8" +wrtAppId = "0FB9" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;;255 is because they are disabled and not measured + for apindex = 1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus <> 255) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + + if (wpindex < WPACKED) then + write " Index of failure = ", wpindex + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " Index of Failure = ", apindex + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + + ut_setrequirements LC_9000, "F" +endif + +;; Dump the Watchpoint Results Table +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS) then + write " Failed (9001) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" +else + write "<*> Passed (9001) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" +endif + +;; Dump the Actionpoint Results Table +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" +else + write "<*> Passed (9002) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" +endif + +write ";*********************************************************************" +write "; Step 1.6: Enable DEBUG Event Messages " +write ";*********************************************************************" +local cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the LC and CFE_TBL application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_TBL" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 2.0: Test LC Active, all AP passive, all WP trigger, and all " +write "; AP fail." +write ";*********************************************************************" +write "; Step 2.1: Send a Set LC Application State to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +;; Set all APs to Passive +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" + +if (ut_sc_status = UT_SC_Success) then + write "<*> Passed (1003;4006) - Set ALL AP State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4006, "P" +else + write " Failed (1003;4006) - Set ALL AP State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4006, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2: Send packets for all WP defined in WDT, data run 1" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=msgID, DataSize=16, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + +write ";*********************************************************************" +write "; Step 2.3: Send Sample Request for all APs. All APs should fail but " +write "; no RTSs should fire since they are all PASSIVE. " +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=maxap UpdateAge=0 +wait 5 + +write ";*********************************************************************" +write "; Step 2.4: Check housekeeping counters" +write ";*********************************************************************" +;;if ($SC_$CPU_LC_PASSRTSCNT = LC_MAX_ACTIONPOINTS) AND ;; +if ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = LC_MAX_ACTIONPOINTS) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 1) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ;; + ($SC_$CPU_LC_WPSINUSE = LC_MAX_WATCHPOINTS) AND ;; + ($SC_$CPU_LC_ACTIVEAPS = 0) THEN + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + enddo + + ;; rest should be 0x99 since they are passive and fail + for apindex = 1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus <> 0x99) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (2000;8000) - Housekeeping telemetry updated properly." + + ut_setrequirements LC_2000, "P" + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (2000;8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC =", $SC_$CPU_LC_CMDPC + write " CMDEC =", $SC_$CPU_LC_CMDEC + write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT =", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT + write " WP in use =", $SC_$CPU_LC_WPSINUSE + write " Active APs =", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_2000, "F" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 2.5: Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 2.6: Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;30024;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30024, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;30024;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30024, "P" + ut_setrequirements LC_3006, "P" +endif + + +write ";*********************************************************************" +write "; Step 2.7: Reset all statistics" +write ";*********************************************************************" + +/$SC_$CPU_LC_RESETCTRS +wait 5 +/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF +wait 5 +/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF +wait 5 + +write ";*********************************************************************" +write "; Step 3.0: Test LC Passive, all AP active, all WP trigger, and all " +write "; AP fail." +write ";*********************************************************************" +write "; Step 3.1: Send a Set LC Application State to Passive Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +;; Set all APs to Active +State = LC_APSTATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" + +if (ut_sc_status = UT_SC_Success) then + write "<*> Passed (1003;4006) - Set ALL AP State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4006, "P" +else + write " Failed (1003;4006) - Set ALL AP State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4006, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.2: Send packets for all WP defined in WDT, data run 1" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=msgID, DataSize=16, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + +write ";*********************************************************************" +write "; Step 3.3: Send Sample Request for all APs. All APs should fail but " +write "; no RTSs should fire since the LC Application state is PASSIVE. " +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=maxap UpdateAge=0 +wait 5 + +write ";*********************************************************************" +write "; Step 3.4: Check housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_PASSRTSCNT = LC_MAX_ACTIONPOINTS) AND ;; + ($SC_$CPU_LC_CURLCSTATE = LC_STATE_PASSIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = LC_MAX_ACTIONPOINTS) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 1) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ;; + ($SC_$CPU_LC_WPSINUSE = LC_MAX_WATCHPOINTS) AND ;; + ($SC_$CPU_LC_ACTIVEAPS = 0) THEN + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + enddo + + ;; rest should be 0x99 since they are passive and fail + for apindex = 1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus <> 0x99) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (2000;8000) - Housekeeping telemetry updated properly." + + ut_setrequirements LC_2000, "P" + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (2000;8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC =", $SC_$CPU_LC_CMDPC + write " CMDEC =", $SC_$CPU_LC_CMDEC + write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT =", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT + write " WP in use =", $SC_$CPU_LC_WPSINUSE + write " Active APs =", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_2000, "F" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 3.5: Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 3.6: Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;30024;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30024, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;30024;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30024, "P" + ut_setrequirements LC_3006, "P" +endif + + +write ";*********************************************************************" +write "; Step 3.7: Reset all statistics" +write ";*********************************************************************" + +/$SC_$CPU_LC_RESETCTRS +wait 5 +/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF +wait 5 +/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF +wait 5 + +write ";*********************************************************************" +write "; Step 4.0: Test LC Active, all AP active, all WP trigger, and all " +write "; AP fail." +write ";*********************************************************************" +write "; Step 4.1: Send a Set LC Application State to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +;; Set all APs to Active +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" + +if (ut_sc_status = UT_SC_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.2: Start the Stored Command (SC) and TST_SC Applications. " +write ";*********************************************************************" +rts001_started = FALSE +s $sc_$cpu_sc_start_apps("3.2") + +wait 5 + +write ";*********************************************************************" +write "; Step 4.3: Enable DEBUG Event Messages for the SC application." +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 1 + +;; Enable DEBUG events for the SC and CFE_TBL application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application="SC" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";***********************************************************************" +write "; Step 4.4: Create and load a valid table to RTS #10. " +write ";***********************************************************************" +local work = %env("WORK") +;; Need to check if the .scs file used below exists. If not, end the proc +local filename = work & "/image/$sc_$cpu_lc_rts10_load.scs" +if NOT file_exists(filename) then + write " Failed - Expected load file '",filename, "' not found. Skipping this test." + goto step3_8 +endif +;; Using the SCP utilities, compile and build the RTS load file +compile_rts "$sc_$cpu_lc_rts10_load" 10 +s $sc_$cpu_load_ats_rts("$sc_$cpu_lc_rts10_load","$cpu_rts010_lc") + +;; Load the table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_FILE_LOADED_INF_EID, "INFO", 1 + +local cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +start load_table ("$cpu_rts010_lc", hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load command for RTS #10 sent successfully." +else + write " Failed - Load command for RTS #10 did not execute successfully." +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - Event Msg ",$SC_$CPU_find_event[1].eventid," Found!" +else + write " Failed - Event Message not received for Load command." +endif + +wait 5 + +write ";***********************************************************************" +write "; Step 4.5: Send the Table Services Validate command for RTS #10. " +write ";***********************************************************************" +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VAL_REQ_MADE_INF_EID, "DEBUG", 1 +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_VALIDATION_INF_EID, "INFO", 2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME="SC.RTS_TBL010" + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - RTS #10 Table validate command sent." + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - Event Msg ",$SC_$CPU_find_event[1].eventid," Found!" + else + write " Failed - Event Message not received for Validate command." + endif +else + write " Failed - RTS #10 Table validation failed." +endif + +;; Wait for the validation message +wait 20 + +;; If the message is rcv'd, then validation passed +if ($SC_$CPU_find_event[2].num_found_messages = 1) then + write "<*> Passed - RTS #10 Table Validation was successful. Event Msg ",$SC_$CPU_find_event[2].eventid," rcv'd." +else + write " Failed - RTS #10 Table validation failed. Expected Event Msg ",CFE_TBL_VALIDATION_INF_EID, " not rcv'd." +endif + +wait 5 + +write ";***********************************************************************" +write "; Step 4.6: Send the Table Services Activate command for RTS #10. " +write ";***********************************************************************" +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_LOAD_PEND_REQ_INF_EID,"DEBUG",1 +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO",2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +/$SC_$CPU_TBL_ACTIVATE ATableName="SC.RTS_TBL010" + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Activate RTS #10 Table command sent properly." +else + write " Failed - Activate RTS #10 Table command." +endif + +wait 5 + +if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - Event message ",$SC_$CPU_find_event[1].eventid, " received" +else + write " Failed - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",CFE_TBL_LOAD_PEND_REQ_INF_EID, "." +endif + +if ($SC_$CPU_find_event[2].num_found_messages = 1) then + write "<*> Passed - RTS #10 Table Updated successfully. Event Msg ",$SC_$CPU_find_event[2].eventid," rcv'd." +else + write " Failed - RTS #10 Table update failed. Event Msg not received for activate command." +endif + +wait 5 + +write ";***********************************************************************" +write "; Step 4.7: Send the Enable command for RTS #10. " +write ";***********************************************************************" +ut_setupevents "$SC", "$CPU", "SC", SC_ENABLE_RTS_DEB_EID, "DEBUG", 1 + +cmdctr = $SC_$CPU_SC_CMDPC + 1 +;; Send the Command +/$SC_$CPU_SC_EnableRTS RTSID=10 + +ut_tlmwait $SC_$CPU_SC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - SC Enable RTS #10 command sent properly." +else + write " Failed - SC Enable RTS #10 command did not increment CMDPC." +endif + +;; Check for the event message +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Expected Event Msg ",SC_ENABLE_RTS_DEB_EID," rcv'd." +else + write " Failed - Event message ", $SC_$CPU_evs_eventid," rcv'd. Expected Event Msg ",SC_ENABLE_RTS_DEB_EID,"." +endif + +wait 5 + +step3_8: +write ";*********************************************************************" +write "; Step 4.8: Send a single packet for all WPs defined in WDT. The WDT " +write "; loaded contains the same entry for the maximum WPs that can be " +write "; defined. Therefore, only 1 packet needs to be sent. " +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=msgID, DataSize=16, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + + +write ";*********************************************************************" +write "; Step 4.9: Send Sample Request for all APs. All APs should fail and " +write "; RTS #10 should fire. RTS #10 contains an LC and SC NO-OP commands." +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=maxap UpdateAge=0 +wait 5 + +write ";*********************************************************************" +write "; Step 4.10: Check housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = LC_MAX_ACTIONPOINTS) AND ;; + ($SC_$CPU_LC_MONMSGCNT = 1) AND ;; + ($SC_$CPU_LC_RTSCNT = LC_MAX_ACTIONPOINTS) AND ;; + ($SC_$CPU_LC_WPSINUSE = LC_MAX_WATCHPOINTS) AND ;; + ($SC_$CPU_LC_ACTIVEAPS = 0) THEN + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + enddo + + ;; rest should be 0x99 since they are active and fail + for apindex = 1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus <> 0x99) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.ALlStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC =", $SC_$CPU_LC_CMDPC + write " CMDEC =", $SC_$CPU_LC_CMDEC + write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT =", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT + write " WP in use =", $SC_$CPU_LC_WPSINUSE + write " Active APs =", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 4.11: Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 4.12: Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3002.3;3002.3.1;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_30023, "F" + ut_setrequirements LC_300231, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3002.3;3002.3.1;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_30023, "P" + ut_setrequirements LC_300231, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 5.0: Anomaly Tests " +write ";*********************************************************************" +write "; Step 5.1: Create & load a WDT containing a Watchpoint that has an " +write "; invalid offset. " +write ";*********************************************************************" +;; Create the load file +s $SC_$CPU_lc_wdt4a + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to load the table +s load_table("lc_def_wdt4a.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load command for WDT sent successfully." +else + write " Failed - Load command for WDT did not execute successfully." +endif + +;; Send the commands to validate each table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to validate the WDT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Validate command for WDT sent successfully." +else + write " Failed - Validate command for WDT did not execute successfully." +endif + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed - WDT Validation successful message rcv'd" + else + write " Failed - Did not rcv WDT Validation successful message" + endif +else + write " Failed - WDT Failed Validation" +endif + +;; Send the command to activate the table +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Activate command for WDT sent successfully." +else + write " Failed - Activate command for WDT did not execute successfully." +endif + +;; Wait for the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the Table Update Success message" +else + write "<*> Failed - Did not rcv the Table Update Success message for the WDT table" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.2: Create and load an ADT that has a AP that relies on the " +write "; Watchpoint above. This should set the AP Result to ERROR. " +write ";*********************************************************************" +;; Create the load file +s $SC_$CPU_lc_adt4a + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to load the ADT table +s load_table("lc_def_adt4a.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load command for ADT sent successfully." +else + write " Failed - Load command for ADT did not execute successfully." +endif + ;; Send the command to validate the ADT table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 2 + +;; Send the command to validate the ADT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName + +;; Wait for the CFE Validation Success message +wait 10 +if ($sc_$cpu_find_event[1].num_found_messages = 1) AND ;; + ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed - ADT Validation successful message rcv'd" +else + write " Failed - Did not rcv ADT Validation successful message" +endif + +;; Send the commands to activate the table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_UPDATE_SUCCESS_INF_EID, "INFO", 1 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName + +;; Wait until you receive the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd Table Update Success messages" +else + write "<*> Failed - Did not rcv Table Update Success message for the ADT table" +endif + +;; Set the first AP to Active +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State" + +if (ut_sc_status = UT_SC_Success) then + write "<*> Passed (1003;4003) - Set AP #0 State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4003, "P" +else + write " Failed (1003;4003) - Set AP #0 State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.3: Send a packet for the WP defined above. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WP_OFFSET_ERR_EID, "ERROR", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_PACKET_INF_EID, "INFO", 2 + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=msgID, DataSize=16, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +;; Wait for the expected error message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed (2003.4) - Rcv'd the expected Offset Error message." + ut_setrequirements LC_20034, "P" +else + write " Failed (2003.4) - Event msg ",$SC_$CPU_evs_eventid," received. Expected ",LC_WP_OFFSET_ERR_EID,"." + ut_setrequirements LC_20034, "F" +endif + +;; Verify the SendPacket Test App Command message +if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed - Send Packet command sent properly." +else + write " Failed - Did not rcv the Send Packet command message." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.4: Send a packet that WP is not subscribed to. " +write "; Nothing should happen. " +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDPACKET MsgId=0x987, DataSize=16, DataPattern=Pattern +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 5.5: Send a sample request with an invalid AP specified. " +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_APSAMPLE_APNUM_ERR_EID, "ERROR", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 2 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=LC_MAX_ACTIONPOINTS EndAP=LC_MAX_ACTIONPOINTS UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +;; Wait for the expected error message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed (3000) - Rcv'd the expected AP Sample Error message." + ut_setrequirements LC_3000, "P" +else + write " Failed (3000) - Event msg ",$SC_$CPU_evs_eventid," received. Expected ",LC_APSAMPLE_APNUM_ERR_EID,"." + ut_setrequirements LC_3000, "F" +endif + +;; Verify the SendPacket Test App Command message +if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed - Send Sample command sent properly." +else + write " Failed - Did not rcv the Send Sample command message." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.6: Send a Sample command for the first AP. " +write ";*********************************************************************" +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=0 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 5.7: Dump WRT and check WP #1 for Error Result " +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtAppId) +wait 5 + +if ($SC_$CPU_LC_WRT[0].WatchResults = LC_WATCH_ERROR) then + write "<*> Passed (2003.4) - WP #0 indicates ERROR in the Results." + ut_setrequirements LC_20034, "P" +else + write " Failed (2003.4) - WP #0 was not set to ERROR as expected." + ut_setrequirements LC_20034, "F" +endif + +write ";*********************************************************************" +write "; Step 5.8: Dump ART and AP #1 for Error Result " +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artAppId) +wait 5 + +if ($SC_$CPU_LC_ART[0].ActionResult = LC_ACTION_ERROR) then + write "<*> Passed (3001.3) - AP #0 indicates ERROR in the Results." + ut_setrequirements LC_30013, "P" +else + write " Failed (3001.3) - AP #0 was not set to ERROR as expected." + ut_setrequirements LC_30013, "F" +endif + +write ";*********************************************************************" +write "; Step 6.0: Clean-up" +write ";*********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_stress " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_tabletesting.prc b/test_and_ground/asist/prc/template/template_lc_tabletesting.prc similarity index 83% rename from test_and_ground/asist/prc/template/template_lcx_tabletesting.prc rename to test_and_ground/asist/prc/template/template_lc_tabletesting.prc index 79a0b33..d645937 100644 --- a/test_and_ground/asist/prc/template/template_lcx_tabletesting.prc +++ b/test_and_ground/asist/prc/template/template_lc_tabletesting.prc @@ -1,2446 +1,2589 @@ -PROC $sc_$cpu_lcx_tabletesting -;***************************************************************************** -; Test Name: lcx_tabletesting -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker eXtended (LCX) -; functions properly when loading new Watchpoint Definition Tables (WDT) -; and Actionpoint Definition Tables (ADT). The tables will be updated -; while the LC application is in the Active, Passive, and Disabled state. -; Also, the tables will be updated individually as well as simultaneously -; to ensure that the LC application behaves appropriately. Other tests -; include attempts to load invalid tables which should fail validation. -; -; Requirements Tested -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message -; LCX2004 For each Watchpoint, the flight software shall maintain the -; following statistics in the dump-only Watchpoint Results Table: -; a) The result of the last relational comparison (False, True, -; Error or Stale) -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) Most recent FALSE to TRUE transition value -; g) Most recent FALSE to TRUE transition timestamp -; h) Most recent TRUE to FALSE transition value -; i) Most recent TRUE to FALSE transition timestamp -; LCX2005 Upon receipt of a table update indication, LCX shall validate -; the Watchpoint Definition Table for the following: -; a) Valid operator -; b) Data size -; c) Message ID -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample(Pass,Fail,Error,Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result = -; Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX3007 Upon receipt of a table update indication, LCX shall validate -; the Actionpoint Definition Table for the following: -; a) valid default state -; b) RTS number (in range) -; c) Event Type (DEBUG,INFO,ERROR,CRITICAL) -; d) Failure Count (in range) -; e) Action Equation syntax -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LCX Application to Active -; LCX4001 Upon receipt of a Set LCX Application State to Passive Command, -; LCX shall set the LCX Application State to Passive -; LCX4002 Upon receipt of a Set LCX Application State to Disable Command, -; LCX shall set the LCX Application State to Disabled -; LCX4004 Upon receipt of a Set All Actionpoints to Active Command, LCX -; shall set the state for all Actionpoints to ACTIVE such that the -; actionpoints are evaluated and the table-defined actions are -; taken based on the evaluation -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LC Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; telemetry) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LC State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded -; a True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result = -; Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX9005 Upon any initialization, LCX shall validate the Watchpoint -; Definition Table for the following: -; a) valid operator -; b) data size -; c) Message ID -; LCX9006 Upon any initialization, LCX shall validate the Actionpoint -; Definition Table for the following: -; a) valid default state -; b) RTS number (in range) -; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) -; d) Failure Count (in range) -; e) Action Equation syntax -; LCX9007 Upon any initialization, LCX shall subscribe to the messages -; defined in the WDT. -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 10/01/12 Walt Moleski Initial procedure for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lcx_wdt1 Sets up the Watchpoint Definition table files for -; testing -; lcx_adt1 Sets up the Actionpoint Definition table files for -; testing -; -; Expected Test Results and Analysis -; -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "cfe_sb_events.h" -#include "cfe_tbl_events.h" -#include "to_lab_events.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1003 0 -#define LCX_2004 1 -#define LCX_2005 2 -#define LCX_3006 3 -#define LCX_3007 4 -#define LCX_4000 5 -#define LCX_4001 6 -#define LCX_4002 7 -#define LCX_4004 8 -#define LCX_8000 9 -#define LCX_9000 10 -#define LCX_9001 11 -#define LCX_9002 12 -#define LCX_9005 13 -#define LCX_9006 14 -#define LCX_9007 15 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -global ut_req_array_size = 15 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1003","LCX_2004", ;; -"LCX_2005","LCX_3006","LCX_3007","LCX_4000","LCX_4001","LCX_4002","LCX_4004", ;; -"LCX_8000","LCX_9000","LCX_9001","LCX_9002","LCX_9005","LCX_9006","LCX_9007"] - - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL rawcmd -LOCAL stream1 -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL ADT1entries = 12 -LOCAL AP1Results = 6 -LOCAL ADT2entries = 9 -LOCAL AP2Results = 5 -LOCAL ADT2aentries = 12 -LOCAL AP2aResults = 6 -LOCAL ADT3entries = 10 -LOCAL AP3Results = 5 -LOCAL WDT1entries = 30 -LOCAL WDT2entries = 28 -LOCAL WDT2aentries = 31 -LOCAL WDT3entries = 20 -LOCAL State -Local cmdctr, errctr -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local ADTTblName = LCAppName & ".LC_ADT" -local WRTTblName = LCAppName & ".LC_WRT" -local WDTTblName = LCAppName & ".LC_WDT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" -write "; to the spacecraft default file location for the LC application. " -write ";********************************************************************" -s $SC_$CPU_lcx_wdt1 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt1 - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, "$CPU", "P") - -;; Display the pages used by this test -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT -page $SC_$CPU_LC_ADT -page $SC_$CPU_LC_WDT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" -write "; generated and the apropriate items are initialized. " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the SC HK packet ID based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;; first check the 12 APs that are being used -;; 255 is because they are disabled and not measured - for apindex = 1 to AP1Results do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo -;; then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = AP1Results+1 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC =", $SC_$CPU_LC_CMDPC - write " CMDEC =", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT =", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT =", $SC_$CPU_LC_RTSCNT - if (wpindex < WPACKED) then - write " WP Packed Results =", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed Results =", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_9000, "F" -endif - -;check initialization of WRT -;; CPU1 is the default -local wpAPID = "0FB9" - -if ("$CPU" = "CPU2") then - wpAPID = "0FD7" -elseif ("$CPU" = "CPU3") then - wpAPID = "0FF7" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001;9005;9007) - Watchpoint Results Table NOT initialized at startup." - write " Index of failure =", index - write " WatchResults =", $SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count =", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count =", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True =", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count =", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value =", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value =", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" - ut_setrequirements LCX_9005, "F" - ut_setrequirements LCX_9007, "F" -else - write "<*> Passed (9001;9005;9007) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" - ut_setrequirements LCX_9005, "P" - ut_setrequirements LCX_9007, "P" -endif - -;check initialization of ART -;; CPU1 is the default -local apAPID = "0FB8" - -if ("$CPU" = "CPU2") then - apAPID = "0FD6" -elseif ("$CPU" = "CPU3") then - apAPID = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT1entries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002;9006) - Actionpoint Results Table NOT initialized at startup." - write " Index of failure =", index - write " Action Results =", $SC_$CPU_LC_ART[index].ActionResult - write " Current State =", $SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" - ut_setrequirements LCX_9006, "F" -else - write "<*> Passed (9002;9006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" - ut_setrequirements LCX_9006, "P" -endif - -write ";*********************************************************************" -write "; Step 1.6: Enable DEBUG Event Messages " -write ";*********************************************************************" -cmdctr = $SC_$CPU_EVS_CMDPC + 2 - -;; Enable DEBUG events for the LC and CFE_SB application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG -wait 2 -/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 2.0: Table update while LC is Active Test" -write ";*********************************************************************" -write "; Step 2.1: Send command to set the LC application state to Active as" -write "; well as the command to set all the defined APs to Active." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else -write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2: Send the commands to update the WDT with a new table." -write ";*********************************************************************" -;; Create the load file -s $SC_$CPU_lcx_wdt2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to load the table -s load_table("lc_def_wdt2.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load command for WDT sent successfully." -else - write " Failed - Load command for WDT did not execute successfully." -endif - -;; Send the commands to validate each table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to validate the WDT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Validate command for WDT sent successfully." -else - write " Failed - Validate command for WDT did not execute successfully." -endif - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (2005) - WDT Validation successful message rcv'd" - ut_setrequirements LCX_2005, "P" - else - write " Failed (2005) - Did not rcv WDT Validation successful message" - ut_setrequirements LCX_2005, "F" - endif -else - write " Failed (2005) - WDT Failed Validation" - ut_setrequirements LCX_2005, "F" -endif - -;; Send the command to activate the table -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Activate command for WDT sent successfully." -else - write " Failed - Activate command for WDT did not execute successfully." -endif - -;; Wait for the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the Table Update Success message" -else - write "<*> Failed - Did not rcv the Table Update Success message for the WDT table" -endif - -;; Check for the correct number of SB Subscription messages -ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 20 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." -else - write " Failed - Expected 20 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages -endif - -if ($sc_$cpu_find_event[2].num_found_messages > 1) then - write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." -else - write " Failed - Did not get any Subscription Rcvd messages from SB." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.3: Check the housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then - write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." - write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE - write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS - ut_setrequirements LCX_8000, "F" -else - write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." - ut_setrequirements LCX_8000, "P" -endif - -write ";*********************************************************************" -write "; Step 2.4: Dump the WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2004) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 2.5: Send the commands to update the ADT with a new table." -write ";*********************************************************************" -;; Create the load file -s $SC_$CPU_lcx_adt2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to load the ADT table -s load_table("lc_def_adt2.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load command for ADT sent successfully." -else - write " Failed - Load command for ADT did not execute successfully." -endif - -;; Send the command to validate the ADT table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 2 - -;; Send the command to validate the ADT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (3007) - ADT Validation successful message rcv'd" - ut_setrequirements LCX_3007, "P" - else - write " Failed (3007) - Did not rcv ADT Validation successful message" - ut_setrequirements LCX_3007, "F" - endif -else - write " Failed (3007) - ADT Failed Validation" - ut_setrequirements LCX_3007, "F" -endif - -;; Send the commands to activate the table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_UPDATE_SUCCESS_INF_EID, "INFO", 1 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName - -;; Wait until you receive the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd Table Update Success messages" -else - write "<*> Failed - Did not rcv Table Update Success message for the ADT table" -endif - -wait 5 - -cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.6: Check the housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 9) then - write " Failed (8000) - Housekeeping telemetry NOT as expected after ADT Table Update." - write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE - write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS - ut_setrequirements LCX_8000, "F" -else - write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." - ut_setrequirements LCX_8000, "P" -endif - -;; Check the Actionpoint Packed Results - Not Measured & Active -local resultStatus = TRUE -for apindex = 1 to AP2Results do - if (apindex <> 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then - resultStatus = FALSE - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x37) then - resultStatus = FALSE - break - endif - endif -enddo - -if (resultStatus = TRUE) then - write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." -else - write " Failed (8000) - AP Packed Results are NOT correct." - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) -endif - -write ";*********************************************************************" -write "; Step 2.7: Dump the ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2entries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 2.8: Update both tables at the same time" -write ";*********************************************************************" -;; Create the load files -s $SC_$CPU_lcx_wdt2a -s $SC_$CPU_lcx_adt2a - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -;; Send the command to load the table -s load_table("lc_def_wdt2a.tbl","$CPU") -s load_table("lc_def_adt2a.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load commands for WDT and ADT sent successfully." -else - write " Failed - Load commands for WDT and ADT did not execute successfully." -endif - -;; Send the commands to validate each table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -;; Send the command to validate the WDT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Validate commands for WDT and ADT sent successfully." -else - write " Failed - Validate commands for WDT and ADT did not execute successfully." -endif - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (2005) - WDT Validation message rcv'd" - ut_setrequirements LCX_2005, "P" - else - write " Failed (2005) - Did not rcv WDT and ADT Validation success messages" - ut_setrequirements LCX_2005, "F" - endif - if ($sc_$cpu_find_event[3].num_found_messages = 1) then - write "<*> Passed (3007) - ADT Validation message rcv'd" - ut_setrequirements LCX_3007, "P" - else - write " Failed (3007) - Did not rcv ADT Validation message" - ut_setrequirements LCX_3007, "F" - endif -else - write " Failed (2005;3007) - WDT and/or ADT Failed Validation" - ut_setrequirements LCX_2005, "F" - ut_setrequirements LCX_3007, "F" -endif - -;; Send the command to activate the table -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Activate commands for WDT and ADT sent successfully." -else - write " Failed - Activate commands for WDT and ADT did not execute successfully." -endif - -;; Wait for the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the Table Update Success messages for both tables" -else - write "<*> Failed - Did not rcv the Table Update Success message for both tables" -endif - -;; Check for the correct number of SB Subscription messages -ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." -else - write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages -endif - -if ($sc_$cpu_find_event[2].num_found_messages > 1) then - write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." -else - write " Failed - Did not get any Subscription Rcvd messages from SB." -endif - -wait 5 - -cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.9: Check the housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_WPSINUSE <> 31) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then - write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." - write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE - write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS - ut_setrequirements LCX_8000, "F" -else - write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." - ut_setrequirements LCX_8000, "P" -endif - -;; Check the Actionpoint Packed Results - Not Measured & Active -resultStatus = TRUE -for apindex = 1 to AP2aResults do - if (apindex < 7) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then - resultStatus = FALSE - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - resultStatus = FALSE - break - endif - endif -enddo - -if (resultStatus = TRUE) then - write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." -else - write " Failed (8000) - AP Packed Results are NOT correct." - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) -endif - -write ";*********************************************************************" -write "; Step 2.10: Dump the WRT and ADT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2004) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_2004, "P" -endif - -;; Dump the ART and check counters" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2aentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 3.0: Test Table updates with LC appplication state Passive " -write ";*********************************************************************" -write "; Step 3.1: Send command to set the LC application state to Passive " -write "; as well as the command to set all the defined APs to Active." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then - write "<*> Passed (1003;4001) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else -write " Failed (1003;4001) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else - write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.2: Send the commands to update the WDT with a new table." -write ";*********************************************************************" -;; Create the load file -s $SC_$CPU_lcx_wdt2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to load the table -s load_table("lc_def_wdt2.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load command for WDT sent successfully." -else - write " Failed - Load command for WDT did not execute successfully." -endif - -;; Send the commands to validate each table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to validate the WDT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Validate command for WDT sent successfully." -else - write " Failed - Validate command for WDT did not execute successfully." -endif - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1, 40 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (2005) - WDT Validation message rcv'd" - ut_setrequirements LCX_2005, "P" - else - write " Failed (2005) - Did not rcv WDT Validation message" - ut_setrequirements LCX_2005, "F" - endif -else - write " Failed (2005) - WDT Failed Validation" - ut_setrequirements LCX_2005, "F" -endif - -;; Send the command to activate the table -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Activate command for WDT sent successfully." -else - write " Failed - Activate command for WDT did not execute successfully." -endif - -;; Wait for the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the Table Update Success message" -else - write "<*> Failed - Did not rcv the Table Update Success message for the WDT table" -endif - -;; Check for the correct number of SB Subscription messages -ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." -else - write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages -endif - -if ($sc_$cpu_find_event[2].num_found_messages > 1) then - write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." -else - write " Failed - Did not get any Subscription Rcvd messages from SB." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.3: Check the housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then - write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." - write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE - write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS - ut_setrequirements LCX_8000, "F" -else - write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." - ut_setrequirements LCX_8000, "P" -endif - -write ";*********************************************************************" -write "; Step 3.4: Dump the WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2004) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 3.5: Send the commands to update the ADT with a new table." -write ";*********************************************************************" -;; Create the load file -s $SC_$CPU_lcx_adt2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to load the ADT table -s load_table("lc_def_adt2.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load command for ADT sent successfully." -else - write " Failed - Load command for ADT did not execute successfully." -endif - -;; Send the command to validate the ADT table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 2 - -;; Send the command to validate the ADT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (3007) - ADT Validation successful message rcv'd" - ut_setrequirements LCX_3007, "P" - else - write " Failed (3007) - Did not rcv ADT Validation successful message" - ut_setrequirements LCX_3007, "F" - endif -else - write " Failed (3007) - ADT Failed Validation" - ut_setrequirements LCX_3007, "F" -endif - -;; Send the commands to activate the table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_UPDATE_SUCCESS_INF_EID, "INFO", 1 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName - -;; Wait until you receive the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd Table Update Success messages" -else - write "<*> Failed - Did not rcv Table Update Success message for the ADT table" -endif - -wait 5 - -cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.6: Check the housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 9) then - write " Failed (8000) - Housekeeping telemetry NOT as expected after ADT Table Update." - write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE - write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS - ut_setrequirements LCX_8000, "F" -else - write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." - ut_setrequirements LCX_8000, "P" -endif - -;; Check the Actionpoint Packed Results - Not Measured & Active -resultStatus = TRUE -for apindex = 1 to AP2Results do - if (apindex <> 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then - resultStatus = FALSE - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x37) then - resultStatus = FALSE - break - endif - endif -enddo - -if (resultStatus = TRUE) then - write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." -else - write " Failed (8000) - AP Packed Results are NOT correct." - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) -endif - -write ";*********************************************************************" -write "; Step 3.7: Dump the ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2entries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 3.8: Update both tables at the same time" -write ";*********************************************************************" -;; Create the load files -s $SC_$CPU_lcx_wdt2a -s $SC_$CPU_lcx_adt2a - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -;; Send the command to load the table -s load_table("lc_def_wdt2a.tbl","$CPU") -s load_table("lc_def_adt2a.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load commands for WDT and ADT sent successfully." -else - write " Failed - Load commands for WDT and ADT did not execute successfully." -endif - -;; Send the commands to validate each table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -;; Send the command to validate the WDT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Validate commands for WDT and ADT sent successfully." -else - write " Failed - Validate commands for WDT and ADT did not execute successfully." -endif - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (2005) - WDT Validation message rcv'd" - ut_setrequirements LCX_2005, "P" - else - write " Failed (2005) - Did not rcv WDT and ADT Validation success messages" - ut_setrequirements LCX_2005, "F" - endif - if ($sc_$cpu_find_event[3].num_found_messages = 1) then - write "<*> Passed (3007) - ADT Validation message rcv'd" - ut_setrequirements LCX_3007, "P" - else - write " Failed (3007) - Did not rcv ADT Validation message" - ut_setrequirements LCX_3007, "F" - endif -else - write " Failed (2005;3007) - WDT and/or ADT Failed Validation" - ut_setrequirements LCX_2005, "F" - ut_setrequirements LCX_3007, "F" -endif - -;; Send the command to activate the table -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Activate commands for WDT and ADT sent successfully." -else - write " Failed - Activate commands for WDT and ADT did not execute successfully." -endif - -;; Wait for the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the Table Update Success messages for both tables" -else - write "<*> Failed - Did not rcv the Table Update Success message for both tables" -endif - -;; Check for the correct number of SB Subscription messages -ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." -else - write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages -endif - -if ($sc_$cpu_find_event[2].num_found_messages > 1) then - write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." -else - write " Failed - Did not get any Subscription Rcvd messages from SB." -endif - -wait 5 - -cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.9: Check the housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_WPSINUSE <> 31) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then - write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." - write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE - write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS - ut_setrequirements LCX_8000, "F" -else - write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." - ut_setrequirements LCX_8000, "P" -endif - -;; Check the Actionpoint Packed Results - Not Measured & Active -resultStatus = TRUE -for apindex = 1 to AP2aResults do - if (apindex < 7) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then - resultStatus = FALSE - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - resultStatus = FALSE - break - endif - endif -enddo - -if (resultStatus = TRUE) then - write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." -else - write " Failed (8000) - AP Packed Results are NOT correct." - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) -endif - -write ";*********************************************************************" -write "; Step 3.10: Dump the WRT and ADT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2004) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_2004, "P" -endif - -;; Dump the ART and check counters" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2aentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 4.0: Test Table updates with LC appplication state Disabled " -write ";*********************************************************************" -write "; Step 4.1: Send command to set the LC application state to Disabled" -write "; as well as the command to set all the defined APs to Active." -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=State) then - write "<*> Passed (1003;4002) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - -cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.2: Send the commands to update the WDT with a new table." -write ";*********************************************************************" -;; Create the load file -s $SC_$CPU_lcx_wdt2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to load the table -s load_table("lc_def_wdt2.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load command for WDT sent successfully." -else - write " Failed - Load command for WDT did not execute successfully." -endif - -;; Send the commands to validate each table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to validate the WDT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Validate command for WDT sent successfully." -else - write " Failed - Validate command for WDT did not execute successfully." -endif - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (2005) - WDT Validation successful message rcv'd" - ut_setrequirements LCX_2005, "P" - else - write " Failed (2005) - Did not rcv WDT Validation successful message" - ut_setrequirements LCX_2005, "F" - endif -else - write " Failed (2005) - WDT Failed Validation" - ut_setrequirements LCX_2005, "F" -endif - -;; Send the command to activate the table -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Activate command for WDT sent successfully." -else - write " Failed - Activate command for WDT did not execute successfully." -endif - -;; Wait for the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the Table Update Success message" -else - write "<*> Failed - Did not rcv the Table Update Success message for the WDT table" -endif - -;; Check for the correct number of SB Subscription messages -ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." -else - write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages -endif - -if ($sc_$cpu_find_event[2].num_found_messages > 1) then - write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." -else - write " Failed - Did not get any Subscription Rcvd messages from SB." -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.3: Check the housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then - write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." - write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE - write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS - ut_setrequirements LCX_8000, "F" -else - write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." - ut_setrequirements LCX_8000, "P" -endif - -write ";*********************************************************************" -write "; Step 4.4: Dump the WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2004) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 4.5: Send the commands to update the ADT with a new table." -write ";*********************************************************************" -;; Create the load file -s $SC_$CPU_lcx_adt2 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to load the ADT table -s load_table("lc_def_adt2.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load command for ADT sent successfully." -else - write " Failed - Load command for ADT did not execute successfully." -endif - -;; Send the command to validate the ADT table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 2 - -;; Send the command to validate the ADT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (3007) - ADT Validation successful message rcv'd" - ut_setrequirements LCX_3007, "P" - else - write " Failed (3007) - Did not rcv ADT Validation successful message" - ut_setrequirements LCX_3007, "F" - endif -else - write " Failed (3007) - ADT Failed Validation" - ut_setrequirements LCX_3007, "F" -endif - -;; Send the commands to activate the table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_UPDATE_SUCCESS_INF_EID, "INFO", 1 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName - -;; Wait until you receive the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd Table Update Success messages" -else - write "<*> Failed - Did not rcv Table Update Success message for the ADT table" -endif - -wait 5 - -cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.6: Check the housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 9) then - write " Failed (8000) - Housekeeping telemetry NOT as expected after ADT Table Update." - write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE - write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS - ut_setrequirements LCX_8000, "F" -else - write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." - ut_setrequirements LCX_8000, "P" -endif - -;; Check the Actionpoint Packed Results - Not Measured & Active -local resultStatus = TRUE -for apindex = 1 to AP2Results do - if (apindex <> 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then - resultStatus = FALSE - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x37) then - resultStatus = FALSE - break - endif - endif -enddo - -if (resultStatus = TRUE) then - write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." -else - write " Failed (8000) - AP Packed Results are NOT correct." - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) -endif - -write ";*********************************************************************" -write "; Step 4.7: Dump the ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2entries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 4.8: Update both tables at the same time" -write ";*********************************************************************" -;; Create the load files -s $SC_$CPU_lcx_wdt2a -s $SC_$CPU_lcx_adt2a - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -;; Send the command to load the table -s load_table("lc_def_wdt2a.tbl","$CPU") -s load_table("lc_def_adt2a.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load commands for WDT and ADT sent successfully." -else - write " Failed - Load commands for WDT and ADT did not execute successfully." -endif - -;; Send the commands to validate each table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -;; Send the command to validate the WDT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Validate commands for WDT and ADT sent successfully." -else - write " Failed - Validate commands for WDT and ADT did not execute successfully." -endif - -;; Wait for the CFE Validation Success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 -if (UT_TW_Status = UT_Success) then - if ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (2005) - WDT Validation message rcv'd" - ut_setrequirements LCX_2005, "P" - else - write " Failed (2005) - Did not rcv WDT and ADT Validation success messages" - ut_setrequirements LCX_2005, "F" - endif - if ($sc_$cpu_find_event[3].num_found_messages = 1) then - write "<*> Passed (3007) - ADT Validation message rcv'd" - ut_setrequirements LCX_3007, "P" - else - write " Failed (3007) - Did not rcv ADT Validation message" - ut_setrequirements LCX_3007, "F" - endif -else - write " Failed (2005;3007) - WDT and/or ADT Failed Validation" - ut_setrequirements LCX_2005, "F" - ut_setrequirements LCX_3007, "F" -endif - -;; Send the command to activate the table -ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 -ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName -/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Activate commands for WDT and ADT sent successfully." -else - write " Failed - Activate commands for WDT and ADT did not execute successfully." -endif - -;; Wait for the success message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the Table Update Success messages for both tables" -else - write "<*> Failed - Did not rcv the Table Update Success message for both tables" -endif - -;; Check for the correct number of SB Subscription messages -ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." -else - write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages -endif - -if ($sc_$cpu_find_event[2].num_found_messages > 1) then - write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." -else - write " Failed - Did not get any Subscription Rcvd messages from SB." -endif - -wait 5 - -cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LC_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 4.9: Check the housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_WPSINUSE <> 31) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then - write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." - write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE - write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS - ut_setrequirements LCX_8000, "F" -else - write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." - ut_setrequirements LCX_8000, "P" -endif - -;; Check the Actionpoint Packed Results - Not Measured & Active -resultStatus = TRUE -for apindex = 1 to AP2aResults do - if (apindex < 7) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then - resultStatus = FALSE - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - resultStatus = FALSE - break - endif - endif -enddo - -if (resultStatus = TRUE) then - write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." -else - write " Failed (8000) - AP Packed Results are NOT correct." - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) -endif - -write ";*********************************************************************" -write "; Step 4.10: Dump the WRT and ADT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wpAPID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." - write " Index of failure = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) - write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2004) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_2004, "P" -endif - -;; Dump the ART and check counters" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", apAPID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADT2aentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." - write " Index of failure =", index - write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3006) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 5.0: Table Validation Error Test" -write ";*********************************************************************" -write "; Step 5.1: Create the table load files that contain validation errors" -write "; for the WDT and ADT tables." -write ";*********************************************************************" -;; Create the load files -s $SC_$CPU_lcx_wdt3 -s $SC_$CPU_lcx_adt3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 2 - -;; Send the command to load the table -s load_table("lc_def_wdt3.tbl","$CPU") -s load_table("lc_def_adt3.tbl","$CPU") - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Load commands for WDT and ADT sent successfully." -else - write " Failed - Load command for WDT and ADT did not execute successfully." -endif - -;; Send the command to validate the WDT table -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_ERR_EID, "ERROR", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_ERR_EID, "ERROR", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to validate the WDT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Validate command for WDT sent successfully." -else - write " Failed - Validate command for WDT did not execute successfully." -endif - -;; Wait for the Table Validation message -ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - WDT Validation failed as expected." - if ($sc_$cpu_find_event[2].num_found_messages = 1) AND ;; - ($sc_$cpu_find_event[3].num_found_messages = 1) then - write "<*> Passed (2005) - WDT Validation status and error messages rcv'd" - ut_setrequirements LCX_2005, "P" - else - write " Failed (2005) - Did not rcv the expected WDT Validation messages" - ut_setrequirements LCX_2005, "F" - endif -else - write " Failed (2005) - WDT passed Validation when failure was expected." - ut_setrequirements LCX_2005, "F" -endif - -;; Send the command to validate the ADT table -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_ERR_EID, "ERROR", 2 -ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_ERR_EID, "ERROR", 3 - -cmdctr = $SC_$CPU_TBL_CMDPC + 1 - -;; Send the command to validate the WDT -/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName - -ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Validate command for ADT sent successfully." -else - write " Failed - Validate command for ADT did not execute successfully." -endif - -;; Wait for the Table Validation message -ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 1 -if (UT_TW_Status = UT_Success) then - write "<*> Passed - ADT Validation failed as expected." - if ($sc_$cpu_find_event[1].num_found_messages = 1) AND ;; - ($sc_$cpu_find_event[2].num_found_messages = 1) then - write "<*> Passed (3007) - ADT Validation status and error messages rcv'd" - ut_setrequirements LCX_3007, "P" - else - write " Failed (3007) - Did not rcv the expected ADT Validation messages" - ut_setrequirements LCX_3007, "F" - endif -else - write " Failed (3007) - ADT passed Validation when failure was expected." - ut_setrequirements LCX_3007, "F" -endif - -write ";*********************************************************************" -write "; Step 6.0: Clean-up" -write ";*********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_tabletesting " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_tabletesting +;***************************************************************************** +; Test Name: lc_tabletesting +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) +; functions properly when loading new Watchpoint Definition Tables (WDT) +; and Actionpoint Definition Tables (ADT). The tables will be updated +; while the LC application is in the Active, Passive, and Disabled state. +; Also, the tables will be updated individually as well as simultaneously +; to ensure that the LC application behaves appropriately. Other tests +; include attempts to load invalid tables which should fail validation. +; +; Requirements Tested +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message +; LC2004 For each Watchpoint, the flight software shall maintain the +; following statistics in the dump-only Watchpoint Results Table: +; a) The result of the last relational comparison (False, True, +; Error or Stale) +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) Most recent FALSE to TRUE transition value +; g) Most recent FALSE to TRUE transition timestamp +; h) Most recent TRUE to FALSE transition value +; i) Most recent TRUE to FALSE transition timestamp +; LC2005 Upon receipt of a table update indication, LC shall validate +; the Watchpoint Definition Table for the following: +; a) Valid operator +; b) Data size +; c) Message ID +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample(Pass,Fail,Error,Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result = +; Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC3007 Upon receipt of a table update indication, LC shall validate +; the Actionpoint Definition Table for the following: +; a) valid default state +; b) RTS number (in range) +; c) Event Type (DEBUG,INFO,ERROR,CRITICAL) +; d) Failure Count (in range) +; e) Action Equation syntax +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC4001 Upon receipt of a Set LC Application State to Passive Command, +; LC shall set the LC Application State to Passive +; LC4002 Upon receipt of a Set LC Application State to Disable Command, +; LC shall set the LC Application State to Disabled +; LC4004 Upon receipt of a Set All Actionpoints to Active Command, LC +; shall set the state for all Actionpoints to ACTIVE such that the +; actionpoints are evaluated and the table-defined actions are +; taken based on the evaluation +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; telemetry) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded +; a True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result = +; Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC9005 Upon any initialization, LC shall validate the Watchpoint +; Definition Table for the following: +; a) valid operator +; b) data size +; c) Message ID +; LC9006 Upon any initialization, LC shall validate the Actionpoint +; Definition Table for the following: +; a) valid default state +; b) RTS number (in range) +; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) +; d) Failure Count (in range) +; e) Action Equation syntax +; LC9007 Upon any initialization, LC shall subscribe to the messages +; defined in the WDT. +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 10/01/12 Walt Moleski Initial procedure for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files for +; testing +; lc_adt1 Sets up the Actionpoint Definition table files for +; testing +; +; Expected Test Results and Analysis +; +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "cfe_sb_events.h" +#include "cfe_tbl_events.h" +#include "to_lab_events.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_1003 0 +#define LC_2004 1 +#define LC_2005 2 +#define LC_3006 3 +#define LC_3007 4 +#define LC_4000 5 +#define LC_4001 6 +#define LC_4002 7 +#define LC_4004 8 +#define LC_8000 9 +#define LC_9000 10 +#define LC_9001 11 +#define LC_9002 12 +#define LC_9005 13 +#define LC_9006 14 +#define LC_9007 15 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +global ut_req_array_size = 15 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1003","LC_2004", ;; +"LC_2005","LC_3006","LC_3007","LC_4000","LC_4001","LC_4002","LC_4004", ;; +"LC_8000","LC_9000","LC_9001","LC_9002","LC_9005","LC_9006","LC_9007"] + + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL rawcmd +LOCAL stream1 +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL ADT1entries = 12 +LOCAL AP1Results = 6 +LOCAL ADT2entries = 9 +LOCAL AP2Results = 5 +LOCAL ADT2aentries = 12 +LOCAL AP2aResults = 6 +LOCAL ADT3entries = 10 +LOCAL AP3Results = 5 +LOCAL WDT1entries = 30 +LOCAL WDT2entries = 28 +LOCAL WDT2aentries = 31 +LOCAL WDT3entries = 20 +LOCAL State +Local cmdctr, errctr +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local ADTTblName = LCAppName & ".LC_ADT" +local WRTTblName = LCAppName & ".LC_WRT" +local WDTTblName = LCAppName & ".LC_WDT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Creating the WDT and ADT used for testing and upload them" +write "; to the spacecraft default file location for the LC application. " +write ";********************************************************************" +s $SC_$CPU_lc_wdt1 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt1 + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, hostCPU, "P") + +;; Display the pages used by this test +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT +page $SC_$CPU_LC_ADT +page $SC_$CPU_LC_WDT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry packet is being" +write "; generated and the apropriate items are initialized. " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the SC HK packet ID based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;; first check the 12 APs that are being used +;; 255 is because they are disabled and not measured + for apindex = 1 to AP1Results do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo +;; then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = AP1Results+1 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC =", $SC_$CPU_LC_CMDPC + write " CMDEC =", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT =", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT =", $SC_$CPU_LC_RTSCNT + if (wpindex < WPACKED) then + write " WP Packed Results =", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed Results =", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_9000, "F" +endif + +;check initialization of WRT +;; CPU1 is the default +local wpAPID = "0FB9" + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001;9005;9007) - Watchpoint Results Table NOT initialized at startup." + write " Index of failure =", index + write " WatchResults =", $SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count =", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count =", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True =", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count =", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value =", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value =", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" + ut_setrequirements LC_9005, "F" + ut_setrequirements LC_9007, "F" +else + write "<*> Passed (9001;9005;9007) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" + ut_setrequirements LC_9005, "P" + ut_setrequirements LC_9007, "P" +endif + +;check initialization of ART +;; CPU1 is the default +local apAPID = "0FB8" + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT1entries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002;9006) - Actionpoint Results Table NOT initialized at startup." + write " Index of failure =", index + write " Action Results =", $SC_$CPU_LC_ART[index].ActionResult + write " Current State =", $SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" + ut_setrequirements LC_9006, "F" +else + write "<*> Passed (9002;9006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" + ut_setrequirements LC_9006, "P" +endif + +write ";*********************************************************************" +write "; Step 1.6: Enable DEBUG Event Messages " +write ";*********************************************************************" +cmdctr = $SC_$CPU_EVS_CMDPC + 2 + +;; Enable DEBUG events for the LC and CFE_SB application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG +wait 2 +/$SC_$CPU_EVS_EnaAppEVTType Application="CFE_SB" DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdCtr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 2.0: Table update while LC is Active Test" +write ";*********************************************************************" +write "; Step 2.1: Send command to set the LC application state to Active as" +write "; well as the command to set all the defined APs to Active." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else +write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2: Send the commands to update the WDT with a new table." +write ";*********************************************************************" +;; Create the load file +s $SC_$CPU_lc_wdt2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to load the table +s load_table("lc_def_wdt2.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load command for WDT sent successfully." +else + write " Failed - Load command for WDT did not execute successfully." +endif + +;; Send the commands to validate each table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to validate the WDT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Validate command for WDT sent successfully." +else + write " Failed - Validate command for WDT did not execute successfully." +endif + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (2005) - WDT Validation successful message rcv'd" + ut_setrequirements LC_2005, "P" + else + write " Failed (2005) - Did not rcv WDT Validation successful message" + ut_setrequirements LC_2005, "F" + endif +else + write " Failed (2005) - WDT Failed Validation" + ut_setrequirements LC_2005, "F" +endif + +;; Send the command to activate the table +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Activate command for WDT sent successfully." +else + write " Failed - Activate command for WDT did not execute successfully." +endif + +;; Wait for the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the Table Update Success message" +else + write "<*> Failed - Did not rcv the Table Update Success message for the WDT table" +endif + +;; Check for the correct number of SB Subscription messages +ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 20 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." +else + write " Failed - Expected 20 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages +endif + +if ($sc_$cpu_find_event[2].num_found_messages > 1) then + write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." +else + write " Failed - Did not get any Subscription Rcvd messages from SB." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.3: Check the housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then + write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." + write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE + write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS + ut_setrequirements LC_8000, "F" +else + write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." + ut_setrequirements LC_8000, "P" +endif + +write ";*********************************************************************" +write "; Step 2.4: Dump the WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2004) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 2.5: Send the commands to update the ADT with a new table." +write ";*********************************************************************" +;; Create the load file +s $SC_$CPU_lc_adt2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to load the ADT table +s load_table("lc_def_adt2.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load command for ADT sent successfully." +else + write " Failed - Load command for ADT did not execute successfully." +endif + +;; Send the command to validate the ADT table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 2 + +;; Send the command to validate the ADT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (3007) - ADT Validation successful message rcv'd" + ut_setrequirements LC_3007, "P" + else + write " Failed (3007) - Did not rcv ADT Validation successful message" + ut_setrequirements LC_3007, "F" + endif +else + write " Failed (3007) - ADT Failed Validation" + ut_setrequirements LC_3007, "F" +endif + +;; Send the commands to activate the table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_UPDATE_SUCCESS_INF_EID, "INFO", 1 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName + +;; Wait until you receive the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd Table Update Success messages" +else + write "<*> Failed - Did not rcv Table Update Success message for the ADT table" +endif + +wait 5 + +cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.6: Check the housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 9) then + write " Failed (8000) - Housekeeping telemetry NOT as expected after ADT Table Update." + write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE + write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS + ut_setrequirements LC_8000, "F" +else + write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." + ut_setrequirements LC_8000, "P" +endif + +;; Check the Actionpoint Packed Results - Not Measured & Active +local resultStatus = TRUE +for apindex = 1 to AP2Results do + if (apindex <> 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then + resultStatus = FALSE + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x37) then + resultStatus = FALSE + break + endif + endif +enddo + +if (resultStatus = TRUE) then + write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." +else + write " Failed (8000) - AP Packed Results are NOT correct." + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) +endif + +write ";*********************************************************************" +write "; Step 2.7: Dump the ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2entries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 2.8: Update both tables at the same time" +write ";*********************************************************************" +;; Create the load files +s $SC_$CPU_lc_wdt2a +s $SC_$CPU_lc_adt2a + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +;; Send the command to load the table +s load_table("lc_def_wdt2a.tbl",hostCPU) +s load_table("lc_def_adt2a.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load commands for WDT and ADT sent successfully." +else + write " Failed - Load commands for WDT and ADT did not execute successfully." +endif + +;; Send the commands to validate each table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +;; Send the command to validate the WDT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Validate commands for WDT and ADT sent successfully." +else + write " Failed - Validate commands for WDT and ADT did not execute successfully." +endif + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (2005) - WDT Validation message rcv'd" + ut_setrequirements LC_2005, "P" + else + write " Failed (2005) - Did not rcv WDT and ADT Validation success messages" + ut_setrequirements LC_2005, "F" + endif + if ($sc_$cpu_find_event[3].num_found_messages = 1) then + write "<*> Passed (3007) - ADT Validation message rcv'd" + ut_setrequirements LC_3007, "P" + else + write " Failed (3007) - Did not rcv ADT Validation message" + ut_setrequirements LC_3007, "F" + endif +else + write " Failed (2005;3007) - WDT and/or ADT Failed Validation" + ut_setrequirements LC_2005, "F" + ut_setrequirements LC_3007, "F" +endif + +;; Send the command to activate the table +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Activate commands for WDT and ADT sent successfully." +else + write " Failed - Activate commands for WDT and ADT did not execute successfully." +endif + +;; Wait for the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the Table Update Success messages for both tables" +else + write "<*> Failed - Did not rcv the Table Update Success message for both tables" +endif + +;; Check for the correct number of SB Subscription messages +ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." +else + write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages +endif + +if ($sc_$cpu_find_event[2].num_found_messages > 1) then + write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." +else + write " Failed - Did not get any Subscription Rcvd messages from SB." +endif + +wait 5 + +cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.9: Check the housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_WPSINUSE <> 31) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then + write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." + write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE + write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS + ut_setrequirements LC_8000, "F" +else + write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." + ut_setrequirements LC_8000, "P" +endif + +;; Check the Actionpoint Packed Results - Not Measured & Active +resultStatus = TRUE +for apindex = 1 to AP2aResults do + if (apindex < 7) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then + resultStatus = FALSE + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + resultStatus = FALSE + break + endif + endif +enddo + +if (resultStatus = TRUE) then + write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." +else + write " Failed (8000) - AP Packed Results are NOT correct." + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) +endif + +write ";*********************************************************************" +write "; Step 2.10: Dump the WRT and ADT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2004) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_2004, "P" +endif + +;; Dump the ART and check counters" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2aentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 3.0: Test Table updates with LC appplication state Passive " +write ";*********************************************************************" +write "; Step 3.1: Send command to set the LC application state to Passive " +write "; as well as the command to set all the defined APs to Active." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) then + write "<*> Passed (1003;4001) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else +write " Failed (1003;4001) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else + write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.2: Send the commands to update the WDT with a new table." +write ";*********************************************************************" +;; Create the load file +s $SC_$CPU_lc_wdt2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to load the table +s load_table("lc_def_wdt2.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load command for WDT sent successfully." +else + write " Failed - Load command for WDT did not execute successfully." +endif + +;; Send the commands to validate each table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to validate the WDT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Validate command for WDT sent successfully." +else + write " Failed - Validate command for WDT did not execute successfully." +endif + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1, 40 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (2005) - WDT Validation message rcv'd" + ut_setrequirements LC_2005, "P" + else + write " Failed (2005) - Did not rcv WDT Validation message" + ut_setrequirements LC_2005, "F" + endif +else + write " Failed (2005) - WDT Failed Validation" + ut_setrequirements LC_2005, "F" +endif + +;; Send the command to activate the table +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Activate command for WDT sent successfully." +else + write " Failed - Activate command for WDT did not execute successfully." +endif + +;; Wait for the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the Table Update Success message" +else + write "<*> Failed - Did not rcv the Table Update Success message for the WDT table" +endif + +;; Check for the correct number of SB Subscription messages +ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." +else + write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages +endif + +if ($sc_$cpu_find_event[2].num_found_messages > 1) then + write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." +else + write " Failed - Did not get any Subscription Rcvd messages from SB." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.3: Check the housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then + write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." + write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE + write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS + ut_setrequirements LC_8000, "F" +else + write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." + ut_setrequirements LC_8000, "P" +endif + +write ";*********************************************************************" +write "; Step 3.4: Dump the WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2004) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 3.5: Send the commands to update the ADT with a new table." +write ";*********************************************************************" +;; Create the load file +s $SC_$CPU_lc_adt2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to load the ADT table +s load_table("lc_def_adt2.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load command for ADT sent successfully." +else + write " Failed - Load command for ADT did not execute successfully." +endif + +;; Send the command to validate the ADT table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 2 + +;; Send the command to validate the ADT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (3007) - ADT Validation successful message rcv'd" + ut_setrequirements LC_3007, "P" + else + write " Failed (3007) - Did not rcv ADT Validation successful message" + ut_setrequirements LC_3007, "F" + endif +else + write " Failed (3007) - ADT Failed Validation" + ut_setrequirements LC_3007, "F" +endif + +;; Send the commands to activate the table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_UPDATE_SUCCESS_INF_EID, "INFO", 1 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName + +;; Wait until you receive the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd Table Update Success messages" +else + write "<*> Failed - Did not rcv Table Update Success message for the ADT table" +endif + +wait 5 + +cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.6: Check the housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 9) then + write " Failed (8000) - Housekeeping telemetry NOT as expected after ADT Table Update." + write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE + write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS + ut_setrequirements LC_8000, "F" +else + write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." + ut_setrequirements LC_8000, "P" +endif + +;; Check the Actionpoint Packed Results - Not Measured & Active +resultStatus = TRUE +for apindex = 1 to AP2Results do + if (apindex <> 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then + resultStatus = FALSE + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x37) then + resultStatus = FALSE + break + endif + endif +enddo + +if (resultStatus = TRUE) then + write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." +else + write " Failed (8000) - AP Packed Results are NOT correct." + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) +endif + +write ";*********************************************************************" +write "; Step 3.7: Dump the ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2entries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 3.8: Update both tables at the same time" +write ";*********************************************************************" +;; Create the load files +s $SC_$CPU_lc_wdt2a +s $SC_$CPU_lc_adt2a + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +;; Send the command to load the table +s load_table("lc_def_wdt2a.tbl",hostCPU) +s load_table("lc_def_adt2a.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load commands for WDT and ADT sent successfully." +else + write " Failed - Load commands for WDT and ADT did not execute successfully." +endif + +;; Send the commands to validate each table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +;; Send the command to validate the WDT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Validate commands for WDT and ADT sent successfully." +else + write " Failed - Validate commands for WDT and ADT did not execute successfully." +endif + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (2005) - WDT Validation message rcv'd" + ut_setrequirements LC_2005, "P" + else + write " Failed (2005) - Did not rcv WDT and ADT Validation success messages" + ut_setrequirements LC_2005, "F" + endif + if ($sc_$cpu_find_event[3].num_found_messages = 1) then + write "<*> Passed (3007) - ADT Validation message rcv'd" + ut_setrequirements LC_3007, "P" + else + write " Failed (3007) - Did not rcv ADT Validation message" + ut_setrequirements LC_3007, "F" + endif +else + write " Failed (2005;3007) - WDT and/or ADT Failed Validation" + ut_setrequirements LC_2005, "F" + ut_setrequirements LC_3007, "F" +endif + +;; Send the command to activate the table +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Activate commands for WDT and ADT sent successfully." +else + write " Failed - Activate commands for WDT and ADT did not execute successfully." +endif + +;; Wait for the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the Table Update Success messages for both tables" +else + write "<*> Failed - Did not rcv the Table Update Success message for both tables" +endif + +;; Check for the correct number of SB Subscription messages +ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." +else + write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages +endif + +if ($sc_$cpu_find_event[2].num_found_messages > 1) then + write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." +else + write " Failed - Did not get any Subscription Rcvd messages from SB." +endif + +wait 5 + +cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.9: Check the housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_WPSINUSE <> 31) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then + write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." + write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE + write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS + ut_setrequirements LC_8000, "F" +else + write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." + ut_setrequirements LC_8000, "P" +endif + +;; Check the Actionpoint Packed Results - Not Measured & Active +resultStatus = TRUE +for apindex = 1 to AP2aResults do + if (apindex < 7) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then + resultStatus = FALSE + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + resultStatus = FALSE + break + endif + endif +enddo + +if (resultStatus = TRUE) then + write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." +else + write " Failed (8000) - AP Packed Results are NOT correct." + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) +endif + +write ";*********************************************************************" +write "; Step 3.10: Dump the WRT and ADT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2004) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_2004, "P" +endif + +;; Dump the ART and check counters" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2aentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 4.0: Test Table updates with LC appplication state Disabled " +write ";*********************************************************************" +write "; Step 4.1: Send command to set the LC application state to Disabled" +write "; as well as the command to set all the defined APs to Active." +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=State) then + write "<*> Passed (1003;4002) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + +cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.2: Send the commands to update the WDT with a new table." +write ";*********************************************************************" +;; Create the load file +s $SC_$CPU_lc_wdt2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to load the table +s load_table("lc_def_wdt2.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load command for WDT sent successfully." +else + write " Failed - Load command for WDT did not execute successfully." +endif + +;; Send the commands to validate each table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to validate the WDT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Validate command for WDT sent successfully." +else + write " Failed - Validate command for WDT did not execute successfully." +endif + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (2005) - WDT Validation successful message rcv'd" + ut_setrequirements LC_2005, "P" + else + write " Failed (2005) - Did not rcv WDT Validation successful message" + ut_setrequirements LC_2005, "F" + endif +else + write " Failed (2005) - WDT Failed Validation" + ut_setrequirements LC_2005, "F" +endif + +;; Send the command to activate the table +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Activate command for WDT sent successfully." +else + write " Failed - Activate command for WDT did not execute successfully." +endif + +;; Wait for the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the Table Update Success message" +else + write "<*> Failed - Did not rcv the Table Update Success message for the WDT table" +endif + +;; Check for the correct number of SB Subscription messages +ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." +else + write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages +endif + +if ($sc_$cpu_find_event[2].num_found_messages > 1) then + write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." +else + write " Failed - Did not get any Subscription Rcvd messages from SB." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.3: Check the housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then + write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." + write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE + write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS + ut_setrequirements LC_8000, "F" +else + write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." + ut_setrequirements LC_8000, "P" +endif + +write ";*********************************************************************" +write "; Step 4.4: Dump the WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2004) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 4.5: Send the commands to update the ADT with a new table." +write ";*********************************************************************" +;; Create the load file +s $SC_$CPU_lc_adt2 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to load the ADT table +s load_table("lc_def_adt2.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load command for ADT sent successfully." +else + write " Failed - Load command for ADT did not execute successfully." +endif + +;; Send the command to validate the ADT table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 2 + +;; Send the command to validate the ADT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (3007) - ADT Validation successful message rcv'd" + ut_setrequirements LC_3007, "P" + else + write " Failed (3007) - Did not rcv ADT Validation successful message" + ut_setrequirements LC_3007, "F" + endif +else + write " Failed (3007) - ADT Failed Validation" + ut_setrequirements LC_3007, "F" +endif + +;; Send the commands to activate the table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_UPDATE_SUCCESS_INF_EID, "INFO", 1 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName + +;; Wait until you receive the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd Table Update Success messages" +else + write "<*> Failed - Did not rcv Table Update Success message for the ADT table" +endif + +wait 5 + +cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.6: Check the housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_WPSINUSE <> 28) AND ($SC_$CPU_LC_ACTIVEAPS <> 9) then + write " Failed (8000) - Housekeeping telemetry NOT as expected after ADT Table Update." + write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE + write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS + ut_setrequirements LC_8000, "F" +else + write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." + ut_setrequirements LC_8000, "P" +endif + +;; Check the Actionpoint Packed Results - Not Measured & Active +local resultStatus = TRUE +for apindex = 1 to AP2Results do + if (apindex <> 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then + resultStatus = FALSE + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x37) then + resultStatus = FALSE + break + endif + endif +enddo + +if (resultStatus = TRUE) then + write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." +else + write " Failed (8000) - AP Packed Results are NOT correct." + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) +endif + +write ";*********************************************************************" +write "; Step 4.7: Dump the ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2entries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 4.8: Update both tables at the same time" +write ";*********************************************************************" +;; Create the load files +s $SC_$CPU_lc_wdt2a +s $SC_$CPU_lc_adt2a + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +;; Send the command to load the table +s load_table("lc_def_wdt2a.tbl",hostCPU) +s load_table("lc_def_adt2a.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load commands for WDT and ADT sent successfully." +else + write " Failed - Load commands for WDT and ADT did not execute successfully." +endif + +;; Send the commands to validate each table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +;; Send the command to validate the WDT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Validate commands for WDT and ADT sent successfully." +else + write " Failed - Validate commands for WDT and ADT did not execute successfully." +endif + +;; Wait for the CFE Validation Success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 +if (UT_TW_Status = UT_Success) then + if ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (2005) - WDT Validation message rcv'd" + ut_setrequirements LC_2005, "P" + else + write " Failed (2005) - Did not rcv WDT and ADT Validation success messages" + ut_setrequirements LC_2005, "F" + endif + if ($sc_$cpu_find_event[3].num_found_messages = 1) then + write "<*> Passed (3007) - ADT Validation message rcv'd" + ut_setrequirements LC_3007, "P" + else + write " Failed (3007) - Did not rcv ADT Validation message" + ut_setrequirements LC_3007, "F" + endif +else + write " Failed (2005;3007) - WDT and/or ADT Failed Validation" + ut_setrequirements LC_2005, "F" + ut_setrequirements LC_3007, "F" +endif + +;; Send the command to activate the table +ut_setupevents "$SC","$CPU","CFE_TBL",CFE_TBL_UPDATE_SUCCESS_INF_EID,"INFO", 1 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_RCVD_EID,"DEBUG", 2 +ut_setupevents "$SC","$CPU","CFE_SB",CFE_SB_SUBSCRIPTION_REMOVED_EID,"DEBUG", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName +/$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Activate commands for WDT and ADT sent successfully." +else + write " Failed - Activate commands for WDT and ADT did not execute successfully." +endif + +;; Wait for the success message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 2 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the Table Update Success messages for both tables" +else + write "<*> Failed - Did not rcv the Table Update Success message for both tables" +endif + +;; Check for the correct number of SB Subscription messages +ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 19 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Rcv'd the correct number of Subscription Removed messages from SB." +else + write " Failed - Expected 19 Subscription Removed messages from SB. Only rcv'd ", $sc_$cpu_find_event[3].num_found_messages +endif + +if ($sc_$cpu_find_event[2].num_found_messages > 1) then + write "<*> Passed - Rcv'd more than 1 Subscription messages from SB." +else + write " Failed - Did not get any Subscription Rcvd messages from SB." +endif + +wait 5 + +cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 4.9: Check the housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_WPSINUSE <> 31) AND ($SC_$CPU_LC_ACTIVEAPS <> 12) then + write " Failed (8000) - Housekeeping telemetry NOT as expected after WDT Table Update." + write " WPs In Use = ", $SC_$CPU_LC_WPSINUSE + write " APs Active = ", $SC_$CPU_LC_ACTIVEAPS + ut_setrequirements LC_8000, "F" +else + write "<*> Passed (8000) - Housekeeping telemetry initialized properly after table update." + ut_setrequirements LC_8000, "P" +endif + +;; Check the Actionpoint Packed Results - Not Measured & Active +resultStatus = TRUE +for apindex = 1 to AP2aResults do + if (apindex < 7) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x77) then + resultStatus = FALSE + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + resultStatus = FALSE + break + endif + endif +enddo + +if (resultStatus = TRUE) then + write "<*> Passed (8000) - AP Packed Results are as expected after ADT load." +else + write " Failed (8000) - AP Packed Results are NOT correct." + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) +endif + +write ";*********************************************************************" +write "; Step 4.10: Dump the WRT and ADT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wpAPID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2004) - Watchpoint Results Table NOT initialized as expected." + write " Index of failure = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", %hex($SC_$CPU_LC_WRT[index].FtoTValue,2) + write " T to F Value = ", %hex($SC_$CPU_LC_WRT[index].TtoFValue,2) + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2004) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_2004, "P" +endif + +;; Dump the ART and check counters" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, apAPID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADT2aentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3006) - Actionpoint Results Table NOT initialized as expected." + write " Index of failure =", index + write " Action Results =", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State =", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count =", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count =", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count =", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count =", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count =", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3006) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 5.0: Table Validation Error Test" +write ";*********************************************************************" +write "; Step 5.1: Create the table load files that contain validation errors" +write "; for the WDT and ADT tables." +write ";*********************************************************************" +;; Create the load files +s $SC_$CPU_lc_wdt3 +s $SC_$CPU_lc_adt3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 2 + +;; Send the command to load the table +s load_table("lc_def_wdt3.tbl",hostCPU) +s load_table("lc_def_adt3.tbl",hostCPU) + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Load commands for WDT and ADT sent successfully." +else + write " Failed - Load command for WDT and ADT did not execute successfully." +endif + +;; Send the command to validate the WDT table +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_ERR_EID, "ERROR", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_ERR_EID, "ERROR", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to validate the WDT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Validate command for WDT sent successfully." +else + write " Failed - Validate command for WDT did not execute successfully." +endif + +;; Wait for the Table Validation message +ut_tlmwait $sc_$cpu_find_event[1].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - WDT Validation failed as expected." + if ($sc_$cpu_find_event[2].num_found_messages = 1) AND ;; + ($sc_$cpu_find_event[3].num_found_messages = 1) then + write "<*> Passed (2005) - WDT Validation status and error messages rcv'd" + ut_setrequirements LC_2005, "P" + else + write " Failed (2005) - Did not rcv the expected WDT Validation messages" + ut_setrequirements LC_2005, "F" + endif +else + write " Failed (2005) - WDT passed Validation when failure was expected." + ut_setrequirements LC_2005, "F" +endif + +;; Send the command to validate the ADT table +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_ERR_EID, "ERROR", 2 +ut_setupevents "$SC", "$CPU", "CFE_TBL", CFE_TBL_VALIDATION_ERR_EID, "ERROR", 3 + +cmdctr = $SC_$CPU_TBL_CMDPC + 1 + +;; Send the command to validate the ADT +/$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName + +ut_tlmwait $SC_$CPU_TBL_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Validate command for ADT sent successfully." +else + write " Failed - Validate command for ADT did not execute successfully." +endif + +;; Wait for the Table Validation message +ut_tlmwait $sc_$cpu_find_event[3].num_found_messages, 1 +if (UT_TW_Status = UT_Success) then + write "<*> Passed - ADT Validation failed as expected." + if ($sc_$cpu_find_event[1].num_found_messages = 1) AND ;; + ($sc_$cpu_find_event[2].num_found_messages = 1) then + write "<*> Passed (3007) - ADT Validation status and error messages rcv'd" + ut_setrequirements LC_3007, "P" + else + write " Failed (3007) - Did not rcv the expected ADT Validation messages" + ut_setrequirements LC_3007, "F" + endif +else + write " Failed (3007) - ADT passed Validation when failure was expected." + ut_setrequirements LC_3007, "F" +endif + +write ";*********************************************************************" +write "; Step 5.2: Replace the default load files with the files that contain" +write "; validation errors for the WDT and ADT tables." +write ";*********************************************************************" +s ftp_file(defaultTblDir, "lc_def_wdt3.tbl", wdtFileName, hostCPU, "P") +s ftp_file(defaultTblDir, "lc_def_adt3.tbl", adtFileName, hostCPU, "P") + +write ";*********************************************************************" +write "; Step 5.3: Perform an Application reset" +write ";*********************************************************************" +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application="TST_LC" + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - TST_LC app stop command sent properly." +else + write " Failed - TST_LC app stop command did not increment CMDPC." +endif + +wait 5 + +cmdctr = $SC_$CPU_ES_CMDPC + 1 + +/$SC_$CPU_ES_DELETEAPP Application=LCAppName +wait 5 + +ut_tlmwait $SC_$CPU_ES_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - LC app stop command sent properly." +else + write " Failed - LC app stop command did not increment CMDPC." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.4: Start the Limit Checker (LC) Application and verify the " +write "; WDT table fails validation and the LC application does not start. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDT_LOAD_ERR_EID, "ERROR", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_ERR_EID, "ERROR", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for events +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed - WDT Load Error Event Message received." +else + write " Failed - WDT Load Error Event Message not received." +endif + +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed - WDT Validation Error Event Message received." +else + write " Failed - WDT Validation Error Event Message not received." +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed - WDT Validation Info Event Message received." +else + write " Failed - WDT Validation Info Event Message not received." +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.5: Perform a Power-On reset" +write ";*********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 5.6: Start the Limit Checker (LC) Application and verify the " +write "; WDT table fails validation. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDT_LOAD_ERR_EID, "ERROR", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_ERR_EID, "ERROR", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for events +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed - WDT Load Error Event Message received." +else + write " Failed - WDT Load Error Event Message not received." +endif + +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed - WDT Validation Error Event Message received." +else + write " Failed - WDT Validation Error Event Message not received." +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed - WDT Validation Info Event Message received." +else + write " Failed - WDT Validation Info Event Message not received." +endif + +;; restore the default WDT file +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +wait 5 + +write ";*********************************************************************" +write "; Step 5.7: Perform a Processor Reset" +write ";*********************************************************************" +/$SC_$CPU_ES_PROCESSORRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 5.8: Start the Limit Checker (LC) Application and verify the " +write "; ADT and WDT tables fail validation. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADT_LOAD_ERR_EID, "ERROR", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_ERR_EID, "ERROR", 2 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 3 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for events +ut_tlmwait $SC_$CPU_find_event[1].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed - ADT Load Error Event Message received." +else + write " Failed - ADT Load Error Event Message not received." +endif + +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed - ADT Validation Error Event Message received." +else + write " Failed - ADT Validation Error Event Message not received." +endif + +ut_tlmwait $SC_$CPU_find_event[3].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed - ADT Validation Info Event Message received." +else + write " Failed - ADT Validation Info Event Message not received." +endif + +;; restore the default ADT file +s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, hostCPU, "P") + +wait 5 + +write ";*********************************************************************" +write "; Step 6.0: Clean-up" +write ";*********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_tabletesting " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_wdt1.prc b/test_and_ground/asist/prc/template/template_lc_wdt1.prc similarity index 80% rename from test_and_ground/asist/prc/template/template_lcx_wdt1.prc rename to test_and_ground/asist/prc/template/template_lc_wdt1.prc index 80e3d42..b80fee5 100644 --- a/test_and_ground/asist/prc/template/template_lcx_wdt1.prc +++ b/test_and_ground/asist/prc/template/template_lc_wdt1.prc @@ -1,513 +1,485 @@ -PROC $sc_$cpu_lcx_wdt1 -;******************************************************************************* -; Test Name: lcx_wdt1 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate WatchPoint Definition Table -; (WDT) 1 BVT. -; Note that the message ids used are borrowed from the other CFS -; applications (MM, FM, MD, and SCH). -; -; WDT1: Used by GenCmds, Monitoring, NoAction, WithAction, Initialization -; procedures. 20 unique MsgIds, 30 WPs, 1 entry calls a custom function, -; Entries include all data types and all operands -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/08/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL apid -LOCAL Message1 -LOCAL Message2 -LOCAL Message3 -LOCAL Message4 -LOCAL Message5 -LOCAL Message6 -LOCAL Message7 -LOCAL Message8 -LOCAL Message9 -LOCAL Message10 -LOCAL Message11 -LOCAL Message12 -LOCAL Message13 -LOCAL Message14 -LOCAL Message15 -LOCAL Message16 -LOCAL Message17 -LOCAL Message18 -LOCAL Message19 -LOCAL Message20 - -;; CPU1 is the default -apid = 0xfb7 -;; Use CPU2 Message IDs -Message1 = 0x987 -Message2 = 0x988 -Message3 = 0x989 -Message4 = 0x98a -Message5 = 0x98b -Message6 = 0x98c -Message7 = 0x98d -Message8 = 0x98e -Message9 = 0x98f -Message10 = 0x990 -Message11 = 0x991 -Message12 = 0x992 -Message13 = 0x993 -Message14 = 0x994 -Message15 = 0x995 -Message16 = 0x996 -Message17 = 0x997 -Message18 = 0x998 -Message19 = 0x999 -Message20 = 0x99a - -if ("$CPU" = "CPU2") then - apid = 0xfd5 - ;; Use CPU3 Message IDs - Message1 = 0xa87 - Message2 = 0xa88 - Message3 = 0xa89 - Message4 = 0xa8a - Message5 = 0xa8b - Message6 = 0xa8c - Message7 = 0xa8d - Message8 = 0xa8e - Message9 = 0xa8f - Message10 = 0xa90 - Message11 = 0xa91 - Message12 = 0xa92 - Message13 = 0xa93 - Message14 = 0xa94 - Message15 = 0xa95 - Message16 = 0xa96 - Message17 = 0xa97 - Message18 = 0xa98 - Message19 = 0xa99 - Message20 = 0xa9a -elseif ("$CPU" = "CPU3") then - apid = 0xff5 - ;; Use CPU1 Message IDs - Message1 = 0x887 - Message2 = 0x888 - Message3 = 0x889 - Message4 = 0x88a - Message5 = 0x88b - Message6 = 0x88c - Message7 = 0x88d - Message8 = 0x88e - Message9 = 0x88f - Message10 = 0x890 - Message11 = 0x891 - Message12 = 0x892 - Message13 = 0x893 - Message14 = 0x894 - Message15 = 0x895 - Message16 = 0x896 - Message17 = 0x897 - Message18 = 0x898 - Message19 = 0x899 - Message20 = 0x89a -endif - - -write ";*********************************************************************" -write "; Step 1.0: Define Watch Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 (WP 0) -entry = 0 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 2 (WP 1) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType =LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message2 -$SC_$CPU_LC_WDT[entry].WPOffset = 15 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Unsigned32 = 0x00000045 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 3 (WP 2) -entry = entry +1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 4 (WP 3) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message4 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 5 (WP 4) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message5 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 6 (WP 5) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message6 -$SC_$CPU_LC_WDT[entry].WPOffset = 26 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 7 (WP 6) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message7 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x12345678 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 8 (WP 7) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message8 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 9 (WP 8) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message9 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 10 (WP 9) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message10 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xF0AB1543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 11 (WP 10) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message11 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 12 (WP 11) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message12 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.34 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 13 (WP 12) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_CUSTOM -$SC_$CPU_LC_WDT[entry].MessageID = Message13 -$SC_$CPU_LC_WDT[entry].WPOffset = 22 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.987654321 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 14 (WP 13) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message14 -$SC_$CPU_LC_WDT[entry].WPOffset = 34 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 15 (WP 14) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message15 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0X00000023 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 16 (WP 15) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message16 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 17 (WP 16) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message17 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF011456 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 18 (WP 17) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message18 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00F3ABCD -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 19 (WP 18) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message19 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000012 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 20 (WP 19) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message20 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xFFFF1345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 21 (WP 20) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000F123 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 22 (WP 21) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message2 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 23 (WP 22) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 22 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000F3 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 24 (WP 23) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message4 -$SC_$CPU_LC_WDT[entry].WPOffset = 13 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000031 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 25 (WP 24) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message5 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000AB -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 26 (WP 25) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message6 -$SC_$CPU_LC_WDT[entry].WPOffset = 17 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000C5 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 27 (WP 26) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message7 -$SC_$CPU_LC_WDT[entry].WPOffset = 23 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000B123 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 28 (WP 27) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message8 -$SC_$CPU_LC_WDT[entry].WPOffset = 26 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000009AC -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 29 (WP 28) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message9 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FABC -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 30 (WP 29) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message10 -$SC_$CPU_LC_WDT[entry].WPOffset = 13 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000678 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -;; zero out the rest of the table -for entry=30 to LC_MAX_WATCHPOINTS-1 do - $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED - $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER - $SC_$CPU_LC_WDT[entry].MessageID = 0 - $SC_$CPU_LC_WDT[entry].WPOffset = 0 - $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF - $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 - $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 - $SC_$CPU_LC_WDT[entry].StaleAge = 0 -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local wpIndex = LC_MAX_WATCHPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_WDT[0]" -local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" -local tableName = LC_APP_NAME & ".LC_WDT" - -s create_tbl_file_from_cvt("$CPU",apid,"WDTTable1","lc_def_wdt1.tbl",tableName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_wdt1 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_wdt1 +;******************************************************************************* +; Test Name: lc_wdt1 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate WatchPoint Definition Table +; (WDT) 1 BVT. +; Note that the message ids used are borrowed from the other CFS +; applications (MM, FM, MD, and SCH). +; +; WDT1: Used by GenCmds, Monitoring, NoAction, WithAction, Initialization +; procedures. 20 unique MsgIds, 30 WPs, 1 entry calls a custom function, +; Entries include all data types and all operands +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/08/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL apid +LOCAL Message1 +LOCAL Message2 +LOCAL Message3 +LOCAL Message4 +LOCAL Message5 +LOCAL Message6 +LOCAL Message7 +LOCAL Message8 +LOCAL Message9 +LOCAL Message10 +LOCAL Message11 +LOCAL Message12 +LOCAL Message13 +LOCAL Message14 +LOCAL Message15 +LOCAL Message16 +LOCAL Message17 +LOCAL Message18 +LOCAL Message19 +LOCAL Message20 +local hostCPU = "$CPU" + +;; CPU1 is the default +apid = 0xfb7 +;; Use CPU2 Message IDs +Message1 = 0x987 +Message2 = 0x988 +Message3 = 0x989 +Message4 = 0x98a +Message5 = 0x98b +Message6 = 0x98c +Message7 = 0x98d +Message8 = 0x98e +Message9 = 0x98f +Message10 = 0x990 +Message11 = 0x991 +Message12 = 0x992 +Message13 = 0x993 +Message14 = 0x994 +Message15 = 0x995 +Message16 = 0x996 +Message17 = 0x997 +Message18 = 0x998 +Message19 = 0x999 +Message20 = 0x99a + +write ";*********************************************************************" +write "; Step 1.0: Define Watch Point Definition Table 1. " +write ";*********************************************************************" +; WP 0 +entry = 0 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed8 = 0x20 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 1 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType =LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message2 +$SC_$CPU_LC_WDT[entry].WPOffset = 15 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000045 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0x45 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 2 +entry = entry +1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x1345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 3 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message4 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x54 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 4 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message5 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xFF56 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 5 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message6 +$SC_$CPU_LC_WDT[entry].WPOffset = 26 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x0130 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 6 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message7 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x12345678 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 7 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message8 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 8 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message9 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 9 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message10 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xF0AB1543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 10 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message11 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 11 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message12 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.34 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 12 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_CUSTOM +$SC_$CPU_LC_WDT[entry].MessageID = Message13 +$SC_$CPU_LC_WDT[entry].WPOffset = 22 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.987654321 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 13 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message14 +$SC_$CPU_LC_WDT[entry].WPOffset = 34 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 14 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message15 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0X00000023 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 15 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message16 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 16 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message17 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF011456 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 17 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message18 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00F3ABCD +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 18 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message19 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000012 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x0012 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 19 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message20 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xFFFF1345 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x1345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 20 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000F123 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xF123 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 21 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message2 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000543 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x0543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 22 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 22 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000F3 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xF3 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 23 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message4 +$SC_$CPU_LC_WDT[entry].WPOffset = 13 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000031 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed8 = 0x31 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 24 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message5 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000AB +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xAB +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 25 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message6 +$SC_$CPU_LC_WDT[entry].WPOffset = 17 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000C5 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xC5 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 26 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message7 +$SC_$CPU_LC_WDT[entry].WPOffset = 23 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000B123 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xB123 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 27 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message8 +$SC_$CPU_LC_WDT[entry].WPOffset = 26 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000009AC +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x09AC +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 28 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message9 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FABC +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xFABC +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; WP 29 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message10 +$SC_$CPU_LC_WDT[entry].WPOffset = 13 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000678 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x0678 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +;; zero out the rest of the table +for entry=30 to LC_MAX_WATCHPOINTS-1 do + $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED + $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER + $SC_$CPU_LC_WDT[entry].MessageID = 0 + $SC_$CPU_LC_WDT[entry].WPOffset = 0 + $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF + $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 + $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 + $SC_$CPU_LC_WDT[entry].StaleAge = 0 +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local wpIndex = LC_MAX_WATCHPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_WDT[0]" +local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" +local tableName = LC_APP_NAME & ".LC_WDT" + +s create_tbl_file_from_cvt(hostCPU,apid,"WDTTable1","lc_def_wdt1.tbl",tableName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_wdt1 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_wdt2.prc b/test_and_ground/asist/prc/template/template_lc_wdt2.prc similarity index 83% rename from test_and_ground/asist/prc/template/template_lcx_wdt2.prc rename to test_and_ground/asist/prc/template/template_lc_wdt2.prc index 7d2278a..b965c85 100644 --- a/test_and_ground/asist/prc/template/template_lcx_wdt2.prc +++ b/test_and_ground/asist/prc/template/template_lc_wdt2.prc @@ -1,486 +1,461 @@ -PROC $sc_$cpu_lcx_wdt2 -;******************************************************************************* -; Test Name: lcx_wdt2 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate the WatchPoint Definition -; Table (WDT) used for testing. -; Note that the message ids used are borrowed from the other CFS -; applications (MM, FM, MD, and SCH). -; -; WDT2: Used by TableTesting and Initialization procedures. -; 19 unique MsgIds, 28 WPs, Entries include -; all data types and all operands -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL apid -LOCAL Message1 -LOCAL Message2 -LOCAL Message3 -LOCAL Message4 -LOCAL Message5 -LOCAL Message6 -LOCAL Message7 -LOCAL Message8 -LOCAL Message9 -LOCAL Message10 -LOCAL Message11 -LOCAL Message12 -LOCAL Message13 -LOCAL Message14 -LOCAL Message15 -LOCAL Message16 -LOCAL Message17 -LOCAL Message18 -LOCAL Message19 -LOCAL Message20 - -;; CPU1 is the default -apid = 0xfb7 -;; Use CPU2 message IDs -Message1 = 0x989 -Message2 = 0x988 -Message3 = 0x987 -Message4 = 0x98a -Message5 = 0x98b -Message6 = 0x98c -Message7 = 0x98d -Message8 = 0x98e -Message9 = 0x98f -Message10 = 0x998 -Message11 = 0x991 -Message12 = 0x992 -Message13 = 0x993 -Message14 = 0x994 -Message15 = 0x995 -Message16 = 0x996 -Message17 = 0x997 -Message18 = 0x999 -Message19 = 0x99a - -if ("$CPU" = "CPU2") then - apid = 0xfd5 - ;; Use CPU3 message ids - Message1 = 0xa89 - Message2 = 0xa88 - Message3 = 0xa87 - Message4 = 0xa8a - Message5 = 0xa8b - Message6 = 0xa8c - Message7 = 0xa8d - Message8 = 0xa8e - Message9 = 0xa8f - Message10 = 0xa98 - Message11 = 0xa91 - Message12 = 0xa92 - Message13 = 0xa93 - Message14 = 0xa94 - Message15 = 0xa95 - Message16 = 0xa96 - Message17 = 0xa97 - Message18 = 0xa99 - Message19 = 0xa9a -elseif ("$CPU" = "CPU3") then - apid = 0xff5 - ;; Use CPU1 message IDs - Message1 = 0x889 - Message2 = 0x888 - Message3 = 0x887 - Message4 = 0x88a - Message5 = 0x88b - Message6 = 0x88c - Message7 = 0x88d - Message8 = 0x88e - Message9 = 0x88f - Message10 = 0x898 - Message11 = 0x891 - Message12 = 0x892 - Message13 = 0x893 - Message14 = 0x894 - Message15 = 0x895 - Message16 = 0x896 - Message17 = 0x897 - Message18 = 0x899 - Message19 = 0x89a -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Watch Point Definition Table 2. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message2 -$SC_$CPU_LC_WDT[entry].WPOffset = 15 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Unsigned32 = 0x00000045 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 3 -entry = entry +1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 4 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message4 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message5 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message6 -$SC_$CPU_LC_WDT[entry].WPOffset = 26 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message7 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x12345678 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message8 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 9 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message9 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 10 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message10 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xC3 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 11 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message11 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 12 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message12 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.342 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 13 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message13 -$SC_$CPU_LC_WDT[entry].WPOffset = 22 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.98765432 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 14 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message14 -$SC_$CPU_LC_WDT[entry].WPOffset = 34 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 15 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message15 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0X00000023 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 16 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message16 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 17 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message17 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF000056 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 18 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message18 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000012 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 19 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message19 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00001345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 20 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000F123 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 21 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message2 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 22 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 22 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000F3 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 23 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message4 -$SC_$CPU_LC_WDT[entry].WPOffset = 13 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000031 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 24 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message5 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000AB -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 25 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message6 -$SC_$CPU_LC_WDT[entry].WPOffset = 17 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000C5 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 26 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message7 -$SC_$CPU_LC_WDT[entry].WPOffset = 23 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000B123 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 - -; Entry 27 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message8 -$SC_$CPU_LC_WDT[entry].WPOffset = 26 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000009AC -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 28 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message9 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FABC -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -;zero out the rest of the table -for entry=28 to LC_MAX_WATCHPOINTS-1 do - $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED - $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER - $SC_$CPU_LC_WDT[entry].MessageID = 0 - $SC_$CPU_LC_WDT[entry].WPOffset = 0 - $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF - $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 - $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 - $SC_$CPU_LC_WDT[entry].StaleAge = 0 -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local wpIndex = LC_MAX_WATCHPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_WDT[0]" -local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" -local tableName = LC_APP_NAME & ".LC_WDT" - -s create_tbl_file_from_cvt("$CPU",apid,"WDTTable2","lc_def_wdt2.tbl",tableName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_wdt2 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_wdt2 +;******************************************************************************* +; Test Name: lc_wdt2 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate the WatchPoint Definition +; Table (WDT) used for testing. +; Note that the message ids used are borrowed from the other CFS +; applications (MM, FM, MD, and SCH). +; +; WDT2: Used by TableTesting and Initialization procedures. +; 19 unique MsgIds, 28 WPs, Entries include +; all data types and all operands +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL apid +LOCAL Message1 +LOCAL Message2 +LOCAL Message3 +LOCAL Message4 +LOCAL Message5 +LOCAL Message6 +LOCAL Message7 +LOCAL Message8 +LOCAL Message9 +LOCAL Message10 +LOCAL Message11 +LOCAL Message12 +LOCAL Message13 +LOCAL Message14 +LOCAL Message15 +LOCAL Message16 +LOCAL Message17 +LOCAL Message18 +LOCAL Message19 +LOCAL Message20 +local hostCPU = "$CPU" + +;; CPU1 is the default +apid = 0xfb7 +;; Use CPU2 message IDs +Message1 = 0x989 +Message2 = 0x988 +Message3 = 0x987 +Message4 = 0x98a +Message5 = 0x98b +Message6 = 0x98c +Message7 = 0x98d +Message8 = 0x98e +Message9 = 0x98f +Message10 = 0x998 +Message11 = 0x991 +Message12 = 0x992 +Message13 = 0x993 +Message14 = 0x994 +Message15 = 0x995 +Message16 = 0x996 +Message17 = 0x997 +Message18 = 0x999 +Message19 = 0x99a + +write ";*********************************************************************" +write "; Step 1.0: Define Watch Point Definition Table 2. " +write ";*********************************************************************" +; Entry 1 +entry = 0 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x1345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 2 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message2 +$SC_$CPU_LC_WDT[entry].WPOffset = 15 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000045 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0x45 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 3 +entry = entry +1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed8 = 0x20 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 4 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message4 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x0054 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 5 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message5 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xFF56 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message6 +$SC_$CPU_LC_WDT[entry].WPOffset = 26 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x0130 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message7 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x12345678 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message8 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 9 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message9 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 10 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message10 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xC3 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xC3 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 11 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message11 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 12 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message12 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.342 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 13 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message13 +$SC_$CPU_LC_WDT[entry].WPOffset = 22 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.98765432 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 14 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message14 +$SC_$CPU_LC_WDT[entry].WPOffset = 34 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 15 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message15 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0X00000023 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 16 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message16 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 17 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message17 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF000056 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 18 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message18 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000012 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x0012 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 19 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message19 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00001345 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x1345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 20 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000F123 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xF123 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 21 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message2 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000543 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x0543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 22 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 22 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000F3 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xF3 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 23 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message4 +$SC_$CPU_LC_WDT[entry].WPOffset = 13 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000031 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed8 = 0x31 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 24 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message5 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000AB +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xAB +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 25 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message6 +$SC_$CPU_LC_WDT[entry].WPOffset = 17 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000C5 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xC5 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 26 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message7 +$SC_$CPU_LC_WDT[entry].WPOffset = 23 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000B123 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xB123 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 + +; Entry 27 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message8 +$SC_$CPU_LC_WDT[entry].WPOffset = 26 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000009AC +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x09AC +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 28 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message9 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FABC +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xFABC +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +;zero out the rest of the table +for entry=28 to LC_MAX_WATCHPOINTS-1 do + $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED + $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER + $SC_$CPU_LC_WDT[entry].MessageID = 0 + $SC_$CPU_LC_WDT[entry].WPOffset = 0 + $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF + $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 + $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 + $SC_$CPU_LC_WDT[entry].StaleAge = 0 +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local wpIndex = LC_MAX_WATCHPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_WDT[0]" +local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" +local tableName = LC_APP_NAME & ".LC_WDT" + +s create_tbl_file_from_cvt(hostCPU,apid,"WDTTable2","lc_def_wdt2.tbl",tableName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_wdt2 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_wdt2a.prc b/test_and_ground/asist/prc/template/template_lc_wdt2a.prc similarity index 83% rename from test_and_ground/asist/prc/template/template_lcx_wdt2a.prc rename to test_and_ground/asist/prc/template/template_lc_wdt2a.prc index e1819a3..73590a7 100644 --- a/test_and_ground/asist/prc/template/template_lcx_wdt2a.prc +++ b/test_and_ground/asist/prc/template/template_lc_wdt2a.prc @@ -1,523 +1,496 @@ -PROC $sc_$cpu_lcx_wdt2a -;******************************************************************************* -; Test Name: lcx_wdt2a -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate the WatchPoint Definition -; Table (WDT). -; Note that the message ids used are borrowed from the other CFS -; applications (MM, FM, MD, and SCH). -; -; WDT2a: Used by TableTesting procedure. -; 19 unique MsgIds, 31 WPs, Entries include -; all data types and all operands -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL apid -LOCAL Message1 -LOCAL Message2 -LOCAL Message3 -LOCAL Message4 -LOCAL Message5 -LOCAL Message6 -LOCAL Message7 -LOCAL Message8 -LOCAL Message9 -LOCAL Message10 -LOCAL Message11 -LOCAL Message12 -LOCAL Message13 -LOCAL Message14 -LOCAL Message15 -LOCAL Message16 -LOCAL Message17 -LOCAL Message18 -LOCAL Message19 -LOCAL Message20 - - -;; CPU1 is the default -apid = 0xfb7 -;; User CPU2 Message IDs -Message1 = 0x989 -Message2 = 0x988 -Message3 = 0x987 -Message4 = 0x98a -Message5 = 0x98b -Message6 = 0x98c -Message7 = 0x98d -Message8 = 0x98e -Message9 = 0x98f -Message10 = 0x998 -Message11 = 0x991 -Message12 = 0x992 -Message13 = 0x993 -Message14 = 0x994 -Message15 = 0x995 -Message16 = 0x996 -Message17 = 0x997 -Message18 = 0x999 -Message19 = 0x99a - -if ("$CPU" = "CPU2") then - apid = 0xfd5 - ;; Use CPU3 Message IDs - Message1 = 0xa89 - Message2 = 0xa88 - Message3 = 0xa87 - Message4 = 0xa8a - Message5 = 0xa8b - Message6 = 0xa8c - Message7 = 0xa8d - Message8 = 0xa8e - Message9 = 0xa8f - Message10 = 0xa98 - Message11 = 0xa91 - Message12 = 0xa92 - Message13 = 0xa93 - Message14 = 0xa94 - Message15 = 0xa95 - Message16 = 0xa96 - Message17 = 0xa97 - Message18 = 0xa99 - Message19 = 0xa9a -elseif ("$CPU" = "CPU3") then - apid = 0xff5 - ;; Use CPU1 Message IDs - Message1 = 0x889 - Message2 = 0x888 - Message3 = 0x887 - Message4 = 0x88a - Message5 = 0x88b - Message6 = 0x88c - Message7 = 0x88d - Message8 = 0x88e - Message9 = 0x88f - Message10 = 0x898 - Message11 = 0x891 - Message12 = 0x892 - Message13 = 0x893 - Message14 = 0x894 - Message15 = 0x895 - Message16 = 0x896 - Message17 = 0x897 - Message18 = 0x899 - Message19 = 0x89a -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Watch Point Definition Table 2. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 10 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000003F -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001234 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 3 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message2 -$SC_$CPU_LC_WDT[entry].WPOffset = 15 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000045 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 4 -entry = entry +1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message4 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message5 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message6 -$SC_$CPU_LC_WDT[entry].WPOffset = 26 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message7 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x12345678 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 9 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message8 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 10 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message9 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 11 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message10 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xC3 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 12 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message11 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000123 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 13 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message11 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 14 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message12 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.342 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 15 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message13 -$SC_$CPU_LC_WDT[entry].WPOffset = 22 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.9876543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 16 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message14 -$SC_$CPU_LC_WDT[entry].WPOffset = 34 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 17 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message15 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0x00FF0000 -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000023 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - - -; Entry 18 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message16 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - - -; Entry 19 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message17 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF000056 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 20 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message18 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000012 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 21 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message19 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00001345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 22 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000F123 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 23 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message2 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 24 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 3 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000F3 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 25 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message4 -$SC_$CPU_LC_WDT[entry].WPOffset = 13 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000031 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 26 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message5 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000AB -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 27 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message6 -$SC_$CPU_LC_WDT[entry].WPOffset = 17 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000C5 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 28 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message7 -$SC_$CPU_LC_WDT[entry].WPOffset = 23 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000B123 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 29 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message8 -$SC_$CPU_LC_WDT[entry].WPOffset = 26 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000009AC -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 30 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message9 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FABC -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 31 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message13 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000001 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -;zero out the rest of the table -for entry=31 to LC_MAX_WATCHPOINTS-1 do - $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED - $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER - $SC_$CPU_LC_WDT[entry].MessageID = 0 - $SC_$CPU_LC_WDT[entry].WPOffset = 0 - $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF - $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 - $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 - $SC_$CPU_LC_WDT[entry].StaleAge = 0 -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local wpIndex = LC_MAX_WATCHPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_WDT[0]" -local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" -local tableName = LC_APP_NAME & ".LC_WDT" - -s create_tbl_file_from_cvt("$CPU",apid,"WDTTable2a","lc_def_wdt2a.tbl",tableName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_wdt2a " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_wdt2a +;******************************************************************************* +; Test Name: lc_wdt2a +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate the WatchPoint Definition +; Table (WDT). +; Note that the message ids used are borrowed from the other CFS +; applications (MM, FM, MD, and SCH). +; +; WDT2a: Used by TableTesting procedure. +; 19 unique MsgIds, 31 WPs, Entries include +; all data types and all operands +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 W. Moleski Initial release for LCX +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL apid +LOCAL Message1 +LOCAL Message2 +LOCAL Message3 +LOCAL Message4 +LOCAL Message5 +LOCAL Message6 +LOCAL Message7 +LOCAL Message8 +LOCAL Message9 +LOCAL Message10 +LOCAL Message11 +LOCAL Message12 +LOCAL Message13 +LOCAL Message14 +LOCAL Message15 +LOCAL Message16 +LOCAL Message17 +LOCAL Message18 +LOCAL Message19 +LOCAL Message20 +local hostCPU = "$CPU" + +;; CPU1 is the default +apid = 0xfb7 +;; User CPU2 Message IDs +Message1 = 0x989 +Message2 = 0x988 +Message3 = 0x987 +Message4 = 0x98a +Message5 = 0x98b +Message6 = 0x98c +Message7 = 0x98d +Message8 = 0x98e +Message9 = 0x98f +Message10 = 0x998 +Message11 = 0x991 +Message12 = 0x992 +Message13 = 0x993 +Message14 = 0x994 +Message15 = 0x995 +Message16 = 0x996 +Message17 = 0x997 +Message18 = 0x999 +Message19 = 0x99a + +write ";*********************************************************************" +write "; Step 1.0: Define Watch Point Definition Table 2. " +write ";*********************************************************************" +; Entry 1 +entry = 0 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 10 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000003F +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed8 = 0x3F +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 2 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001234 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x1234 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 3 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message2 +$SC_$CPU_LC_WDT[entry].WPOffset = 15 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000045 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0x45 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 4 +entry = entry +1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed8 = 0x20 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 5 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message4 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x0054 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message5 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xFF56 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message6 +$SC_$CPU_LC_WDT[entry].WPOffset = 26 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message7 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x12345678 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 9 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message8 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 10 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message9 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 11 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message10 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xC3 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xC3 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 12 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message11 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000123 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x0123 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 13 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message11 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 14 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message12 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.342 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 15 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message13 +$SC_$CPU_LC_WDT[entry].WPOffset = 22 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.9876543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 16 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message14 +$SC_$CPU_LC_WDT[entry].WPOffset = 34 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 17 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message15 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0x00FF0000 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000023 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + + +; Entry 18 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message16 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + + +; Entry 19 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message17 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF000056 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 20 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message18 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000012 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x0012 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 21 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message19 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00001345 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x1345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 22 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000F123 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xF123 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 23 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message2 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000543 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x0543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 24 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 3 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000F3 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xF3 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 25 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message4 +$SC_$CPU_LC_WDT[entry].WPOffset = 13 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000031 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed8 = 0x31 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 26 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message5 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000AB +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xAB +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 27 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message6 +$SC_$CPU_LC_WDT[entry].WPOffset = 17 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000C5 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xC5 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 28 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message7 +$SC_$CPU_LC_WDT[entry].WPOffset = 23 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000B123 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xB123 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 29 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message8 +$SC_$CPU_LC_WDT[entry].WPOffset = 26 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000009AC +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x09AC +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 30 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message9 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FABC +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xFABC +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 31 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message13 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000001 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0x01 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +;zero out the rest of the table +for entry=31 to LC_MAX_WATCHPOINTS-1 do + $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED + $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER + $SC_$CPU_LC_WDT[entry].MessageID = 0 + $SC_$CPU_LC_WDT[entry].WPOffset = 0 + $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF + $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 + $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 + $SC_$CPU_LC_WDT[entry].StaleAge = 0 +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local wpIndex = LC_MAX_WATCHPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_WDT[0]" +local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" +local tableName = LC_APP_NAME & ".LC_WDT" + +s create_tbl_file_from_cvt(hostCPU,apid,"WDTTable2a","lc_def_wdt2a.tbl",tableName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_wdt2a " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_wdt3.prc b/test_and_ground/asist/prc/template/template_lc_wdt3.prc similarity index 87% rename from test_and_ground/asist/prc/template/template_lcx_wdt3.prc rename to test_and_ground/asist/prc/template/template_lc_wdt3.prc index b60efb0..439a461 100644 --- a/test_and_ground/asist/prc/template/template_lcx_wdt3.prc +++ b/test_and_ground/asist/prc/template/template_lc_wdt3.prc @@ -1,403 +1,358 @@ -PROC $sc_$cpu_lcx_wdt3 -;******************************************************************************* -; Test Name: lcx_wdt3 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate the WatchPoint Definition -; Table (ADT). -; Note that the message ids used are borrowed from the other CFS -; applications (MM, FM, MD, and SCH). -; -; WDT3: Used by Table Testing Initialization procedures. -; 20 unique MsgIds, 20 WPs, 1 entry calls a custom function, Entries -; include all data types and all operands. There are errors in the -; certain entries -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL apid -LOCAL Message1 -LOCAL Message2 -LOCAL Message3 -LOCAL Message4 -LOCAL Message5 -LOCAL Message6 -LOCAL Message7 -LOCAL Message8 -LOCAL Message9 -LOCAL Message10 -LOCAL Message11 -LOCAL Message12 -LOCAL Message13 -LOCAL Message14 -LOCAL Message15 -LOCAL Message16 -LOCAL Message17 -LOCAL Message18 -LOCAL Message19 -LOCAL Message20 - -;; CPU1 is the default -apid = 0xfb7 -;; Use CPU2 message IDs -Message1 = 0x987 -Message2 = 0x988 -Message3 = 0x989 -Message4 = 0x98a -Message5 = 0x98b -Message6 = 0x98c -Message7 = 0x98d -Message8 = 0x98e -Message9 = 0x98f -Message10 = 0x990 -Message11 = 0x991 -Message12 = 0x992 -Message13 = 0x993 -Message14 = 0x994 -Message15 = 0x995 -Message16 = 0x996 -Message17 = 0x997 -Message18 = 0x998 -Message19 = 0x999 -Message20 = 0x99a - -if ("$CPU" = "CPU2") then - apid = 0xfd5 - ;; Use CPU3 message IDs - Message1 = 0xa87 - Message2 = 0xa88 - Message3 = 0xa89 - Message4 = 0xa8a - Message5 = 0xa8b - Message6 = 0xa8c - Message7 = 0xa8d - Message8 = 0xa8e - Message9 = 0xa8f - Message10 = 0xa90 - Message11 = 0xa91 - Message12 = 0xa92 - Message13 = 0xa93 - Message14 = 0xa94 - Message15 = 0xa95 - Message16 = 0xa96 - Message17 = 0xa97 - Message18 = 0xa98 - Message19 = 0xa99 - Message20 = 0xa9a -elseif ("$CPU" = "CPU3") then - apid = 0xff5 - ;; Use CPU1 message IDs - Message1 = 0x887 - Message2 = 0x888 - Message3 = 0x889 - Message4 = 0x88a - Message5 = 0x88b - Message6 = 0x88c - Message7 = 0x88d - Message8 = 0x88e - Message9 = 0x88f - Message10 = 0x890 - Message11 = 0x891 - Message12 = 0x892 - Message13 = 0x893 - Message14 = 0x894 - Message15 = 0x895 - Message16 = 0x896 - Message17 = 0x897 - Message18 = 0x898 - Message19 = 0x899 - Message20 = 0x89a -endif - -write ";*********************************************************************" -write "; Step 1.0: Define Watch Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 -entry = 0 -$SC_$CPU_LC_WDT[entry].DataType = 0 -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 2 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = 13 -$SC_$CPU_LC_WDT[entry].OperatorID = 0 -$SC_$CPU_LC_WDT[entry].MessageID = Message2 -$SC_$CPU_LC_WDT[entry].WPOffset = 15 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Unsigned32 = 0x00000045 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 3 -entry = entry +1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = 0 -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 4 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = 8 -$SC_$CPU_LC_WDT[entry].MessageID = Message4 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 5 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message5 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 6 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message6 -$SC_$CPU_LC_WDT[entry].WPOffset = 26 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 7 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_CUSTOM -$SC_$CPU_LC_WDT[entry].MessageID = Message7 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 8 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message8 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x1234 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 9 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message9 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 10 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message10 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xF0AB1543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 11 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message11 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 12 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message12 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.34 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 13 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message13 -$SC_$CPU_LC_WDT[entry].WPOffset = 22 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.987654321 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 14 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message14 -$SC_$CPU_LC_WDT[entry].WPOffset = 34 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 15 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message15 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0X00000023 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 16 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message16 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 17 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message17 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF00056 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 18 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message18 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000CD -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 19 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message19 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000012 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 20 -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message20 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xFFFF1345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -;zero out the rest of the table -for entry=20 to LC_MAX_WATCHPOINTS-1 do - $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED - $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER - $SC_$CPU_LC_WDT[entry].MessageID = 0 - $SC_$CPU_LC_WDT[entry].WPOffset = 0 - $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF - $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 - $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 - $SC_$CPU_LC_WDT[entry].StaleAge = 0 -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local wpIndex = LC_MAX_WATCHPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_WDT[0]" -local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" -local tableName = LC_APP_NAME & ".LC_WDT" - -s create_tbl_file_from_cvt("$CPU",apid,"WDTTable3","lc_def_wdt3.tbl",tableName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_wdt3 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_wdt3 +;******************************************************************************* +; Test Name: lc_wdt3 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate the WatchPoint Definition +; Table (ADT). +; Note that the message ids used are borrowed from the other CFS +; applications (MM, FM, MD, and SCH). +; +; WDT3: Used by Table Testing Initialization procedures. +; 20 unique MsgIds, 20 WPs, 1 entry calls a custom function, Entries +; include all data types and all operands. There are errors in the +; certain entries +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL apid +LOCAL Message1 +LOCAL Message2 +LOCAL Message3 +LOCAL Message4 +LOCAL Message5 +LOCAL Message6 +LOCAL Message7 +LOCAL Message8 +LOCAL Message9 +LOCAL Message10 +LOCAL Message11 +LOCAL Message12 +LOCAL Message13 +LOCAL Message14 +LOCAL Message15 +LOCAL Message16 +LOCAL Message17 +LOCAL Message18 +LOCAL Message19 +LOCAL Message20 +local hostCPU = "$CPU" + +;; CPU1 is the default +apid = 0xfb7 +;; Use CPU2 message IDs +Message1 = 0x987 +Message2 = 0x988 +Message3 = 0x989 +Message4 = 0x98a +Message5 = 0x98b +Message6 = 0x98c +Message7 = 0x98d +Message8 = 0x98e +Message9 = 0x98f +Message10 = 0x990 +Message11 = 0x991 +Message12 = 0x992 +Message13 = 0x993 +Message14 = 0x994 +Message15 = 0x995 +Message16 = 0x996 +Message17 = 0x997 +Message18 = 0x998 +Message19 = 0x999 +Message20 = 0x99a + +write ";*********************************************************************" +write "; Step 1.0: Define Watch Point Definition Table 1. " +write ";*********************************************************************" +; Entry 1 +entry = 0 +$SC_$CPU_LC_WDT[entry].DataType = 0 +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 2 - Invalid DataType and OperatorID +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = 13 +$SC_$CPU_LC_WDT[entry].OperatorID = 0 +$SC_$CPU_LC_WDT[entry].MessageID = Message2 +$SC_$CPU_LC_WDT[entry].WPOffset = 15 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Unsigned32 = 0x00000045 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 3 - Invalid OperatorID +entry = entry +1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = 0 +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 4 - Invalid OperatorID +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = 8 +$SC_$CPU_LC_WDT[entry].MessageID = Message4 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 5 - Invalid Message ID +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = CFE_SB_HIGHEST_VALID_MSGID + 1 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 6 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message6 +$SC_$CPU_LC_WDT[entry].WPOffset = 26 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 7 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_CUSTOM +$SC_$CPU_LC_WDT[entry].MessageID = Message7 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 8 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message8 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x1234 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 9 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message9 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 10 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message10 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xF0AB1543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 11 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message11 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 12 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message12 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.34 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 13 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message13 +$SC_$CPU_LC_WDT[entry].WPOffset = 22 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.987654321 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 14 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message14 +$SC_$CPU_LC_WDT[entry].WPOffset = 34 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 15 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message15 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0X00000023 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 16 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message16 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 17 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message17 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF00056 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 18 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message18 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000CD +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 19 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message19 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000012 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 20 +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message20 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xFFFF1345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +;zero out the rest of the table +for entry=20 to LC_MAX_WATCHPOINTS-1 do + $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED + $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER + $SC_$CPU_LC_WDT[entry].MessageID = 0 + $SC_$CPU_LC_WDT[entry].WPOffset = 0 + $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF + $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 + $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 + $SC_$CPU_LC_WDT[entry].StaleAge = 0 +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local wpIndex = LC_MAX_WATCHPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_WDT[0]" +local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" +local tableName = LC_APP_NAME & ".LC_WDT" + +s create_tbl_file_from_cvt(hostCPU,apid,"WDTTable3","lc_def_wdt3.tbl",tableName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_wdt3 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_wdt4.prc b/test_and_ground/asist/prc/template/template_lc_wdt4.prc similarity index 84% rename from test_and_ground/asist/prc/template/template_lcx_wdt4.prc rename to test_and_ground/asist/prc/template/template_lc_wdt4.prc index 03099ee..d1a7838 100644 --- a/test_and_ground/asist/prc/template/template_lcx_wdt4.prc +++ b/test_and_ground/asist/prc/template/template_lc_wdt4.prc @@ -1,108 +1,102 @@ -PROC $sc_$cpu_lcx_wdt4 -;******************************************************************************* -; Test Name: lcx_wdt4 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate the WatchPoint Definition -; Table (WDT) containing the maximpum number of WatchPoints that will all -; trigger. -; -; Note that the message ids used are borrowed from the other CFS -; applications (MM, FM, MD, and SCH). -; -; WDT1: Used by the Stress monitoring procedure -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL apid -LOCAL MessageID - -;; CPU1 is the default -apid = 0xfb7 -;; Use CPU2 Message IDs -MessageID = 0x989 - -if ("$CPU" = "CPU2") then - apid = 0xfd5 - ;; Use CPU3 Message IDs - MessageID = 0xa89 -elseif ("$CPU" = "CPU3") then - apid = 0xff5 - ;; Use CPU1 Message IDs - MessageID = 0x889 -endif - -write ";*********************************************************************" -write "; Define the Watch Point Definition Table " -write ";*********************************************************************" - -; Make all the entries the same so that they all fail -for entry = 0 to LC_MAX_WATCHPOINTS-1 do - $SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE - $SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE - $SC_$CPU_LC_WDT[entry].MessageID = MessageID - $SC_$CPU_LC_WDT[entry].WPOffset = 19 - $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF - $SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 - $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 - $SC_$CPU_LC_WDT[entry].StaleAge = 0 -enddo - -;; Restore procedure logging -%liv (log_procedure) = logging - -local wpIndex = LC_MAX_WATCHPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_WDT[0]" -local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" -local tableName = LC_APP_NAME & ".LC_WDT" - -s create_tbl_file_from_cvt("$CPU",apid,"WDTTable4","lc_def_wdt4.tbl",tableName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_wdt4 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_wdt4 +;******************************************************************************* +; Test Name: lc_wdt4 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate the WatchPoint Definition +; Table (WDT) containing the maximpum number of WatchPoints that will all +; trigger. +; +; Note that the message ids used are borrowed from the other CFS +; applications (MM, FM, MD, and SCH). +; +; WDT1: Used by the Stress monitoring procedure +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL apid +LOCAL MessageID +local hostCPU = "$CPU" + +;; CPU1 is the default +apid = 0xfb7 +;; Use CPU2 Message IDs +MessageID = 0x989 + +write ";*********************************************************************" +write "; Define the Watch Point Definition Table " +write ";*********************************************************************" +; Make all the entries the same so that they all fail +for entry = 0 to LC_MAX_WATCHPOINTS-1 do + $SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE + $SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE + $SC_$CPU_LC_WDT[entry].MessageID = MessageID + $SC_$CPU_LC_WDT[entry].WPOffset = 19 + $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF + ;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 + $SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x1345 + $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 + $SC_$CPU_LC_WDT[entry].StaleAge = 0 +enddo + +;; Restore procedure logging +%liv (log_procedure) = logging + +local wpIndex = LC_MAX_WATCHPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_WDT[0]" +local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" +local tableName = LC_APP_NAME & ".LC_WDT" + +s create_tbl_file_from_cvt(hostCPU,apid,"WDTTable4","lc_def_wdt4.tbl",tableName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lcx_wdt4 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_wdt4a.prc b/test_and_ground/asist/prc/template/template_lc_wdt4a.prc similarity index 83% rename from test_and_ground/asist/prc/template/template_lcx_wdt4a.prc rename to test_and_ground/asist/prc/template/template_lc_wdt4a.prc index 86c1b9e..44f663a 100644 --- a/test_and_ground/asist/prc/template/template_lcx_wdt4a.prc +++ b/test_and_ground/asist/prc/template/template_lc_wdt4a.prc @@ -1,112 +1,107 @@ -PROC $sc_$cpu_lcx_wdt4a -;******************************************************************************* -; Test Name: lcx_wdt4 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate the WatchPoint Definition -; Table (WDT) containing one WatchPoint containing an offset that is -; beyond the end of the packet data. -; -; Note that the message id used is borrowed from the xxx CFS application. -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "lc_platform_cfg.h" -#include "lc_tbldefs.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL apid -LOCAL MessageID - -;; CPU1 is the default -apid = 0xfb7 -;; Use CPU2 Message ID -MessageID = 0x989 - -if ("$CPU" = "CPU2") then - apid = 0xfd5 - ;; Use CPU3 Message ID - MessageID = 0xa89 -elseif ("$CPU" = "CPU3") then - apid = 0xff5 - ;; Use CPU1 Message ID - MessageID = 0x889 -endif - -write ";*********************************************************************" -write "; Define the Watch Point Definition Table " -write ";*********************************************************************" -;; Setup the first entry -$SC_$CPU_LC_WDT[0].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[0].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[0].MessageID = MessageID -$SC_$CPU_LC_WDT[0].WPOffset = 45 -$SC_$CPU_LC_WDT[0].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[0].ComparisonValue.Signed32 = 0x00001345 -$SC_$CPU_LC_WDT[0].CustFctArgument = 0 -$SC_$CPU_LC_WDT[0].StaleAge = 0 - -; zero out all but the first watchpoint -for entry = 1 to LC_MAX_WATCHPOINTS-1 do - $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED - $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER - $SC_$CPU_LC_WDT[entry].MessageID = 0 - $SC_$CPU_LC_WDT[entry].WPOffset = 0 - $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF - $SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0 - $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 - $SC_$CPU_LC_WDT[0].StaleAge = 0 -enddo - -;; Restore procedure logging -%liv (log_procedure) = logging - -local wpIndex = LC_MAX_WATCHPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_WDT[0]" -local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" -local tableName = LC_APP_NAME & ".LC_WDT" - -s create_tbl_file_from_cvt("$CPU",apid,"WDTTable4a","lc_def_wdt4a.tbl",tableName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_wdt4a " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_wdt4a +;******************************************************************************* +; Test Name: lc_wdt4 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate the WatchPoint Definition +; Table (WDT) containing one WatchPoint containing an offset that is +; beyond the end of the packet data. +; +; Note that the message id used is borrowed from the xxx CFS application. +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "lc_platform_cfg.h" +#include "lc_tbldefs.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL apid +LOCAL MessageID +local hostCPU = "$CPU" + +;; CPU1 is the default +apid = 0xfb7 +;; Use CPU2 Message ID +MessageID = 0x989 + +write ";*********************************************************************" +write "; Define the Watch Point Definition Table " +write ";*********************************************************************" +;; Setup the first entry +$SC_$CPU_LC_WDT[0].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[0].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[0].MessageID = MessageID +$SC_$CPU_LC_WDT[0].WPOffset = 45 +$SC_$CPU_LC_WDT[0].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[0].ComparisonValue.Signed32 = 0x00001345 +$SC_$CPU_LC_WDT[0].ComparisonValue.Signed16 = 0x1345 +$SC_$CPU_LC_WDT[0].CustFctArgument = 0 +$SC_$CPU_LC_WDT[0].StaleAge = 0 + +; zero out all but the first watchpoint +for entry = 1 to LC_MAX_WATCHPOINTS-1 do + $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED + $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER + $SC_$CPU_LC_WDT[entry].MessageID = 0 + $SC_$CPU_LC_WDT[entry].WPOffset = 0 + $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF + $SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0 + $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 + $SC_$CPU_LC_WDT[0].StaleAge = 0 +enddo + +;; Restore procedure logging +%liv (log_procedure) = logging + +local wpIndex = LC_MAX_WATCHPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_WDT[0]" +local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" +local tableName = LC_APP_NAME & ".LC_WDT" + +s create_tbl_file_from_cvt(hostCPU,apid,"WDTTable4a","lc_def_wdt4a.tbl",tableName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_wdt4a " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_wdt5.prc b/test_and_ground/asist/prc/template/template_lc_wdt5.prc similarity index 83% rename from test_and_ground/asist/prc/template/template_lcx_wdt5.prc rename to test_and_ground/asist/prc/template/template_lc_wdt5.prc index 334efc3..4927157 100644 --- a/test_and_ground/asist/prc/template/template_lcx_wdt5.prc +++ b/test_and_ground/asist/prc/template/template_lc_wdt5.prc @@ -1,519 +1,492 @@ -PROC $sc_$cpu_lcx_wdt5 -;******************************************************************************* -; Test Name: lcx_wdt5 -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this procedure is to generate WatchPoint Definition Table -; (WDT) 5 in order to test the new StaleAge option developed for the LCX -; Application. -; -; Requirements Tested -; None -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet -; LC Test application loaded and running; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 W. Moleski Initial release for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; create_tbl_file_from_cvt Procedure that creates a load file from -; the specified arguments and cvt -; -; -; Expected Test Results and Analysis -; -;********************************************************************** -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" - -write ";*********************************************************************" -write "; define local variables " -write ";*********************************************************************" - -LOCAL entry -LOCAL apid -LOCAL Message1 -LOCAL Message2 -LOCAL Message3 -LOCAL Message4 -LOCAL Message5 -LOCAL Message6 -LOCAL Message7 -LOCAL Message8 -LOCAL Message9 -LOCAL Message10 -LOCAL Message11 -LOCAL Message12 -LOCAL Message13 -LOCAL Message14 -LOCAL Message15 -LOCAL Message16 -LOCAL Message17 -LOCAL Message18 -LOCAL Message19 -LOCAL Message20 - -;; CPU1 is the default -apid = 0xfb7 -;; Use CPU2 Message IDs -Message1 = 0x987 -Message2 = 0x988 -Message3 = 0x989 -Message4 = 0x98a -Message5 = 0x98b -Message6 = 0x98c -Message7 = 0x98d -Message8 = 0x98e -Message9 = 0x98f -Message10 = 0x990 -Message11 = 0x991 -Message12 = 0x992 -Message13 = 0x993 -Message14 = 0x994 -Message15 = 0x995 -Message16 = 0x996 -Message17 = 0x997 -Message18 = 0x998 -Message19 = 0x999 -Message20 = 0x99a - -if ("$CPU" = "CPU2") then - apid = 0xfd5 - ;; Use CPU3 Message IDs - Message1 = 0xa87 - Message2 = 0xa88 - Message3 = 0xa89 - Message4 = 0xa8a - Message5 = 0xa8b - Message6 = 0xa8c - Message7 = 0xa8d - Message8 = 0xa8e - Message9 = 0xa8f - Message10 = 0xa90 - Message11 = 0xa91 - Message12 = 0xa92 - Message13 = 0xa93 - Message14 = 0xa94 - Message15 = 0xa95 - Message16 = 0xa96 - Message17 = 0xa97 - Message18 = 0xa98 - Message19 = 0xa99 - Message20 = 0xa9a -elseif ("$CPU" = "CPU3") then - apid = 0xff5 - ;; Use CPU1 Message IDs - Message1 = 0x887 - Message2 = 0x888 - Message3 = 0x889 - Message4 = 0x88a - Message5 = 0x88b - Message6 = 0x88c - Message7 = 0x88d - Message8 = 0x88e - Message9 = 0x88f - Message10 = 0x890 - Message11 = 0x891 - Message12 = 0x892 - Message13 = 0x893 - Message14 = 0x894 - Message15 = 0x895 - Message16 = 0x896 - Message17 = 0x897 - Message18 = 0x898 - Message19 = 0x899 - Message20 = 0x89a -endif - - -write ";*********************************************************************" -write "; Step 1.0: Define Watch Point Definition Table 1. " -write ";*********************************************************************" - -; Entry 1 (WP 0) -entry = 0 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 3 - -; Entry 2 (WP 1) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType =LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message2 -$SC_$CPU_LC_WDT[entry].WPOffset = 15 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Unsigned32 = 0x00000045 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 3 (WP 2) -entry = entry +1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 4 (WP 3) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message4 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 5 (WP 4) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message5 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 3 - -; Entry 6 (WP 5) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message6 -$SC_$CPU_LC_WDT[entry].WPOffset = 26 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 7 (WP 6) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message7 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x12345678 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 8 (WP 7) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message8 -$SC_$CPU_LC_WDT[entry].WPOffset = 19 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 9 (WP 8) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message9 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 3 - -; Entry 10 (WP 9) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message10 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xF0AB1543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 11 (WP 10) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message11 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 12 (WP 11) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message12 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.34 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 13 (WP 12) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_CUSTOM -$SC_$CPU_LC_WDT[entry].MessageID = Message13 -$SC_$CPU_LC_WDT[entry].WPOffset = 22 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.987654321 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 3 - -; Entry 14 (WP 13) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message14 -$SC_$CPU_LC_WDT[entry].WPOffset = 34 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 15 (WP 14) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message15 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0X00000023 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 16 (WP 15) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message16 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 17 (WP 16) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message17 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF011456 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 18 (WP 17) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message18 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00F3ABCD -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 19 (WP 18) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message19 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000012 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 20 (WP 19) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message20 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xFFFF1345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 21 (WP 20) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message1 -$SC_$CPU_LC_WDT[entry].WPOffset = 14 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000F123 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 22 (WP 21) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message2 -$SC_$CPU_LC_WDT[entry].WPOffset = 12 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000543 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 23 (WP 22) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 22 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000F3 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 3 - -; Entry 24 (WP 23) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message4 -$SC_$CPU_LC_WDT[entry].WPOffset = 13 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000031 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 3 - -; Entry 25 (WP 24) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT -$SC_$CPU_LC_WDT[entry].MessageID = Message5 -$SC_$CPU_LC_WDT[entry].WPOffset = 18 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000AB -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 26 (WP 25) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT -$SC_$CPU_LC_WDT[entry].MessageID = Message6 -$SC_$CPU_LC_WDT[entry].WPOffset = 17 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000C5 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 27 (WP 26) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE -$SC_$CPU_LC_WDT[entry].MessageID = Message7 -$SC_$CPU_LC_WDT[entry].WPOffset = 23 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000B123 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 28 (WP 27) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message8 -$SC_$CPU_LC_WDT[entry].WPOffset = 26 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000009AC -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 29 (WP 28) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ -$SC_$CPU_LC_WDT[entry].MessageID = Message9 -$SC_$CPU_LC_WDT[entry].WPOffset = 16 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FABC -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 30 (WP 29) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE -$SC_$CPU_LC_WDT[entry].MessageID = Message10 -$SC_$CPU_LC_WDT[entry].WPOffset = 13 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000678 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -; Entry 31 (WP 30) -entry = entry + 1 -$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE -$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE -$SC_$CPU_LC_WDT[entry].MessageID = Message3 -$SC_$CPU_LC_WDT[entry].WPOffset = 45 -$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF -$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 -$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 -$SC_$CPU_LC_WDT[entry].StaleAge = 0 - -;; zero out the rest of the table -for entry=31 to LC_MAX_WATCHPOINTS-1 do - $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED - $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER - $SC_$CPU_LC_WDT[entry].MessageID = 0 - $SC_$CPU_LC_WDT[entry].WPOffset = 0 - $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF - $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 - $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 - $SC_$CPU_LC_WDT[entry].StaleAge = 0 -enddo -;; Restore procedure logging -%liv (log_procedure) = logging - -local wpIndex = LC_MAX_WATCHPOINTS - 1 -local startMnemonic = "$SC_$CPU_LC_WDT[0]" -local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" -local tableName = LC_APP_NAME & ".LC_WDT" - -s create_tbl_file_from_cvt("$CPU",apid,"WDTTable5","lc_def_wdt5.tbl",tableName,startMnemonic,endMnemonic) - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_wdt5 " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_wdt5 +;******************************************************************************* +; Test Name: lc_wdt5 +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this procedure is to generate WatchPoint Definition Table +; (WDT) 5 in order to test the new StaleAge option developed for the LC +; Application. +; +; Requirements Tested +; None +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet +; LC Test application loaded and running; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 W. Moleski Initial release for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; create_tbl_file_from_cvt Procedure that creates a load file from +; the specified arguments and cvt +; +; +; Expected Test Results and Analysis +; +;********************************************************************** +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" + +write ";*********************************************************************" +write "; define local variables " +write ";*********************************************************************" + +LOCAL entry +LOCAL apid +LOCAL Message1 +LOCAL Message2 +LOCAL Message3 +LOCAL Message4 +LOCAL Message5 +LOCAL Message6 +LOCAL Message7 +LOCAL Message8 +LOCAL Message9 +LOCAL Message10 +LOCAL Message11 +LOCAL Message12 +LOCAL Message13 +LOCAL Message14 +LOCAL Message15 +LOCAL Message16 +LOCAL Message17 +LOCAL Message18 +LOCAL Message19 +LOCAL Message20 +local hostCPU = "$CPU" + +;; CPU1 is the default +apid = 0xfb7 +;; Use CPU2 Message IDs +Message1 = 0x987 +Message2 = 0x988 +Message3 = 0x989 +Message4 = 0x98a +Message5 = 0x98b +Message6 = 0x98c +Message7 = 0x98d +Message8 = 0x98e +Message9 = 0x98f +Message10 = 0x990 +Message11 = 0x991 +Message12 = 0x992 +Message13 = 0x993 +Message14 = 0x994 +Message15 = 0x995 +Message16 = 0x996 +Message17 = 0x997 +Message18 = 0x998 +Message19 = 0x999 +Message20 = 0x99a + +write ";*********************************************************************" +write "; Step 1.0: Define Watch Point Definition Table 1. " +write ";*********************************************************************" +; WP 0 +entry = 0 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000020 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed8 = 0x20 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 3 + +; Entry 2 (WP 1) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType =LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message2 +$SC_$CPU_LC_WDT[entry].WPOffset = 15 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000045 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0x45 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 3 (WP 2) +entry = entry +1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x1345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 4 (WP 3) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message4 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000054 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x0054 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 5 (WP 4) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message5 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FF56 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xFF56 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 3 + +; Entry 6 (WP 5) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message6 +$SC_$CPU_LC_WDT[entry].WPOffset = 26 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000130 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x0130 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 7 (WP 6) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message7 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0012546F +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0x12345678 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 8 (WP 7) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message8 +$SC_$CPU_LC_WDT[entry].WPOffset = 19 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x23451236 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 9 (WP 8) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message9 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 3 + +; Entry 10 (WP 9) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message10 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xF0AB1543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 11 (WP 10) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message11 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 1.2345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 12 (WP 11) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message12 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 321.34 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 13 (WP 12) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_CUSTOM +$SC_$CPU_LC_WDT[entry].MessageID = Message13 +$SC_$CPU_LC_WDT[entry].WPOffset = 22 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 65.987654321 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 3 + +; Entry 14 (WP 13) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_FLOAT_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message14 +$SC_$CPU_LC_WDT[entry].WPOffset = 34 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Float32 = 3.456 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 15 (WP 14) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message15 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0X00000023 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 16 (WP 15) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UDWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message16 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF000000 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x12000000 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 17 (WP 16) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message17 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFF0000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0xFF011456 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 18 (WP 17) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_DWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message18 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0x000000FF +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00F3ABCD +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 19 (WP 18) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message19 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000012 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x0012 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 20 (WP 19) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message20 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0xFFFF1345 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x1345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 21 (WP 20) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message1 +$SC_$CPU_LC_WDT[entry].WPOffset = 14 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000F123 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xF123 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 22 (WP 21) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message2 +$SC_$CPU_LC_WDT[entry].WPOffset = 12 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000543 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x0543 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 23 (WP 22) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 22 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000F3 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xF3 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 3 + +; Entry 24 (WP 23) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message4 +$SC_$CPU_LC_WDT[entry].WPOffset = 13 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00000031 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed8 = 0x31 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 3 + +; Entry 25 (WP 24) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_BYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GT +$SC_$CPU_LC_WDT[entry].MessageID = Message5 +$SC_$CPU_LC_WDT[entry].WPOffset = 18 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000000AB +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xAB +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 26 (WP 25) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UBYTE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LT +$SC_$CPU_LC_WDT[entry].MessageID = Message6 +$SC_$CPU_LC_WDT[entry].WPOffset = 17 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x000000C5 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned8 = 0xC5 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 27 (WP 26) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_LE +$SC_$CPU_LC_WDT[entry].MessageID = Message7 +$SC_$CPU_LC_WDT[entry].WPOffset = 23 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x0000B123 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xB123 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 28 (WP 27) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message8 +$SC_$CPU_LC_WDT[entry].WPOffset = 26 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x000009AC +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x09AC +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 29 (WP 28) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_EQ +$SC_$CPU_LC_WDT[entry].MessageID = Message9 +$SC_$CPU_LC_WDT[entry].WPOffset = 16 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x0000FABC +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0xFABC +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 30 (WP 29) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_UWORD_LE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_GE +$SC_$CPU_LC_WDT[entry].MessageID = Message10 +$SC_$CPU_LC_WDT[entry].WPOffset = 13 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0x00000678 +$SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned16 = 0x0678 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +; Entry 31 (WP 30) +entry = entry + 1 +$SC_$CPU_LC_WDT[entry].DataType = LC_DATA_WORD_BE +$SC_$CPU_LC_WDT[entry].OperatorID = LC_OPER_NE +$SC_$CPU_LC_WDT[entry].MessageID = Message3 +$SC_$CPU_LC_WDT[entry].WPOffset = 45 +$SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF +;;$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed32 = 0x00001345 +$SC_$CPU_LC_WDT[entry].ComparisonValue.Signed16 = 0x1345 +$SC_$CPU_LC_WDT[entry].CustFctArgument = 0 +$SC_$CPU_LC_WDT[entry].StaleAge = 0 + +;; zero out the rest of the table +for entry=31 to LC_MAX_WATCHPOINTS-1 do + $SC_$CPU_LC_WDT[entry].DataType = LC_WATCH_NOT_USED + $SC_$CPU_LC_WDT[entry].OperatorID = LC_NO_OPER + $SC_$CPU_LC_WDT[entry].MessageID = 0 + $SC_$CPU_LC_WDT[entry].WPOffset = 0 + $SC_$CPU_LC_WDT[entry].Bitmask = 0xFFFFFFFF + $SC_$CPU_LC_WDT[entry].ComparisonValue.UnSigned32 = 0 + $SC_$CPU_LC_WDT[entry].CustFctArgument = 0 + $SC_$CPU_LC_WDT[entry].StaleAge = 0 +enddo +;; Restore procedure logging +%liv (log_procedure) = logging + +local wpIndex = LC_MAX_WATCHPOINTS - 1 +local startMnemonic = "$SC_$CPU_LC_WDT[0]" +local endMnemonic = "$SC_$CPU_LC_WDT[" & wpIndex & "]" +local tableName = LC_APP_NAME & ".LC_WDT" + +s create_tbl_file_from_cvt(hostCPU,apid,"WDTTable5","lc_def_wdt5.tbl",tableName,startMnemonic,endMnemonic) + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_wdt5 " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/prc/template/template_lcx_withaction.prc b/test_and_ground/asist/prc/template/template_lc_withaction.prc similarity index 85% rename from test_and_ground/asist/prc/template/template_lcx_withaction.prc rename to test_and_ground/asist/prc/template/template_lc_withaction.prc index 43b6ddf..753fcd4 100644 --- a/test_and_ground/asist/prc/template/template_lcx_withaction.prc +++ b/test_and_ground/asist/prc/template/template_lc_withaction.prc @@ -1,4528 +1,4529 @@ -PROC $sc_$cpu_lcx_withaction -;******************************************************************************* -; Test Name: lcx_withaction -; Test Level: Build Verification -; Test Type: Functional -; -; Test Description -; The purpose of this test is to verify that Limit Checker eXtended (LCX) -; functions properly when monitoring WatchPoints (WP). All WP evaluate to -; a mix of true, false, and stale. All ActionPoints (AP) evaluate to a mix -; of pass, fail, error, and stale so some actions will be taken. -; During this test the LC is set as follows: -; LC Active with all AP disabled. -; LC Active with all AP active. -; LC Active with all AP passive -; LC Active with AP in mix of states (active, passive, disabled, -; permanently disabled, unused) -; LC Passive with all AP active -; LC Disabled with all AP active -; -; The following WP true/false transitions and AP pass/fail transitions are -; tested: -; WP T/F Transitions Tested -; WP1 T, T, T, T WP7 F, T, F, T -; WP2 T, T, T, F WP8 F, T, T, F -; WP3 T, T, F, F WP9 F, T, T, T -; WP4 T, F, F, F WP10 F, F, T, T -; WP5 T, F, F, T WP11 F, F, F, T -; WP6 T, F, T, F WP12 F, F, F, F -; -; AP P/F Transitions Tested -; AP1 P, P, P, P AP7 F, P, F, P -; AP2 P, P, P, F AP8 F, P, P, F -; AP3 P, P, F, F AP9 F, P, P, P -; AP4 P, F, F, F AP10 F, F, P, P -; AP5 P, F, F, P AP11 F, F, F, P -; AP6 P, F, P, F AP12 F, F, F, F -; -; Requirements Tested -; LCX1003 If LCX accepts any command as valid, LCX shall execute the -; command, increment the LCX Valid Command Counter and issue an -; event message -; LCX2003 Upon receipt of a message, LCX shall compare the data in the -; message to the table-defined value using the table-defined -; comparison value and comparison operator for each data point -; defined in the Watchpoint Definition Table (WDT) if the LCX -; Application State is one of the following: -; a) Active -; b) Passive -; LCX2003.2 LCX shall support the following comparison values: -; a) = -; b) != -; c) > -; d) >= -; e) < -; f) <= -; LCX2003.3 If the WDT comparison operator specifies that a Custom Function -; shall be performed, LCX shall apply the custon function to the -; data contained in the message -; LCX2003.4 If the comparison result for a Watchpoint results in a False, -; LCX shall set the Number of Consecutive True values to zero -; LCX2004 For each Watchpoint, the flight software shall maintain the -; following statistics in the dump-only Watchpoint Results Table: -; a) The result of the last relational comparison (False, True, -; Error or Stale) -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) Most recent FALSE to TRUE transition value -; g) Most recent FALSE to TRUE transition timestamp -; h) Most recent TRUE to FALSE transition value -; i) Most recent TRUE to FALSE transition timestamp -; LCX2005 Upon receipt of a table update indication, LCX shall validate -; the Watchpoint Definition Table for the following: -; a) Valid operator -; b) Data size -; c) Message ID -; LCX3001 Upon receipt of a Sample Request, LCX shall process the request -; specified actionpoints defined in the Actionpoint Definition -; Table (ADT) if the LCX Application State is one of the -; following: -; a) Active -; b) Passive -; LCX3001.1 LCX shall support the following Reverse Polish Operators: -; a) and -; b) or -; c) xor -; d) not -; e) equals -; LCX3001.2 If the equation result for an Actionpoint results in a Pass, LCX -; shall set the Number of Consecutive Fail values to zero -; LCX3002 Each table-defined Actionpoint shall be evaluated and the -; results stored in the dump-only Actionpoint Results Table if the -; Actionpoint state is either: -; a) Active -; b) Passive -; LCX3002.1 If the Actionpoint equation results in a transition from PASS to -; FAIL, LCX shall issue an event message indicating the failure -; LCX3002.1.1 If the PASS to FAIL transition event message has been sent for -; the table-defined number of times, LCX shall apply the -; table-defined event message filter. -; LCX3002.2 If the Actionpoint equation results in a transition from FAIL to -; PASS, LCX shall issue an event message indicating that the -; actionpoint is now within limits -; LCX3002.2.1 If the FAIL to PASS transition event message has been sent for -; the table-defined number of times, LCX shall apply the -; table-defined event message filter. -; LCX3002.3 If the equation has yielded a Fail result for the table-defined -; consecutive number of times limit and the Actionpoint is -; currently Active, LCX shall: -; a) generate an event message -; b) send a command to start the table-defined RTS -; c) Increment the counter indicating Total count of commands -; sent to SC task to start an RTS -; LCX3002.3.1 Once an RTS is initiated, LCX shall change the current state of -; the associated Actionpoint to Passive. -; LCX3002.4 If the equation has yielded a Fail result for the defined -; consecutive number of times and the Actionpoint is currently -; Passive, LCX shall -; a) generate an event message indicating that the Actionpoint -; Failed but the action was not taken -; b) Increment the counter indicating Number of Start RTS -; commands NOT sent to SC task because LCX Application is -; PASSIVE -; LCX3003 If the Actionpoint is Disabled, LCX shall skip processing that -; actionpoint -; LCX3004 If the Actionpoint is Unused, LCX shall skip processing that -; actionpoint -; LCX3005 If the Actionpoint is Permanently Disabled, LCX shall skip -; processing that actionpoint -; LCX3006 For each Actionpoint, the flight software shall maintain the -; following statistics in the dump-only Actionpoint Results Table: -; a) The result of the last Sample(Pass,Fail,Error,Stale) -; b) The current state (PermOff,Disabled,Active,Passive,Unused) -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX3007 Upon receipt of a table update indication, LCX shall validate -; the Actionpoint Definition Table for the following: -; a) valid default state -; b) RTS number (in range) -; c) Event Type (DEBUG,INFO,ERROR,CRITICAL) -; d) Failure Count (in range) -; e) Action Equation syntax -; LCX4000 Upon receipt of a Set LCX Application State To Active Command, -; LCX shall set the state of the LCX Application to Active -; LCX4001 Upon receipt of a Set LCX Application State to Passive Command, -; LCX shall set the LCX Application State to Passive -; LCX4002 Upon receipt of a Set LCX Application State to Disable Command, -; LCX shall set the LCX Application State to Disabled -; LCX4003 Upon receipt of a Set Actionpoint to Active Command, LCX shall -; set the state for the command-specified Actionpoint to ACTIVE -; such that the actionpoint is evaluated and the table-defined -; actions are taken based on the evaluation -; LCX4004 Upon receipt of a Set All Actionpoints to Active Command, LCX -; shall set the state for all Actionpoints to ACTIVE such that -; the actionpoints are evaluated and the table-defined actions are -; taken based on the evaluation -; LCX4005 Upon receipt of a Set Actionpoint to Passive Command, LCX shall -; set the state for the command-specified Actionpoint to PASSIVE -; such that the actionpoint is evaluated, however, no actions are -; taken -; LCX4006 Upon receipt of a Set All Actionpoints to Passive Command, LCX -; shall set the state for the all Actionpoints to PASSIVE such -; that all actionpoints are evaluated, however, no actions are -; taken -; LCX4007 Upon receipt of a Set Actionpoint to Disabled Command, LCX shall -; set the state for the command-specified Actionpoint to DISABLED -; such that the actionpoints are not evaluated and no actions are -; taken -; LCX4009 Upon receipt of a Set Actionpoint to Permanent Disable, LCX -; shall mark the command-specified Actionpoint such that the -; Actionpoint cannot be Activated -; LCX8000 LCX shall generate a housekeeping message containing the -; following: -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Number of Start RTS commands NOT sent to SC task because -; LCX Application is PASSIVE -; d) Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, -; LCX_DISABLED)... -; e) Total count of actionpoints sampled while LCX_ACTIVE or -; LCX_PASSIVE... -; f) Total count of packets monitored for watchpoints (cmd and -; tlm) -; g) Total count of commands sent to SC task to start an RTS -; h) Selected data from watchpoint results table -; i) Selected data from actionpoint results table -; LCX9000 Upon cFE Power-On LCX shall initialize the following -; Housekeeping data to Zero (or value specified): -; a) Valid Command Counter -; b) Command Rejected Counter -; c) Passive RTS Execution Counter -; d) Current LC State to Default Power-on -; State -; e) Actionpoint Sample Count -; f) TLM Count -; g) RTS Execution Counter -; h) Watch Results (bitmapped) -; i) Action Results (bitmapped) -; LCX9001 Upon cFE Power-On LCX shall initialize the following Watchpoint -; data to Zero (or value specified) for all Watchpoints: -; a) The result of the last watchpoint relational comparison to -; STALE -; b) The number of times this Watchpoint has been compared -; c) The number of times this Watchpoint has crossed from the -; False to True result -; d) The number of consecutive times the comparison has yielded -; a True result -; e) The cumulative number of times the comparison has yielded a -; True result -; f) The value that caused the last False-to-True crossing, and -; the crossing time stamp -; g) The value that caused the last True-to-False crossing, and -; the crossing time stamp -; LCX9002 Upon cFE Power-On LCX shall initialize the following Actionpoint -; data to Zero (or value specified for all Actionpoints: -; a) The result of the last Actionpoint Sample to STALE -; b) The current state as defined in the ADT -; c) The number of times this Actionpoint has crossed from the -; Fail to Pass state -; d) The number of times this Actionpoint has crossed from the -; Pass to Fail state -; e) The number of consecutive times the equation result =Failed -; f) The cumulative number of times the equation result = Failed -; g) The cumulative count of the RTS executions -; h) Total number of event messages sent -; LCX9005 Upon any initialization, LCX shall validate the Watchpoint -; Definition Table for the following: -; a) valid operator -; b) data size -; c) Message ID -; LCX9006 Upon any initialization, LCX shall validate the Actionpoint -; Definition Table for the following: -; a) valid default state -; b) RTS number (in range) -; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) -; d) Failure Count (in range) -; e) Action Equation syntax -; LCX9007 Upon any initialization, LCX shall subscribe to the messages -; defined in the WDT. -; -; Prerequisite Conditions -; The cFE is up and running and ready to accept commands. -; The LC commands and TLM items exist in the GSE database. -; A display page exists for the LC Housekeeping telemetry packet. -; LC Test application loaded and running -; -; Assumptions and Constraints -; None. -; -; Change History -; -; Date Name Description -; 08/10/12 Walt Moleski Original Procedure for LCX -; -; Arguments -; None. -; -; Procedures Called -; Name Description -; ut_tlmwait Wait for a specified telemetry point to update to -; a specified value. -; ut_sendcmd Send commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command -; processed and command error counters. -; ut_pfindicate Print the pass fail status of a particular requirement -; number. -; ut_setupevents Performs setup to verify that a particular event -; message was received by ASIST. -; ut_setrequirements A directive to set the status of the cFE -; requirements array. -; ftp_file Procedure to load file containing a table -; lcx_wdt1 Sets up the Watchpoint Definition table files for testing -; lcx_adt1 Sets up the Actionpoint Definition table files for testing -; -; Expected Test Results and Analysis -; -;********************************************************************** - -local logging = %liv (log_procedure) -%liv (log_procedure) = FALSE - -#include "ut_statusdefs.h" -#include "ut_cfe_info.h" -#include "cfe_platform_cfg.h" -#include "cfe_evs_events.h" -#include "cfe_es_events.h" -#include "to_lab_events.h" -#include "lc_platform_cfg.h" -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_events.h" -#include "tst_lc_events.h" - -%liv (log_procedure) = logging - -#define LCX_1003 0 -#define LCX_2003 1 -#define LCX_20032 2 -#define LCX_20033 3 -#define LCX_20034 4 -#define LCX_2004 5 -#define LCX_2005 6 -#define LCX_3001 7 -#define LCX_30011 8 -#define LCX_30012 9 -#define LCX_3002 10 -#define LCX_30021 11 -#define LCX_30022 12 -#define LCX_30023 13 -#define LCX_300231 14 -#define LCX_30024 15 -#define LCX_3003 16 -#define LCX_3004 17 -#define LCX_3005 18 -#define LCX_3006 19 -#define LCX_3007 20 -#define LCX_4000 21 -#define LCX_4001 22 -#define LCX_4002 23 -#define LCX_4003 24 -#define LCX_4004 25 -#define LCX_4005 26 -#define LCX_4006 27 -#define LCX_4007 28 -#define LCX_4009 29 -#define LCX_8000 30 -#define LCX_9000 31 -#define LCX_9001 32 -#define LCX_9002 33 - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 - -#define CMDFAIL 1 -#define CMDSUCCESS 2 -#define AP1_EVENTID 1 -#define AP2_EVENTID 2 -#define AP3_EVENTID 3 -#define AP4_EVENTID 4 -#define AP5_EVENTID 5 -#define AP6_EVENTID 6 -#define AP7_EVENTID 7 -#define AP8_EVENTID 8 -#define AP9_EVENTID 9 -#define AP10_EVENTID 10 -#define AP11_EVENTID 9 -#define AP12_EVENTID 10 - -global ut_req_array_size = 33 -global ut_requirement[0 .. ut_req_array_size] - -for i = 0 to ut_req_array_size DO - ut_requirement[i] = "U" -enddo - -;********************************************************************** -; Set the local values -;********************************************************************** - -local cfe_requirements[0 .. ut_req_array_size] = ["LCX_1003","LCX_2003", ;; - "LCX_2003.2","LCX_2003.3","LCX_2003.4","LCX_2004","LCX_2005","LCX_3001", ;; - "LCX_3001.1","LCX_3001.2","LCX_3002","LCX_3002.1","LCX_3002.2", ;; - "LCX_3002.3","LCX_3002.3.1","LCX_3002.4","LCX_3003","LCX_3004", ;; - "LCX_3005","LCX_3006", "LCX_3007","LCX_4000","LCX_4001","LCX_4002", ;; - "LCX_4003","LCX_4004","LCX_4005","LCX_4006","LCX_4007","LCX_4009", ;; - "LCX_8000","LCX_9000","LCX_9001","LCX_9002"] - -;********************************************************************** -; Define local variables -;********************************************************************** -LOCAL rawcmd -LOCAL stream1 -LOCAL index -LOCAL wpindex -LOCAL apindex -LOCAL ADTentries = 12 -LOCAL WDTentries = 30 -LOCAL CmdStatus -LOCAL State -Local rdlindex -Local maxwp = LC_MAX_WATCHPOINTS - 1 -Local maxap = LC_MAX_ACTIONPOINTS - 1 -local LCAppName = LC_APP_NAME -local ramDir = "RAM:0" -local defaultTblDir = "CF:0/apps" -local ARTTblName = LCAppName & ".LC_ART" -local ADTTblName = LCAppName & ".LC_ADT" -local WRTTblName = LCAppName & ".LC_WRT" -local WDTTblName = LCAppName & ".LC_WDT" - -write ";*********************************************************************" -write "; Step 1.0: Initialize the CPU for this test. " -write ";*********************************************************************" -write "; Step 1.1: Command a Power-On Reset on $CPU. " -write ";********************************************************************" -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write ";*********************************************************************" -write "; Step 1.2: Create the WDT and ADT table loads used for testing and " -write "; upload them to the proper location. Also, display the LC pages." -write ";********************************************************************" -s $SC_$CPU_lcx_wdt1 - -;; Parse the filename configuration parameters for the default table filenames -local wdtFileName = LC_WDT_FILENAME -local slashLoc = %locate(wdtFileName,"/") - -;; loop until all slashes are found for the Destination File Table Name -while (slashLoc <> 0) do - wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) - slashLoc = %locate(wdtFileName,"/") -enddo - -write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, "$CPU", "P") - -s $SC_$CPU_lcx_adt1 - -;; Parse the filename configuration parameters for the default table filenames -local adtFileName = LC_ADT_FILENAME -slashLoc = %locate(adtFileName,"/") - -;; loop until all slashes are found for the Actionpoint Definitaion Table Name -while (slashLoc <> 0) do - adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) - slashLoc = %locate(adtFileName,"/") -enddo - -write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" - -s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, "$CPU", "P") - -;; Display the pages -page $SC_$CPU_LC_HK -page $SC_$CPU_TST_LC_HK -page $SC_$CPU_LC_ADT -page $SC_$CPU_LC_WDT -page $SC_$CPU_LC_ART -page $SC_$CPU_LC_WRT - -write ";*********************************************************************" -write "; Step 1.3: Start the Limit Checker (LC) Application and " -write "; add any required subscriptions. " -write ";********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 - -s load_start_app (LCAppName,"$CPU", "LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - LC Application Started" - else - write " Failed - CFE_ES start Event Message for LC not received." - endif -else - write " Failed - LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'8A7' - -if ("$CPU" = "CPU2") then - stream1 = x'9A7' -elseif ("$CPU" = "CPU3") then - stream1 = x'AA7' -endif - -write "Sending command to add subscription for LC housekeeping packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -write ";**********************************************************************" -write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " -write "; add any required subscriptions. " -write ";**********************************************************************" -ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 - -s load_start_app ("TST_LC", "$CPU", "TST_LC_AppMain") - -; Wait for app startup events -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed - TST_LC Application Started" - else - write " Failed - CFE_ES start Event Message for TST_LC not received." - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed - TST_LC Application start Event Message not received." -endif - -;;; Need to set the stream based upon the cpu being used -;;; CPU1 is the default -stream1 = x'933' - -if ("$CPU" = "CPU2") then - stream1 = x'A33' -elseif ("$CPU" = "CPU3") then - stream1 = x'B33' -endif - -write "Sending command to add subscription for TST_LC HK packet." -/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' -wait 10 - -wait 5 - -write ";*********************************************************************" -write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " -write "; initialized to zero (0). " -write ";*********************************************************************" -;; Add the HK message receipt test -local hkPktId - -;; Set the SC HK packet ID based upon the cpu being used -;; CPU1 is the default -hkPktId = "p0A7" - -if ("$CPU" = "CPU2") then - hkPktId = "p1A7" -elseif ("$CPU" = "CPU3") then - hkPktId = "p2A7" -endif - -;; Verify the HK Packet is getting generated by waiting for the -;; sequencecount to increment twice -local seqTlmItem = hkPktId & "scnt" -local currSCnt = {seqTlmItem} -local expectedSCnt = currSCnt + 2 - -ut_tlmwait {seqTlmItem}, {expectedSCnt} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (8000) - Housekeeping packet is being generated." - ut_setrequirements LCX_8000, "P" -else - write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." - ut_setrequirements LCX_8000, "F" -endif - -;check initialization of housekeeping -if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; - ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) THEN -;; 255 because the WPs are all not measured - for wpindex = 1 to WPACKED do - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then - break - endif - enddo -;first check the 10 APs that are being used -;;255 is because they are disabled and not measured - for apindex = 1 to 10 do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then - break - endif - enddo -;then check the rest of the APs -;; 51 is because the APs are not used and not measured - for apindex = 11 to APACKED do - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then - break - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (9000) - WP or AP Housekeeping telemetry NOT initialized properly." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" - else - write "<*> Passed (9000) - Housekeeping telemetry initialized properly." - ut_setrequirements LCX_9000, "P" - endif -else - write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - - if (wpindex < WPACKED) then - write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus - endif - if (apindex < APACKED) then - write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus - endif - ut_setrequirements LCX_9000, "F" -endif - -;check initialization of WRT -;;; CPU1 is the default -local wrtID = "0FB9" - -if ("$CPU" = "CPU2") then - wrtID = "0FD7" -elseif ("$CPU" = "CPU3") then - wrtID = "0FF7" -endif - -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (9001) - Watchpoint Results Table NOT initialized at startup." - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_9001, "F" -else - write "<*> Passed (9001) - Watchpoint Results Table initialized properly." - ut_setrequirements LCX_9001, "P" -endif - -;check initialization of ART -;;; CPU1 is the default -local artID = "0FB8" - -if ("$CPU" = "CPU2") then - artID= "0FD6" -elseif ("$CPU" = "CPU3") then - artID = "0FF6" -endif - -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (9002) - Actionpoint Results Table NOT initialized at startup." - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_9002, "F" -else - write "<*> Passed (9002) - Actionpoint Results Table initialized properly." - ut_setrequirements LCX_9002, "P" -endif - -write ";*********************************************************************" -write "; Step 1.6: Enable DEBUG Event Messages " -write ";*********************************************************************" -local cmdctr = $SC_$CPU_EVS_CMDPC + 1 - -;; Enable DEBUG events for the LC and CFE_SB application ONLY -/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG - -ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed - Enable Debug events command sent properly." -else - write " Failed - Enable Debug events command." -endif - -write ";*********************************************************************" -write "; Step 2.0: Test LC Active, All AP disabled, WP cause a mix of " -write "; thresholds to be reached" -write ";*********************************************************************" -write "; Step 2.1: Send a Set LC Application State to Active Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 2.2 Send packets for all WP defined in WDT, data run 1" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("2.2",1) - -write ";*********************************************************************" -write "; Step 2.3 Send Sample Request for all 10 APs. Nothing should" -write "; happen since AP are disabled" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -write ";*********************************************************************" -write "; Step 2.4 Check housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; - ($SC_$CPU_LC_ACTIVEAPS = 0) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then - break - endif - elseif (wpindex >=3) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - -;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured -;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 6) then - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xff) then - break - endif - else - if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" -endif - -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC =", $SC_$CPU_LC_CMDPC - write " CMDEC =", $SC_$CPU_LC_CMDEC - write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT =", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT - write " WP in use =", $SC_$CPU_LC_WPSINUSE - write " Active APs =", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - - -write ";*********************************************************************" -write "; Step 2.5 Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index > 5) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2003.4;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_20034, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_20034, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 2.6 Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_30012, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - - -write ";*********************************************************************" -write "; Step 2.7 Reset all statistics" -write ";*********************************************************************" - -/$SC_$CPU_LC_RESETCTRS -wait 5 -/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF -wait 5 -/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF -wait 5 - -write ";*********************************************************************" -write "; Step 3.0: Test LC Active, All AP passive, WP cause a mix of " -write "; thresholds to be reached, AP cause a mix of results" -write ";*********************************************************************" -write "; Step 3.1: Send the Set State Commands" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4001) - Set LC Application State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else - write " Failed (1003;4001) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4001, "P" -else - write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4001, "F" -endif - -;; Set all APs to Passive -State = LC_APSTATE_PASSIVE -ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" - -if (ut_sc_status = UT_SC_Success) then - write "<*> Passed (1003;4006) - Set ALL AP State to Passive command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4006, "P" -else - write " Failed (1003;4006) - Set ALL AP State to Passive command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4006, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 3.2 Send packets for all WP defined in WDT, data run 1" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("3.2",1) - -write ";*********************************************************************" -write "; Step 3.3 Send Sample Request for all 12 APs. Also AP 9 should cause " -write "; event message to be generated about the RTS not being sent due to" -write "; AP being passive" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=8 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSIVE_FAIL_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3002.4) - Event message sent Passive AP Failed Max times but no RTS sent." - ut_setrequirements LCX_30024, "P" -else - write "<*> Failed (3002.4) - Event message not sent Passive AP Failed Max times but no RTS sent." - ut_setrequirements LCX_30024, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -wait 5 - -write ";*********************************************************************" -write "; Step 3.4 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_APSAMPLECNT = 12) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then - break - endif - elseif (wpindex >=3) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - - ;; for the 10 APs that are being used, - ;; should be 0xFF since they are disabled have not been measured - ;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 3) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x88) then - break - endif - elseif (apindex > 3) and (apindex <=6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x99) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (3002.4;8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_30024, "P" - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (3002.4;8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_30024, "F" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 3.5 Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index >= 0) and (index < 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index >= 6) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2004;3001) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_20034, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_20034, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 3.6 Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index >= 6) and (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_30012, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - - -write ";*********************************************************************" -write "; Step 3.7 Reset all statistics" -write ";*********************************************************************" - -/$SC_$CPU_LC_RESETCTRS -wait 5 -/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF -wait 5 -/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF -wait 5 - - -write ";*********************************************************************" -write "; Step 4.0: Test LC Active, AP a mix of states, WP cause a mix of " -write "; thresholds to be reached, AP cause a mix of results" -write ";*********************************************************************" -write "; Step 4.1: Send a Set All AP to Command" -write ";*********************************************************************" -State = LC_STATE_ACTIVE -/$SC_$CPU_LC_SETLCSTATE NewLCState=State -wait 5 - -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State -wait 2 -/$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State -wait 2 -/$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State -wait 2 -/$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State -wait 2 -/$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State -wait 2 -/$SC_$CPU_LC_SETAPSTATE APNumber=10 NewAPState=State -wait 2 -/$SC_$CPU_LC_SETAPSTATE APNumber=11 NewAPState=State -wait 2 - -State = LC_APSTATE_DISABLED -/$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State -wait 2 -/$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State -wait 2 -/$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State -wait 2 - -State = LC_APSTATE_PASSIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State -wait 2 -/$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State -wait 2 - -write ";*********************************************************************" -write "; Step 4.2 Send packets for all WP defined in WDT, data run 1" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("4.2",1) - -write ";*********************************************************************" -write "; Step 4.3 Send Sample Request for all 12 APs. Also AP 9 should cause " -write "; event message to be generated about an RTS being sent" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=8 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -local expectedEID = LC_BASE_AP_EID + 10 - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3002.3.1) - RTS Executed Event message sent." - ut_setrequirements LCX_300231, "P" -else - write "<*> Failed (3002.3.1) - RTS Executed Event message NOT sent." - ut_setrequirements LCX_300231, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -wait 5 - -write ";*********************************************************************" -write "; Step 4.4 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_APSAMPLECNT = 9) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; - ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 6) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then - break - endif - elseif (wpindex >=3) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - -;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured -;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex = 1) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xC4) then - break - endif - elseif (apindex = 2) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x8C) then - break - endif - elseif (apindex = 3) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif (apindex = 4) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xD5) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x99) then - break - endif - elseif (apindex = 6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (3002.4;8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_30024, "P" - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (3002.4;8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC =", $SC_$CPU_LC_CMDPC - write " CMDEC =", $SC_$CPU_LC_CMDEC - write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT =", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT - write " WP in use =", $SC_$CPU_LC_WPSINUSE - write " Active APs =", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_30024, "F" - ut_setrequirements LCX_8000, "F" -endif - - -write ";*********************************************************************" -write "; Step 4.5 Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index >= 0) and (index < 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <>0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index >= 6) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2003.4;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_20034, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_20034, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 4.6 Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 1) or (index = 2) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 4) or (index = 5) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif (index = 10) or (index = 11) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_30012, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - - -write ";*********************************************************************" -write "; Step 4.7 Reset all statistics" -write ";*********************************************************************" - -/$SC_$CPU_LC_RESETCTRS -wait 5 -/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF -wait 5 -/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF -wait 5 - - -write ";*********************************************************************" -write "; Step 5.0: Test LC Passive, AP all active, WP cause a mix of " -write "; thresholds to be reached, AP cause a mix of results" -write ";*********************************************************************" -write "; Step 5.1: Send a Set All AP to Command" -write ";*********************************************************************" -State = LC_STATE_PASSIVE -/$SC_$CPU_LC_SETLCSTATE NewLCState=State -wait 5 - -local cmdctr = $SC_$CPU_LC_CMDPC + 1 -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} -if (UT_TW_Status = UT_Success) then - write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4004, "P" -else - write " Failed (1003;4004) - Set ALL AP State to Active command." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4004, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 5.2 Send packets for all WP defined in WDT, data run 1" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("5.2",1) - -write ";*********************************************************************" -write "; Step 5.3 Send Sample Request for all 12 APs. Also AP 9 should cause " -write "; event message to be generated about the RTS not being sent due to" -write "; LC being passive" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=8 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ut_setupevents "$SC", "$CPU", {LCAppName}, TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_PASSIVE_FAIL_DBG_EID, "DEBUG", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -IF (UT_TW_Status = UT_Success) THEN - write "<*> Passed (3002.4) - Event message sent Passive AP Failed Max times but no RTS sent." - ut_setrequirements LCX_30024, "P" -else - write "<*> Failed (3002.4) - Event message not sent Passive AP Failed Max times but no RTS sent." - ut_setrequirements LCX_30024, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -wait 5 - - -write ";*********************************************************************" -write "; Step 5.4 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_APSAMPLECNT = 12) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 1) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 11) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then - break - endif - elseif (wpindex >=3) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - -;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured -;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 3) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif ((apindex > 3) and (apindex <=4)) or (apindex = 6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (3002.4;8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_30024, "P" - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (3002.4;8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_30024, "F" - ut_setrequirements LCX_8000, "F" -endif - - -write ";*********************************************************************" -write "; Step 5.5 Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index >= 0) and (index < 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <>0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index >= 6) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2003.4;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_20034, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_20034, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 5.6 Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif ((index >= 6) and (index < 9)) or (index >= 10) and (index < 12) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_30012, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - - -write ";*********************************************************************" -write "; Step 5.7 Reset all statistics" -write ";*********************************************************************" - -/$SC_$CPU_LC_RESETCTRS -wait 5 -/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF -wait 5 -/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF -wait 5 - - -write ";*********************************************************************" -write "; Step 6.0: Test LC Disabled, AP all active, WP would cause a mix of " -write "; thresholds to be reached, AP would cause a mix of results" -write ";*********************************************************************" -write "; Step 6.1: Send a Set All AP to Command" -write ";*********************************************************************" -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_DISABLED -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) then - write "<*> Passed (1003;4002) - Set LC Application State to Disabled command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Set LC Application State to Disabled command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4002, "P" -else - write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4002, "F" -endif - - -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - wait 5 - -write ";*********************************************************************" -write "; Step 6.2 Send packets for all WP defined in WDT, data run 1" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("6.2",1) - -write ";*********************************************************************" -write "; Step 6.3 Send Sample Request for all 12 APs. Nothing should happen" -write "; since LC is disabled" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -wait 5 - -write ";*********************************************************************" -write "; Step 6.4 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; - ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 12) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then - break - endif - elseif (wpindex >=3) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - - ;; for the 10 APs that are being used, - ;; should be 0xFF since they are disabled have not been measured - ;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 3) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif (apindex > 3) and (apindex <= 6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (3002.4;8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_30024, "P" - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (3002.4;8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_30024, "F" - ut_setrequirements LCX_8000, "F" -endif - - -write ";*********************************************************************" -write "; Step 6.5 Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index >= 0) and (index < 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <>0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index >= 6) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2003.4;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_20034, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_20034, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 6.6 Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index >= 6) and (index < ADTentries) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_30012, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - - -write ";*********************************************************************" -write "; Step 6.7 Reset all statistics" -write ";*********************************************************************" - -/$SC_$CPU_LC_RESETCTRS -wait 5 -/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF -wait 5 -/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF -wait 5 - -write ";*********************************************************************" -write "; Step 7.0: Test LC Active, All AP Active, 4 data run to test all " -write "; transitions. WP cause a mix of thresholds to be reached, AP cause a" -write "; mix of results" -write ";*********************************************************************" -write "; Step 7.1: Reload tables and send the Set LC Application State to " -write "; Active Command" -write ";*********************************************************************" - -start load_table("lc_def_wdt1.tbl", "$CPU") -wait 20 - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName" -wait 20 - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (2005) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_2005, "P" -else - write " Failed (2005) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_WDTVAL_INF_EID, "." - ut_setrequirements LCX_2005, "F" -endif -ut_sendcmd "$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName" -wait 10 - -start load_table("lc_def_adt1.tbl", "$CPU") -wait 20 - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 1 -ut_sendcmd "$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName" -wait 20 - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (3007) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_3007, "P" -else - write " Failed (3007) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_ADTVAL_INF_EID, "." - ut_setrequirements LCX_3007, "F" -endif -ut_sendcmd "$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName" -wait 10 - -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 -State = LC_STATE_ACTIVE -ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" - -if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then - write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN - write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" - ut_setrequirements LCX_1003, "P" - ut_setrequirements LCX_4000, "P" -else - write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." - ut_setrequirements LCX_1003, "F" - ut_setrequirements LCX_4000, "F" -endif - -State = LC_APSTATE_ACTIVE -/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State - -wait 5 - -write ";*********************************************************************" -write "; Step 7.2 Send packets for all WP defined in WDT, data run 1" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("7.2",1) - -write ";*********************************************************************" -write "; Step 7.3 Send Sample Request for all 10 APs." -write "; Will get a mix of results" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=8 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -;; expectedEID is defined in Step 4.3 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.3) - Received RTS event message" - ut_setrequirements LCX_30023, "P" - else - write " Failed (3002.3) - Did not receive RTS event message." - ut_setrequirements LCX_30023, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.3) - Did not receive RTS event message." - ut_setrequirements LCX_30023, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -wait 5 - -write ";*********************************************************************" -write "; Step 7.4 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; - ($SC_$CPU_LC_APSAMPLECNT = 12) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; - ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; - ($SC_$CPU_LC_ACTIVEAPS = 11) THEN - for wpindex = 1 to WPACKED do - if (wpindex = 1) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then - break - endif - elseif (wpindex = 2) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then - break - endif - elseif (wpindex >=3) and (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - - ;; for the 10 APs that are being used, - ;; should be 0xFF since they are disabled have not been measured - ;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex <= 3) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif (apindex = 4) or (apindex = 6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 7.5 Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index > 5) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2003.4;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_20034, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_20034, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 7.6 Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif ((index >= 6) and (index < 9)) or ;; - ((index >= 10) and (index < ADTentries)) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - write "<*> Failed (3002.3;3002.3.1) - ART shows APs fail max times not handled properly." - ut_setrequirements LCX_30023, "F" - ut_setrequirements LCX_300231, "F" - break - else - write "<*> Passed (3002.3;3002.3.1) - ART shows APs fail max times handled properly." - ut_setrequirements LCX_30023, "P" - ut_setrequirements LCX_300231, "P" - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_30012, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 7.7 Send data run 2" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("7.7",2) - -write ";*********************************************************************" -write "; Step 7.8 Send Sample Request for all 12 APs. Mix of results" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=2 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=3 EndAP=3 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_30021, "P" - else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" -endif - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=4 EndAP=4 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_30021, "P" - else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" -endif - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=5 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_30021, "P" - else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" -endif - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=6 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_30022, "P" - else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" -endif - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=7 EndAP=7 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_30022, "P" - else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" -endif - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=8 EndAP=8 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_30022, "P" - else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" -endif - - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=10 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -;; expectedEID is defined in Step 4.3 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "INFO", 2 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=11 EndAP=11 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.3) - Received RTS event message" - ut_setrequirements LCX_30023, "P" - else - write " Failed (3002.3) - Did not receive RTS event message." - ut_setrequirements LCX_30023, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.3) - Did not receive RTS event message." - ut_setrequirements LCX_30023, "F" -endif - -wait 5 - -write ";*********************************************************************" -write "; Step 7.9 Check housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_APSAMPLECNT = 24) AND ($SC_$CPU_LC_MONMSGCNT = 40) AND ;; - ($SC_$CPU_LC_RTSCNT = 2) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 10) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN - CmdStatus = CMDSUCCESS - if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x15) then - CmdStatus = CMDFAIL - wpindex = 1 - endif - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x50) then - CmdStatus = CMDFAIL - wpindex = 2 - endif - endif - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x01) then - CmdStatus = CMDFAIL - wpindex = 3 - endif - endif - - if (CmdStatus = CMDSUCCESS) then - for wpindex = 4 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - endif - - ;; for the 10 APs that are being used, - ;; should be 0x44 since they are active and pass - ;; rest should be 0x33 since they are not used and not measured - for apindex = 1 to APACKED do - if (apindex =1) or (apindex = 4) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif (apindex = 2) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x54) then - break - endif - elseif (apindex =3) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x94) then - break - endif - elseif (apindex = 6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 7.10 Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x45) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0230) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x130) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x542) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then - break - endif - elseif (index > 10) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2003.4;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_20034, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_20034, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 7.11 Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 3) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index >= 3) and (index < 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index >= 6) and (index < 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 11) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - write "<*> Failed (3002.3;3002.3.1) - ART shows APs fail max times not handled properly." - ut_setrequirements LCX_30023, "F" - ut_setrequirements LCX_300231, "F" - else - write "<*> Passed (3002.3;3002.3.1) - ART shows APs fail max times handled properly." - ut_setrequirements LCX_30023, "P" - ut_setrequirements LCX_300231, "P" - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_30012, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - -write ";*********************************************************************" -write "; Step 7.12 Send packets for all WP defined in WDT data run 3" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("7.12",3) - -write ";*********************************************************************" -write "; Step 7.13 Send Sample Request for all 12 APs. Mixed Results" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=1 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=2 EndAP=2 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_30021, "P" - else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" -endif - -expectedEID = LC_BASE_AP_EID + 4 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "CRITICAL", 2 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=3 EndAP=3 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.3) - Received RTS event message" - ut_setrequirements LCX_30023, "P" - else - write " Failed (3002.3) - Did not receive RTS event message." - ut_setrequirements LCX_30023, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.3) - Did not receive RTS event message." - ut_setrequirements LCX_30023, "F" -endif - - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=4 EndAP=4 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=5 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_30022, "P" - else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" -endif - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=6 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_30021, "P" - else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=7 EndAP=8 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_30022, "P" - else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" -endif - -expectedEID = LC_BASE_AP_EID + 9 -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "ERROR", 2 - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=10 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.3) - Received RTS event message" - ut_setrequirements LCX_30023, "P" - else - write " Failed (3002.3) - Did not receive RTS event message." - ut_setrequirements LCX_30023, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.3) - Did not receive RTS event message." - ut_setrequirements LCX_30023, "F" -endif - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=11 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -wait 5 - -write ";*********************************************************************" -write "; Step 7.14 Check housekeeping counters" -write ";*********************************************************************" -if ($SC_$CPU_LC_APSAMPLECNT = 36) AND ($SC_$CPU_LC_MONMSGCNT = 60) AND ;; - ($SC_$CPU_LC_RTSCNT = 4) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 8) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN - CmdStatus = CMDSUCCESS - - if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x05) then - CmdStatus = CMDFAIL - wpindex = 1 - endif - - if (CmdStatus = CMDSUCCESS) then - - if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x44) then - CmdStatus = CMDFAIL - wpindex = 2 - endif - endif - - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x05) then - CmdStatus = CMDFAIL - wpindex = 3 - endif - endif - - if (CmdStatus = CMDSUCCESS) then - for wpindex = 4 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - endif - - for apindex = 1 to APACKED do - if (apindex = 1) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then - break - endif - elseif (apindex = 2) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then - break - endif - elseif (apindex = 3) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x45) then - break - endif - elseif (apindex = 4) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x45) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x84) then - break - endif - elseif (apindex = 6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x99) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - -write ";*********************************************************************" -write "; Step 7.15 Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x1345) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0045) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0133) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0130) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00000542) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00ab1543) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then - break - endif - elseif (index > 10) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2003.4;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_20034, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_20034, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 7.16 Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index < 2) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - write "<*> Failed (3002.3;3002.3.1) - ART shows APs fail max times not handled properly." - ut_setrequirements LCX_30023, "F" - ut_setrequirements LCX_300231, "F" - break - else - write "<*> Passed (3002.3;3002.3.1) - ART shows APs fail max times handled properly." - ut_setrequirements LCX_30023, "P" - ut_setrequirements LCX_300231, "P" - endif - elseif (index= 3) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 3) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 3) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - write "<*> Failed (3002.3;3002.3.1) - ART shows APs fail max times not handled properly." - ut_setrequirements LCX_30023, "F" - ut_setrequirements LCX_300231, "F" - break - else - write "<*> Passed (3002.3;3002.3.1) - ART shows APs fail max times handled properly." - ut_setrequirements LCX_30023, "P" - ut_setrequirements LCX_300231, "P" - endif - elseif (index = 11) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 3) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 3) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_30012, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3006, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3006, "P" -endif - - -write ";*********************************************************************" -write "; Step 7.17 Send packets for all WP defined in WDT, data run 4" -write ";*********************************************************************" - -s $sc_$cpu_lcx_sendpackets("7.17",4) - -write ";*********************************************************************" -write "; Step 7.18 Send Sample Request for all 12 APs. Mixed results" -write ";*********************************************************************" - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=0 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=1 EndAP=1 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_30021, "P" - else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" -endif - - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=2 EndAP=3 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=4 EndAP=4 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_30022, "P" - else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" -endif - - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=5 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_30021, "P" - else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" -endif - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=6 EndAP=6 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_30022, "P" - else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" -endif - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=7 EndAP=7 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.1) - Received Pass to Fail transition event" - ut_setrequirements LCX_30021, "P" - else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.1) - Did not receive Pass to Fail transition event." - ut_setrequirements LCX_30021, "F" -endif - - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=8 EndAP=9 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 -ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=10 UpdateAge=0 -ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 -if (UT_TW_Status = UT_Success) THEN - if ($SC_$CPU_find_event[1].num_found_messages = 1) then - write "<*> Passed (3002.2) - Received Fail to Pass transition event" - ut_setrequirements LCX_30022, "P" - else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" - write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages - endif -else - write " Failed (3002.2) - Did not receive Fail to Pass transition event." - ut_setrequirements LCX_30022, "F" -endif - - -/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=11 EndAP=11 UpdateAge=0 -ut_tlmupdate $SC_$CPU_TST_LC_CMDPC - -wait 5 - -write ";*********************************************************************" -write "; Step 7.19 Check housekeeping counters" -write ";*********************************************************************" - -if ($SC_$CPU_LC_APSAMPLECNT = 48) AND ($SC_$CPU_LC_MONMSGCNT = 80) AND ;; - ($SC_$CPU_LC_RTSCNT = 4) AND ;; - ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 8) AND ;; - ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN - CmdStatus = CMDSUCCESS - - if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x01) then - CmdStatus = CMDFAIL - wpindex = 1 - endif - - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x11) then - CmdStatus = CMDFAIL - wpindex = 2 - endif - endif - - if (CmdStatus = CMDSUCCESS) then - if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x15) then - CmdStatus = CMDFAIL - wpindex = 3 - endif - endif - - if (CmdStatus = CMDSUCCESS) then - for wpindex = 4 to WPACKED do - if (wpindex <=7) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then - break - endif - elseif (wpindex = 8) then - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then - break - endif - else - if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then - break - endif - endif - enddo - endif - - for apindex = 1 to APACKED do - if (apindex = 1) or (apindex = 3) or (apindex = 4) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x54) then - break - endif - elseif (apindex = 2) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then - break - endif - elseif (apindex = 5) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x84) then - break - endif - elseif (apindex = 6) then - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x98) then - break - endif - else - if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then - break - endif - endif - enddo - - if (wpindex < WPACKED) OR (apindex < APACKED) then - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - if (wpindex < WPACKED) then - write " WP Packed index = ", wpindex - write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) - endif - - if (apindex < APACKED) then - write " AP Packed index = ", apindex - write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) - endif - ut_setrequirements LCX_8000, "F" - else - write "<*> Passed (8000) - Housekeeping telemetry updated properly." - ut_setrequirements LCX_8000, "P" - endif -else - write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." - write " CMDPC = ", $SC_$CPU_LC_CMDPC - write " CMDEC = ", $SC_$CPU_LC_CMDEC - write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE - write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT - write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT - write " RTSCNT = ", $SC_$CPU_LC_RTSCNT - write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT - write " WP in use = ", $SC_$CPU_LC_WPSINUSE - write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS - - write " Failed due to housekeeping counters so Packed Results were not checked" - ut_setrequirements LCX_8000, "F" -endif - - -write ";*********************************************************************" -write "; Step 7.20 Dump WRT and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", "$CPU", wrtID) -wait 5 - -for index = 0 to LC_MAX_WATCHPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x50) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x1345) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0045) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0133) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0130) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00000542) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00ab1543) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> $SC_$CPU_LC_WDT[index].ComparisonValue.UnSigned32) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then - break - endif - elseif (index > 10) and (index < WDTentries) then - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then -;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - else - if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; - ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; - ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; - ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_WATCHPOINTS-1) then - write " Failed (2003;2003.2;2003.3;2003.4;2004) - WRT show WPs not evaluated properly." - write " Error occurred at WP = ", index - write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults - write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount - write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount - write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount - write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount - write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue - write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue - ut_setrequirements LCX_2003, "F" - ut_setrequirements LCX_20032, "F" - ut_setrequirements LCX_20033, "F" - ut_setrequirements LCX_20034, "F" - ut_setrequirements LCX_2004, "F" -else - write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." - ut_setrequirements LCX_2003, "P" - ut_setrequirements LCX_20032, "P" - ut_setrequirements LCX_20033, "P" - ut_setrequirements LCX_20034, "P" - ut_setrequirements LCX_2004, "P" -endif - -write ";*********************************************************************" -write "; Step 7.21 Dump ART and check counters" -write ";*********************************************************************" -s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", "$CPU", artID) -wait 5 - -for index = 0 to LC_MAX_ACTIONPOINTS-1 do - if (index = 0) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 1) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 2) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 3) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 3) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 3) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif (index = 4) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 5) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 6) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 7) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 8) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - elseif (index = 9) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif (index = 10) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 3) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - elseif (index = 11) then - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 4) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 4) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then - break - endif - else - if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; - ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; - ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; - ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then - break - endif - endif -enddo - -if (index < LC_MAX_ACTIONPOINTS-1) then - write " Failed (3001;3001.1;3001.2;3002;3003;3004;3005;3006;4003;4005;4007;4009) - ART show APs not evaluated properly." - write " Error occurred at AP = ", index - write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult - write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState - write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount - write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount - write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount - write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount - write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount - ut_setrequirements LCX_3001, "F" - ut_setrequirements LCX_30011, "F" - ut_setrequirements LCX_30012, "F" - ut_setrequirements LCX_3002, "F" - ut_setrequirements LCX_3003, "F" - ut_setrequirements LCX_3004, "F" - ut_setrequirements LCX_3005, "F" - ut_setrequirements LCX_3006, "F" - ut_setrequirements LCX_4003, "F" - ut_setrequirements LCX_4005, "F" - ut_setrequirements LCX_4007, "F" - ut_setrequirements LCX_4009, "F" -else - write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3005;3006;4003;4005;4007;4009) - ART shows APs evaluated properly." - ut_setrequirements LCX_3001, "P" - ut_setrequirements LCX_30011, "P" - ut_setrequirements LCX_30012, "P" - ut_setrequirements LCX_3002, "P" - ut_setrequirements LCX_3003, "P" - ut_setrequirements LCX_3004, "P" - ut_setrequirements LCX_3005, "P" - ut_setrequirements LCX_3006, "P" - ut_setrequirements LCX_4003, "P" - ut_setrequirements LCX_4005, "P" - ut_setrequirements LCX_4007, "P" - ut_setrequirements LCX_4009, "P" -endif - -write ";*********************************************************************" -write "; Step 8.0: Clean-up" -write ";*********************************************************************" - -/$SC_$CPU_ES_POWERONRESET -wait 10 - -close_data_center -wait 75 - -cfe_startup $CPU -wait 5 - -write "**** Requirements Status Reporting" - -write "--------------------------" -write " Requirement(s) Report" -write "--------------------------" - -FOR i = 0 to ut_req_array_size DO - ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} -ENDDO - -drop ut_requirement ; needed to clear global variables -drop ut_req_array_size ; needed to clear global variables - -write ";*********************************************************************" -write "; End procedure $SC_$CPU_lcx_withaction " -write ";*********************************************************************" -ENDPROC +PROC $sc_$cpu_lc_withaction +;******************************************************************************* +; Test Name: lc_withaction +; Test Level: Build Verification +; Test Type: Functional +; +; Test Description +; The purpose of this test is to verify that Limit Checker (LC) +; functions properly when monitoring WatchPoints (WP). All WP evaluate to +; a mix of true, false, and stale. All ActionPoints (AP) evaluate to a mix +; of pass, fail, error, and stale so some actions will be taken. +; During this test the LC is set as follows: +; LC Active with all AP disabled. +; LC Active with all AP active. +; LC Active with all AP passive +; LC Active with AP in mix of states (active, passive, disabled, +; permanently disabled, unused) +; LC Passive with all AP active +; LC Disabled with all AP active +; +; The following WP true/false transitions and AP pass/fail transitions are +; tested: +; WP T/F Transitions Tested +; WP1 T, T, T, T WP7 F, T, F, T +; WP2 T, T, T, F WP8 F, T, T, F +; WP3 T, T, F, F WP9 F, T, T, T +; WP4 T, F, F, F WP10 F, F, T, T +; WP5 T, F, F, T WP11 F, F, F, T +; WP6 T, F, T, F WP12 F, F, F, F +; +; AP P/F Transitions Tested +; AP1 P, P, P, P AP7 F, P, F, P +; AP2 P, P, P, F AP8 F, P, P, F +; AP3 P, P, F, F AP9 F, P, P, P +; AP4 P, F, F, F AP10 F, F, P, P +; AP5 P, F, F, P AP11 F, F, F, P +; AP6 P, F, P, F AP12 F, F, F, F +; +; Requirements Tested +; LC1003 If LC accepts any command as valid, LC shall execute the +; command, increment the LC Valid Command Counter and issue an +; event message +; LC2003 Upon receipt of a message, LC shall compare the data in the +; message to the table-defined value using the table-defined +; comparison value and comparison operator for each data point +; defined in the Watchpoint Definition Table (WDT) if the LC +; Application State is one of the following: +; a) Active +; b) Passive +; LC2003.1 LC shall support the following comparison values: +; a) = +; b) != +; c) > +; d) >= +; e) < +; f) <= +; LC2003.2 If the WDT comparison operator specifies that a Custom Function +; shall be performed, LC shall apply the custon function to the +; data contained in the message +; LC2003.3 If the comparison result for a Watchpoint results in a False, +; LC shall set the Number of Consecutive True values to zero +; LC2004 For each Watchpoint, the flight software shall maintain the +; following statistics in the dump-only Watchpoint Results Table: +; a) The result of the last relational comparison (False, True, +; Error or Stale) +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) Most recent FALSE to TRUE transition value +; g) Most recent FALSE to TRUE transition timestamp +; h) Most recent TRUE to FALSE transition value +; i) Most recent TRUE to FALSE transition timestamp +; LC2005 Upon receipt of a table update indication, LC shall validate +; the Watchpoint Definition Table for the following: +; a) Valid operator +; b) Data size +; c) Message ID +; LC3001 Upon receipt of a Sample Request, LC shall process the request +; specified actionpoints defined in the Actionpoint Definition +; Table (ADT) if the LC Application State is one of the +; following: +; a) Active +; b) Passive +; LC3001.1 LC shall support the following Reverse Polish Operators: +; a) and +; b) or +; c) xor +; d) not +; e) equals +; LC3001.2 If the equation result for an Actionpoint results in a Pass, LC +; shall set the Number of Consecutive Fail values to zero +; LC3002 Each table-defined Actionpoint shall be evaluated and the +; results stored in the dump-only Actionpoint Results Table if the +; Actionpoint state is either: +; a) Active +; b) Passive +; LC3002.1 If the Actionpoint equation results in a transition from PASS to +; FAIL, LC shall issue an event message indicating the failure +; LC3002.1.1 If the PASS to FAIL transition event message has been sent for +; the table-defined number of times, LC shall apply the +; table-defined event message filter. +; LC3002.2 If the Actionpoint equation results in a transition from FAIL to +; PASS, LC shall issue an event message indicating that the +; actionpoint is now within limits +; LC3002.2.1 If the FAIL to PASS transition event message has been sent for +; the table-defined number of times, LC shall apply the +; table-defined event message filter. +; LC3002.3 If the equation has yielded a Fail result for the table-defined +; consecutive number of times limit and the Actionpoint is +; currently Active, LC shall: +; a) generate an event message +; b) send a command to start the table-defined RTS +; c) Increment the counter indicating Total count of commands +; sent to SC task to start an RTS +; LC3002.3.1 Once an RTS is initiated, LC shall change the current state of +; the associated Actionpoint to Passive. +; LC3002.4 If the equation has yielded a Fail result for the defined +; consecutive number of times and the Actionpoint is currently +; Passive, LC shall +; a) generate an event message indicating that the Actionpoint +; Failed but the action was not taken +; b) Increment the counter indicating Number of Start RTS +; commands NOT sent to SC task because LC Application is +; PASSIVE +; LC3003 If the Actionpoint is Disabled, LC shall skip processing that +; actionpoint +; LC3004 If the Actionpoint is Unused, LC shall skip processing that +; actionpoint +; LC3005 If the Actionpoint is Permanently Disabled, LC shall skip +; processing that actionpoint +; LC3006 For each Actionpoint, the flight software shall maintain the +; following statistics in the dump-only Actionpoint Results Table: +; a) The result of the last Sample(Pass,Fail,Error,Stale) +; b) The current state (PermOff,Disabled,Active,Passive,Unused) +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC3007 Upon receipt of a table update indication, LC shall validate +; the Actionpoint Definition Table for the following: +; a) valid default state +; b) RTS number (in range) +; c) Event Type (DEBUG,INFO,ERROR,CRITICAL) +; d) Failure Count (in range) +; e) Action Equation syntax +; LC4000 Upon receipt of a Set LC Application State To Active Command, +; LC shall set the state of the LC Application to Active +; LC4001 Upon receipt of a Set LC Application State to Passive Command, +; LC shall set the LC Application State to Passive +; LC4002 Upon receipt of a Set LC Application State to Disable Command, +; LC shall set the LC Application State to Disabled +; LC4003 Upon receipt of a Set Actionpoint to Active Command, LC shall +; set the state for the command-specified Actionpoint to ACTIVE +; such that the actionpoint is evaluated and the table-defined +; actions are taken based on the evaluation +; LC4004 Upon receipt of a Set All Actionpoints to Active Command, LC +; shall set the state for all Actionpoints to ACTIVE such that +; the actionpoints are evaluated and the table-defined actions are +; taken based on the evaluation +; LC4005 Upon receipt of a Set Actionpoint to Passive Command, LC shall +; set the state for the command-specified Actionpoint to PASSIVE +; such that the actionpoint is evaluated, however, no actions are +; taken +; LC4006 Upon receipt of a Set All Actionpoints to Passive Command, LC +; shall set the state for the all Actionpoints to PASSIVE such +; that all actionpoints are evaluated, however, no actions are +; taken +; LC4007 Upon receipt of a Set Actionpoint to Disabled Command, LC shall +; set the state for the command-specified Actionpoint to DISABLED +; such that the actionpoints are not evaluated and no actions are +; taken +; LC4009 Upon receipt of a Set Actionpoint to Permanent Disable, LC +; shall mark the command-specified Actionpoint such that the +; Actionpoint cannot be Activated +; LC8000 LC shall generate a housekeeping message containing the +; following: +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Number of Start RTS commands NOT sent to SC task because +; LC Application is PASSIVE +; d) Current LC Application State (LC_ACTIVE, LC_PASSIVE, +; LC_DISABLED)... +; e) Total count of actionpoints sampled while LC_ACTIVE or +; LC_PASSIVE... +; f) Total count of packets monitored for watchpoints (cmd and +; tlm) +; g) Total count of commands sent to SC task to start an RTS +; h) Selected data from watchpoint results table +; i) Selected data from actionpoint results table +; LC9000 Upon cFE Power-On LC shall initialize the following +; Housekeeping data to Zero (or value specified): +; a) Valid Command Counter +; b) Command Rejected Counter +; c) Passive RTS Execution Counter +; d) Current LC State to Default Power-on +; State +; e) Actionpoint Sample Count +; f) TLM Count +; g) RTS Execution Counter +; h) Watch Results (bitmapped) +; i) Action Results (bitmapped) +; LC9001 Upon cFE Power-On LC shall initialize the following Watchpoint +; data to Zero (or value specified) for all Watchpoints: +; a) The result of the last watchpoint relational comparison to +; STALE +; b) The number of times this Watchpoint has been compared +; c) The number of times this Watchpoint has crossed from the +; False to True result +; d) The number of consecutive times the comparison has yielded +; a True result +; e) The cumulative number of times the comparison has yielded a +; True result +; f) The value that caused the last False-to-True crossing, and +; the crossing time stamp +; g) The value that caused the last True-to-False crossing, and +; the crossing time stamp +; LC9002 Upon cFE Power-On LC shall initialize the following Actionpoint +; data to Zero (or value specified for all Actionpoints: +; a) The result of the last Actionpoint Sample to STALE +; b) The current state as defined in the ADT +; c) The number of times this Actionpoint has crossed from the +; Fail to Pass state +; d) The number of times this Actionpoint has crossed from the +; Pass to Fail state +; e) The number of consecutive times the equation result =Failed +; f) The cumulative number of times the equation result = Failed +; g) The cumulative count of the RTS executions +; h) Total number of event messages sent +; LC9005 Upon any initialization, LC shall validate the Watchpoint +; Definition Table for the following: +; a) valid operator +; b) data size +; c) Message ID +; LC9006 Upon any initialization, LC shall validate the Actionpoint +; Definition Table for the following: +; a) valid default state +; b) RTS number (in range) +; c) Event Type (DEBUG, INFO, ERROR, CRITICAL) +; d) Failure Count (in range) +; e) Action Equation syntax +; LC9007 Upon any initialization, LC shall subscribe to the messages +; defined in the WDT. +; +; Prerequisite Conditions +; The cFE is up and running and ready to accept commands. +; The LC commands and TLM items exist in the GSE database. +; A display page exists for the LC Housekeeping telemetry packet. +; LC Test application loaded and running +; +; Assumptions and Constraints +; None. +; +; Change History +; +; Date Name Description +; 08/10/12 Walt Moleski Original Procedure for LCX +; 05/10/17 W. Moleski Updated to use CPU1 for commanding and +; added a hostCPU variable for the utility +; procs to connect to the proper host. +; +; Arguments +; None. +; +; Procedures Called +; Name Description +; ut_tlmwait Wait for a specified telemetry point to update to +; a specified value. +; ut_sendcmd Send commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_sendrawcmd Send raw commands to the spacecraft. Verifies command +; processed and command error counters. +; ut_pfindicate Print the pass fail status of a particular requirement +; number. +; ut_setupevents Performs setup to verify that a particular event +; message was received by ASIST. +; ut_setrequirements A directive to set the status of the cFE +; requirements array. +; ftp_file Procedure to load file containing a table +; lc_wdt1 Sets up the Watchpoint Definition table files for testing +; lc_adt1 Sets up the Actionpoint Definition table files for testing +; +; Expected Test Results and Analysis +; +;********************************************************************** + +local logging = %liv (log_procedure) +%liv (log_procedure) = FALSE + +#include "ut_statusdefs.h" +#include "ut_cfe_info.h" +#include "cfe_platform_cfg.h" +#include "cfe_evs_events.h" +#include "cfe_es_events.h" +#include "to_lab_events.h" +#include "lc_platform_cfg.h" +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_events.h" +#include "tst_lc_events.h" + +%liv (log_procedure) = logging + +#define LC_1003 0 +#define LC_2003 1 +#define LC_20031 2 +#define LC_20032 3 +#define LC_20033 4 +#define LC_2004 5 +#define LC_2005 6 +#define LC_3001 7 +#define LC_30011 8 +#define LC_30012 9 +#define LC_3002 10 +#define LC_30021 11 +#define LC_30022 12 +#define LC_30023 13 +#define LC_300231 14 +#define LC_30024 15 +#define LC_3003 16 +#define LC_3004 17 +#define LC_3005 18 +#define LC_3006 19 +#define LC_3007 20 +#define LC_4000 21 +#define LC_4001 22 +#define LC_4002 23 +#define LC_4003 24 +#define LC_4004 25 +#define LC_4005 26 +#define LC_4006 27 +#define LC_4007 28 +#define LC_4009 29 +#define LC_8000 30 +#define LC_9000 31 +#define LC_9001 32 +#define LC_9002 33 + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1) / 2 + +#define CMDFAIL 1 +#define CMDSUCCESS 2 +#define AP1_EVENTID 1 +#define AP2_EVENTID 2 +#define AP3_EVENTID 3 +#define AP4_EVENTID 4 +#define AP5_EVENTID 5 +#define AP6_EVENTID 6 +#define AP7_EVENTID 7 +#define AP8_EVENTID 8 +#define AP9_EVENTID 9 +#define AP10_EVENTID 10 +#define AP11_EVENTID 9 +#define AP12_EVENTID 10 + +global ut_req_array_size = 33 +global ut_requirement[0 .. ut_req_array_size] + +for i = 0 to ut_req_array_size DO + ut_requirement[i] = "U" +enddo + +;********************************************************************** +; Set the local values +;********************************************************************** + +local cfe_requirements[0 .. ut_req_array_size] = ["LC_1003","LC_2003", ;; + "LC_2003.1","LC_2003.2","LC_2003.3","LC_2004","LC_2005","LC_3001", ;; + "LC_3001.1","LC_3001.2","LC_3002","LC_3002.1","LC_3002.2", ;; + "LC_3002.3","LC_3002.3.1","LC_3002.4","LC_3003","LC_3004", ;; + "LC_3005","LC_3006", "LC_3007","LC_4000","LC_4001","LC_4002", ;; + "LC_4003","LC_4004","LC_4005","LC_4006","LC_4007","LC_4009", ;; + "LC_8000","LC_9000","LC_9001","LC_9002"] + +;********************************************************************** +; Define local variables +;********************************************************************** +LOCAL rawcmd +LOCAL stream1 +LOCAL index +LOCAL wpindex +LOCAL apindex +LOCAL ADTentries = 12 +LOCAL WDTentries = 30 +LOCAL CmdStatus +LOCAL State +Local rdlindex +Local maxwp = LC_MAX_WATCHPOINTS - 1 +Local maxap = LC_MAX_ACTIONPOINTS - 1 +local LCAppName = LC_APP_NAME +local ramDir = "RAM:0" +local defaultTblDir = "CF:0/apps" +local ARTTblName = LCAppName & ".LC_ART" +local ADTTblName = LCAppName & ".LC_ADT" +local WRTTblName = LCAppName & ".LC_WRT" +local WDTTblName = LCAppName & ".LC_WDT" +local hostCPU = "$CPU" + +write ";*********************************************************************" +write "; Step 1.0: Initialize the CPU for this test. " +write ";*********************************************************************" +write "; Step 1.1: Command a Power-On Reset. " +write ";********************************************************************" +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write ";*********************************************************************" +write "; Step 1.2: Create the WDT and ADT table loads used for testing and " +write "; upload them to the proper location. Also, display the LC pages." +write ";********************************************************************" +s $SC_$CPU_lc_wdt1 + +;; Parse the filename configuration parameters for the default table filenames +local wdtFileName = LC_WDT_FILENAME +local slashLoc = %locate(wdtFileName,"/") + +;; loop until all slashes are found for the Destination File Table Name +while (slashLoc <> 0) do + wdtFileName = %substring(wdtFileName,slashLoc+1,%length(wdtFileName)) + slashLoc = %locate(wdtFileName,"/") +enddo + +write "==> Default LC Watchpoint Table filename = '",wdtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_wdt1.tbl", wdtFileName, hostCPU, "P") + +s $SC_$CPU_lc_adt1 + +;; Parse the filename configuration parameters for the default table filenames +local adtFileName = LC_ADT_FILENAME +slashLoc = %locate(adtFileName,"/") + +;; loop until all slashes are found for the Actionpoint Definitaion Table Name +while (slashLoc <> 0) do + adtFileName = %substring(adtFileName,slashLoc+1,%length(adtFileName)) + slashLoc = %locate(adtFileName,"/") +enddo + +write "==> Default LC Actionpoint Table filename = '",adtFileName,"'" + +s ftp_file(defaultTblDir, "lc_def_adt1.tbl", adtFileName, hostCPU, "P") + +;; Display the pages +page $SC_$CPU_LC_HK +page $SC_$CPU_TST_LC_HK +page $SC_$CPU_LC_ADT +page $SC_$CPU_LC_WDT +page $SC_$CPU_LC_ART +page $SC_$CPU_LC_WRT + +write ";*********************************************************************" +write "; Step 1.3: Start the Limit Checker (LC) Application and " +write "; add any required subscriptions. " +write ";********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_INIT_INF_EID, "INFO", 2 + +s load_start_app (LCAppName,hostCPU, "LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - LC Application Started" + else + write " Failed - CFE_ES start Event Message for LC not received." + endif +else + write " Failed - LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'8A7' + +if ("$CPU" = "CPU2") then + stream1 = x'9A7' +elseif ("$CPU" = "CPU3") then + stream1 = x'AA7' +endif + +write "Sending command to add subscription for LC housekeeping packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +write ";**********************************************************************" +write "; Step 1.4: Start the Limit Checker Test Application (TST_LC) and " +write "; add any required subscriptions. " +write ";**********************************************************************" +ut_setupevents "$SC", "$CPU", "CFE_ES", CFE_ES_START_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_INIT_INF_EID, "INFO", 2 + +s load_start_app ("TST_LC", hostCPU, "TST_LC_AppMain") + +; Wait for app startup events +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed - TST_LC Application Started" + else + write " Failed - CFE_ES start Event Message for TST_LC not received." + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed - TST_LC Application start Event Message not received." +endif + +;;; Need to set the stream based upon the cpu being used +;;; CPU1 is the default +stream1 = x'933' + +if ("$CPU" = "CPU2") then + stream1 = x'A33' +elseif ("$CPU" = "CPU3") then + stream1 = x'B33' +endif + +write "Sending command to add subscription for TST_LC HK packet." +/$SC_$CPU_TO_ADDPACKET Stream=stream1 Pkt_Size=x'0' Priority=x'0' Reliability=x'1' Buflimit=x'4' +wait 10 + +wait 5 + +write ";*********************************************************************" +write "; Step 1.5: Verify that the LC Housekeeping telemetry items are " +write "; initialized to zero (0). " +write ";*********************************************************************" +;; Add the HK message receipt test +local hkPktId + +;; Set the SC HK packet ID based upon the cpu being used +;; CPU1 is the default +hkPktId = "p0A7" + +if ("$CPU" = "CPU2") then + hkPktId = "p1A7" +elseif ("$CPU" = "CPU3") then + hkPktId = "p2A7" +endif + +;; Verify the HK Packet is getting generated by waiting for the +;; sequencecount to increment twice +local seqTlmItem = hkPktId & "scnt" +local currSCnt = {seqTlmItem} +local expectedSCnt = currSCnt + 2 + +ut_tlmwait {seqTlmItem}, {expectedSCnt} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (8000) - Housekeeping packet is being generated." + ut_setrequirements LC_8000, "P" +else + write " Failed (8000) - Housekeeping packet sequence count did not increment. Housekeeping packet is not being recieved." + ut_setrequirements LC_8000, "F" +endif + +;check initialization of housekeeping +if ($SC_$CPU_LC_CMDPC = 0) AND ($SC_$CPU_LC_CMDEC = 0) AND ;; + ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_POWER_ON_RESET) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) THEN +;; 255 because the WPs are all not measured + for wpindex = 1 to WPACKED do + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 255) then + break + endif + enddo +;first check the 10 APs that are being used +;;255 is because they are disabled and not measured + for apindex = 1 to 10 do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 255) then + break + endif + enddo +;then check the rest of the APs +;; 51 is because the APs are not used and not measured + for apindex = 11 to APACKED do + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 51) then + break + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (9000) - WP or AP Housekeeping telemetry NOT initialized properly." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" + else + write "<*> Passed (9000) - Housekeeping telemetry initialized properly." + ut_setrequirements LC_9000, "P" + endif +else + write " Failed (9000) - Housekeeping telemetry NOT initialized at startup." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + + if (wpindex < WPACKED) then + write " WP Packed Results = ", $SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus + endif + if (apindex < APACKED) then + write " AP Packed Results = ", $SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus + endif + ut_setrequirements LC_9000, "F" +endif + +;check initialization of WRT +;;; CPU1 is the default +local wrtID = "0FB9" + +if ("$CPU" = "CPU2") then + wrtID = "0FD7" +elseif ("$CPU" = "CPU3") then + wrtID = "0FF7" +endif + +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (9001) - Watchpoint Results Table NOT initialized at startup." + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_9001, "F" +else + write "<*> Passed (9001) - Watchpoint Results Table initialized properly." + ut_setrequirements LC_9001, "P" +endif + +;check initialization of ART +;;; CPU1 is the default +local artID = "0FB8" + +if ("$CPU" = "CPU2") then + artID= "0FD6" +elseif ("$CPU" = "CPU3") then + artID = "0FF6" +endif + +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (9002) - Actionpoint Results Table NOT initialized at startup." + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_9002, "F" +else + write "<*> Passed (9002) - Actionpoint Results Table initialized properly." + ut_setrequirements LC_9002, "P" +endif + +write ";*********************************************************************" +write "; Step 1.6: Enable DEBUG Event Messages " +write ";*********************************************************************" +local cmdctr = $SC_$CPU_EVS_CMDPC + 1 + +;; Enable DEBUG events for the LC and CFE_SB application ONLY +/$SC_$CPU_EVS_EnaAppEVTType Application=LCAppName DEBUG + +ut_tlmwait $SC_$CPU_EVS_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed - Enable Debug events command sent properly." +else + write " Failed - Enable Debug events command." +endif + +write ";*********************************************************************" +write "; Step 2.0: Test LC Active, All AP disabled, WP cause a mix of " +write "; thresholds to be reached" +write ";*********************************************************************" +write "; Step 2.1: Send a Set LC Application State to Active Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 2.2 Send packets for all WP defined in WDT, data run 1" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("2.2",1) + +write ";*********************************************************************" +write "; Step 2.3 Send Sample Request for all 12 APs. Nothing should" +write "; happen since AP are disabled" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +write ";*********************************************************************" +write "; Step 2.4 Check housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE = LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; + ($SC_$CPU_LC_ACTIVEAPS = 0) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then + break + endif + elseif (wpindex >=3) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + +;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured +;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 6) then + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xff) then + break + endif + else + if($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" +endif + +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC =", $SC_$CPU_LC_CMDPC + write " CMDEC =", $SC_$CPU_LC_CMDEC + write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT =", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT + write " WP in use =", $SC_$CPU_LC_WPSINUSE + write " Active APs =", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + + +write ";*********************************************************************" +write "; Step 2.5 Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index > 5) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 2.6 Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_30012, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + + +write ";*********************************************************************" +write "; Step 2.7 Reset all statistics" +write ";*********************************************************************" + +/$SC_$CPU_LC_RESETCTRS +wait 5 +/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF +wait 5 +/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF +wait 5 + +write ";*********************************************************************" +write "; Step 3.0: Test LC Active, All AP passive, WP cause a mix of " +write "; thresholds to be reached, AP cause a mix of results" +write ";*********************************************************************" +write "; Step 3.1: Send the Set State Commands" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4001) - Set LC Application State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else + write " Failed (1003;4001) - Set LC Application State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4001) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4001, "P" +else + write " Failed (1003;4001) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4001, "F" +endif + +;; Set all APs to Passive +State = LC_APSTATE_PASSIVE +ut_sendcmd "$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State" + +if (ut_sc_status = UT_SC_Success) then + write "<*> Passed (1003;4006) - Set ALL AP State to Passive command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4006, "P" +else + write " Failed (1003;4006) - Set ALL AP State to Passive command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4006, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 3.2 Send packets for all WP defined in WDT, data run 1" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("3.2",1) + +write ";*********************************************************************" +write "; Step 3.3 Send Sample Request for all 12 APs. Also AP 9 should cause " +write "; event message to be generated about the RTS not being sent due to" +write "; AP being passive" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=8 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSIVE_FAIL_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3002.4) - Event message sent Passive AP Failed Max times but no RTS sent." + ut_setrequirements LC_30024, "P" +else + write "<*> Failed (3002.4) - Event message not sent Passive AP Failed Max times but no RTS sent." + ut_setrequirements LC_30024, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +wait 5 + +write ";*********************************************************************" +write "; Step 3.4 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_APSAMPLECNT = 12) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then + break + endif + elseif (wpindex >=3) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + + ;; for the 10 APs that are being used, + ;; should be 0xFF since they are disabled have not been measured + ;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 3) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x88) then + break + endif + elseif (apindex > 3) and (apindex <=6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x99) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (3002.4;8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_30024, "P" + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (3002.4;8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_30024, "F" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 3.5 Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index >= 0) and (index < 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index >= 6) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2003.3;2004;3001) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 3.6 Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index >= 6) and (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_30012, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + + +write ";*********************************************************************" +write "; Step 3.7 Reset all statistics" +write ";*********************************************************************" + +/$SC_$CPU_LC_RESETCTRS +wait 5 +/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF +wait 5 +/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF +wait 5 + +write ";*********************************************************************" +write "; Step 4.0: Test LC Active, AP a mix of states, WP cause a mix of " +write "; thresholds to be reached, AP cause a mix of results" +write ";*********************************************************************" +write "; Step 4.1: Send a Set All AP to Command" +write ";*********************************************************************" +State = LC_STATE_ACTIVE +/$SC_$CPU_LC_SETLCSTATE NewLCState=State +wait 5 + +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0 NewAPState=State +wait 2 +/$SC_$CPU_LC_SETAPSTATE APNumber=4 NewAPState=State +wait 2 +/$SC_$CPU_LC_SETAPSTATE APNumber=5 NewAPState=State +wait 2 +/$SC_$CPU_LC_SETAPSTATE APNumber=6 NewAPState=State +wait 2 +/$SC_$CPU_LC_SETAPSTATE APNumber=9 NewAPState=State +wait 2 +/$SC_$CPU_LC_SETAPSTATE APNumber=10 NewAPState=State +wait 2 +/$SC_$CPU_LC_SETAPSTATE APNumber=11 NewAPState=State +wait 2 + +State = LC_APSTATE_DISABLED +/$SC_$CPU_LC_SETAPSTATE APNumber=1 NewAPState=State +wait 2 +/$SC_$CPU_LC_SETAPSTATE APNumber=2 NewAPState=State +wait 2 +/$SC_$CPU_LC_SETAPSTATE APNumber=7 NewAPState=State +wait 2 + +State = LC_APSTATE_PASSIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=3 NewAPState=State +wait 2 +/$SC_$CPU_LC_SETAPSTATE APNumber=8 NewAPState=State +wait 2 + +write ";*********************************************************************" +write "; Step 4.2 Send packets for all WP defined in WDT, data run 1" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("4.2",1) + +write ";*********************************************************************" +write "; Step 4.3 Send Sample Request for all 12 APs. Also AP 9 should cause " +write "; event message to be generated about an RTS being sent" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=8 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +local expectedEID = LC_BASE_AP_EID + 10 + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3002.3.1) - RTS Executed Event message sent." + ut_setrequirements LC_300231, "P" +else + write "<*> Failed (3002.3.1) - RTS Executed Event message NOT sent." + ut_setrequirements LC_300231, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +wait 5 + +write ";*********************************************************************" +write "; Step 4.4 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_APSAMPLECNT = 9) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; + ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 6) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then + break + endif + elseif (wpindex >=3) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + +;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured +;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex = 1) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xC4) then + break + endif + elseif (apindex = 2) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x8C) then + break + endif + elseif (apindex = 3) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif (apindex = 4) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0xD5) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x99) then + break + endif + elseif (apindex = 6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (3002.4;8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_30024, "P" + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (3002.4;8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC =", $SC_$CPU_LC_CMDPC + write " CMDEC =", $SC_$CPU_LC_CMDEC + write " CURLCSTATE =", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT =", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT =", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT =", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT =", $SC_$CPU_LC_PASSRTSCNT + write " WP in use =", $SC_$CPU_LC_WPSINUSE + write " Active APs =", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_30024, "F" + ut_setrequirements LC_8000, "F" +endif + + +write ";*********************************************************************" +write "; Step 4.5 Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index >= 0) and (index < 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <>0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index >= 6) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 4.6 Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 1) or (index = 2) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 4) or (index = 5) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_DISABLED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif (index = 10) or (index = 11) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_30012, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + + +write ";*********************************************************************" +write "; Step 4.7 Reset all statistics" +write ";*********************************************************************" + +/$SC_$CPU_LC_RESETCTRS +wait 5 +/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF +wait 5 +/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF +wait 5 + +write ";*********************************************************************" +write "; Step 5.0: Test LC Passive, AP all active, WP cause a mix of " +write "; thresholds to be reached, AP cause a mix of results" +write ";*********************************************************************" +write "; Step 5.1: Send a Set All AP to Command" +write ";*********************************************************************" +State = LC_STATE_PASSIVE +/$SC_$CPU_LC_SETLCSTATE NewLCState=State +wait 5 + +local cmdctr = $SC_$CPU_LC_CMDPC + 1 +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +ut_tlmwait $SC_$CPU_LC_CMDPC, {cmdctr} +if (UT_TW_Status = UT_Success) then + write "<*> Passed (1003;4004) - Set ALL AP State to Active command sent properly." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4004, "P" +else + write " Failed (1003;4004) - Set ALL AP State to Active command." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4004, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 5.2 Send packets for all WP defined in WDT, data run 1" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("5.2",1) + +write ";*********************************************************************" +write "; Step 5.3 Send Sample Request for all 12 APs. Also AP 9 should cause " +write "; event message to be generated about the RTS not being sent due to" +write "; LC being passive" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=8 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ut_setupevents "$SC", "$CPU", {LCAppName}, TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_PASSIVE_FAIL_DBG_EID, "DEBUG", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +IF (UT_TW_Status = UT_Success) THEN + write "<*> Passed (3002.4) - Event message sent Passive AP Failed Max times but no RTS sent." + ut_setrequirements LC_30024, "P" +else + write "<*> Failed (3002.4) - Event message not sent Passive AP Failed Max times but no RTS sent." + ut_setrequirements LC_30024, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +wait 5 + + +write ";*********************************************************************" +write "; Step 5.4 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_APSAMPLECNT = 12) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 1) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 11) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_PASSIVE) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then + break + endif + elseif (wpindex >=3) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + +;; for the 10 APs that are being used, should be 0xFF since they are disabled have not been measured +;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 3) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif ((apindex > 3) and (apindex <=4)) or (apindex = 6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (3002.4;8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_30024, "P" + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (3002.4;8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_30024, "F" + ut_setrequirements LC_8000, "F" +endif + + +write ";*********************************************************************" +write "; Step 5.5 Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index >= 0) and (index < 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <>0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index >= 6) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 5.6 Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif ((index >= 6) and (index < 9)) or (index >= 10) and (index < 12) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_30012, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + + +write ";*********************************************************************" +write "; Step 5.7 Reset all statistics" +write ";*********************************************************************" + +/$SC_$CPU_LC_RESETCTRS +wait 5 +/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF +wait 5 +/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF +wait 5 + +write ";*********************************************************************" +write "; Step 6.0: Test LC Disabled, AP all active, WP would cause a mix of " +write "; thresholds to be reached, AP would cause a mix of results" +write ";*********************************************************************" +write "; Step 6.1: Send a Set All AP to Command" +write ";*********************************************************************" +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_DISABLED +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) then + write "<*> Passed (1003;4002) - Set LC Application State to Disabled command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Set LC Application State to Disabled command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4002) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4002, "P" +else + write " Failed (1003;4002) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4002, "F" +endif + + +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + wait 5 + +write ";*********************************************************************" +write "; Step 6.2 Send packets for all WP defined in WDT, data run 1" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("6.2",1) + +write ";*********************************************************************" +write "; Step 6.3 Send Sample Request for all 12 APs. Nothing should happen" +write "; since LC is disabled" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +wait 5 + +write ";*********************************************************************" +write "; Step 6.4 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_APSAMPLECNT = 0) AND ($SC_$CPU_LC_MONMSGCNT = 0) AND ;; + ($SC_$CPU_LC_RTSCNT = 0) AND ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 12) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_DISABLED) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then + break + endif + elseif (wpindex >=3) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + + ;; for the 10 APs that are being used, + ;; should be 0xFF since they are disabled have not been measured + ;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 3) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif (apindex > 3) and (apindex <= 6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (3002.4;8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_30024, "P" + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (3002.4;8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_30024, "F" + ut_setrequirements LC_8000, "F" +endif + + +write ";*********************************************************************" +write "; Step 6.5 Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index >= 0) and (index < 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <>0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index >= 6) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.2;2003.3;2003.4;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 6.6 Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index >= 6) and (index < ADTentries) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_30012, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + + +write ";*********************************************************************" +write "; Step 6.7 Reset all statistics" +write ";*********************************************************************" + +/$SC_$CPU_LC_RESETCTRS +wait 5 +/$SC_$CPU_LC_RESETWPSTATS WPNumber=0xFFFF +wait 5 +/$SC_$CPU_LC_RESETAPSTATS APNumber=0xFFFF +wait 5 + +write ";*********************************************************************" +write "; Step 7.0: Test LC Active, All AP Active, 4 data run to test all " +write "; transitions. WP cause a mix of thresholds to be reached, AP cause a" +write "; mix of results" +write ";*********************************************************************" +write "; Step 7.1: Reload tables and send the Set LC Application State to " +write "; Active Command" +write ";*********************************************************************" + +start load_table("lc_def_wdt1.tbl", hostCPU) +wait 20 + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_WDTVAL_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=WDTTblName" +wait 20 + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (2005) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_2005, "P" +else + write " Failed (2005) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_WDTVAL_INF_EID, "." + ut_setrequirements LC_2005, "F" +endif +ut_sendcmd "$SC_$CPU_TBL_ACTIVATE ATABLENAME=WDTTblName" +wait 10 + +start load_table("lc_def_adt1.tbl", hostCPU) +wait 20 + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_ADTVAL_INF_EID, "INFO", 1 +ut_sendcmd "$SC_$CPU_TBL_VALIDATE INACTIVE VTABLENAME=ADTTblName" +wait 20 + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (3007) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_3007, "P" +else + write " Failed (3007) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_ADTVAL_INF_EID, "." + ut_setrequirements LC_3007, "F" +endif +ut_sendcmd "$SC_$CPU_TBL_ACTIVATE ATABLENAME=ADTTblName" +wait 10 + +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_LCSTATE_INF_EID, "INFO", 1 +State = LC_STATE_ACTIVE +ut_sendcmd "$SC_$CPU_LC_SETLCSTATE NewLCState=State" + +if (ut_sc_status = UT_SC_Success) and ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) then + write "<*> Passed (1003;4000) - Set LC Application State to Active command properly sent." + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Set LC Application State to Active command not sent properly (", ut_sc_status, ")." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +if ($SC_$CPU_find_event[1].num_found_messages = 1) THEN + write "<*> Passed (1003;4000) - Event message ",$SC_$CPU_find_event[1].eventid, " received" + ut_setrequirements LC_1003, "P" + ut_setrequirements LC_4000, "P" +else + write " Failed (1003;4000) - Event message ",$SC_$CPU_evs_eventid," received. Expected Event message ",LC_LCSTATE_INF_EID, "." + ut_setrequirements LC_1003, "F" + ut_setrequirements LC_4000, "F" +endif + +State = LC_APSTATE_ACTIVE +/$SC_$CPU_LC_SETAPSTATE APNumber=0xFFFF NewAPState=State + +wait 5 + +write ";*********************************************************************" +write "; Step 7.2 Send packets for all WP defined in WDT, data run 1" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("7.2",1) + +write ";*********************************************************************" +write "; Step 7.3 Send Sample Request for all 12 APs." +write "; Will get a mix of results" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=8 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +;; expectedEID is defined in Step 4.3 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.3) - Received RTS event message" + ut_setrequirements LC_30023, "P" + else + write " Failed (3002.3) - Did not receive RTS event message." + ut_setrequirements LC_30023, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.3) - Did not receive RTS event message." + ut_setrequirements LC_30023, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +wait 5 + +write ";*********************************************************************" +write "; Step 7.4 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_PASSRTSCNT = 0) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) AND ;; + ($SC_$CPU_LC_APSAMPLECNT = 12) AND ($SC_$CPU_LC_MONMSGCNT = 20) AND ;; + ($SC_$CPU_LC_RTSCNT = 1) AND ($SC_$CPU_LC_WPSINUSE = 30) AND ;; + ($SC_$CPU_LC_ACTIVEAPS = 11) THEN + for wpindex = 1 to WPACKED do + if (wpindex = 1) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x55) then + break + endif + elseif (wpindex = 2) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0x5) then + break + endif + elseif (wpindex >=3) and (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + + ;; for the 10 APs that are being used, + ;; should be 0xFF since they are disabled have not been measured + ;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex <= 3) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif (apindex = 4) or (apindex = 6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", $SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 7.5 Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <>0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x54) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x230) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index > 5) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 7.6 Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif ((index >= 6) and (index < 9)) or ;; + ((index >= 10) and (index < ADTentries)) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + write "<*> Failed (3002.3;3002.3.1) - ART shows APs fail max times not handled properly." + ut_setrequirements LC_30023, "F" + ut_setrequirements LC_300231, "F" + break + else + write "<*> Passed (3002.3;3002.3.1) - ART shows APs fail max times handled properly." + ut_setrequirements LC_30023, "P" + ut_setrequirements LC_300231, "P" + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_30012, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 7.7 Send data run 2" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("7.7",2) + +write ";*********************************************************************" +write "; Step 7.8 Send Sample Request for all 12 APs. Mix of results" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=2 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=3 EndAP=3 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_30021, "P" + else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" +endif + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=4 EndAP=4 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_30021, "P" + else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" +endif + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=5 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_30021, "P" + else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" +endif + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=6 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_30022, "P" + else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" +endif + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=7 EndAP=7 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_30022, "P" + else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" +endif + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=8 EndAP=8 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_30022, "P" + else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" +endif + + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=10 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +;; expectedEID is defined in Step 4.3 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "INFO", 2 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=11 EndAP=11 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.3) - Received RTS event message" + ut_setrequirements LC_30023, "P" + else + write " Failed (3002.3) - Did not receive RTS event message." + ut_setrequirements LC_30023, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.3) - Did not receive RTS event message." + ut_setrequirements LC_30023, "F" +endif + +wait 5 + +write ";*********************************************************************" +write "; Step 7.9 Check housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_APSAMPLECNT = 24) AND ($SC_$CPU_LC_MONMSGCNT = 40) AND ;; + ($SC_$CPU_LC_RTSCNT = 2) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 10) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN + CmdStatus = CMDSUCCESS + if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x15) then + CmdStatus = CMDFAIL + wpindex = 1 + endif + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x50) then + CmdStatus = CMDFAIL + wpindex = 2 + endif + endif + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x01) then + CmdStatus = CMDFAIL + wpindex = 3 + endif + endif + + if (CmdStatus = CMDSUCCESS) then + for wpindex = 4 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + endif + + ;; for the 10 APs that are being used, + ;; should be 0x44 since they are active and pass + ;; rest should be 0x33 since they are not used and not measured + for apindex = 1 to APACKED do + if (apindex =1) or (apindex = 4) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif (apindex = 2) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x54) then + break + endif + elseif (apindex =3) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x55) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x94) then + break + endif + elseif (apindex = 6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 7.10 Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x45) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0230) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x130) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x542) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then + break + endif + elseif (index > 10) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 7.11 Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 3) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index >= 3) and (index < 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index >= 6) and (index < 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 11) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + write "<*> Failed (3002.3;3002.3.1) - ART shows APs fail max times not handled properly." + ut_setrequirements LC_30023, "F" + ut_setrequirements LC_300231, "F" + else + write "<*> Passed (3002.3;3002.3.1) - ART shows APs fail max times handled properly." + ut_setrequirements LC_30023, "P" + ut_setrequirements LC_300231, "P" + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_30012, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + +write ";*********************************************************************" +write "; Step 7.12 Send packets for all WP defined in WDT data run 3" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("7.12",3) + +write ";*********************************************************************" +write "; Step 7.13 Send Sample Request for all 12 APs. Mixed Results" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=1 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=2 EndAP=2 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_30021, "P" + else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" +endif + +expectedEID = LC_BASE_AP_EID + 4 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "CRITICAL", 2 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=3 EndAP=3 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.3) - Received RTS event message" + ut_setrequirements LC_30023, "P" + else + write " Failed (3002.3) - Did not receive RTS event message." + ut_setrequirements LC_30023, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.3) - Did not receive RTS event message." + ut_setrequirements LC_30023, "F" +endif + + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=4 EndAP=4 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=5 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_30022, "P" + else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" +endif + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=6 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_30021, "P" + else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=7 EndAP=8 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=9 EndAP=9 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_30022, "P" + else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" +endif + +expectedEID = LC_BASE_AP_EID + 9 +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, {expectedEID}, "ERROR", 2 + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=10 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.3) - Received RTS event message" + ut_setrequirements LC_30023, "P" + else + write " Failed (3002.3) - Did not receive RTS event message." + ut_setrequirements LC_30023, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.3) - Did not receive RTS event message." + ut_setrequirements LC_30023, "F" +endif + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=11 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +wait 5 + +write ";*********************************************************************" +write "; Step 7.14 Check housekeeping counters" +write ";*********************************************************************" +if ($SC_$CPU_LC_APSAMPLECNT = 36) AND ($SC_$CPU_LC_MONMSGCNT = 60) AND ;; + ($SC_$CPU_LC_RTSCNT = 4) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 8) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN + CmdStatus = CMDSUCCESS + + if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x05) then + CmdStatus = CMDFAIL + wpindex = 1 + endif + + if (CmdStatus = CMDSUCCESS) then + + if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x44) then + CmdStatus = CMDFAIL + wpindex = 2 + endif + endif + + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x05) then + CmdStatus = CMDFAIL + wpindex = 3 + endif + endif + + if (CmdStatus = CMDSUCCESS) then + for wpindex = 4 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + endif + + for apindex = 1 to APACKED do + if (apindex = 1) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x44) then + break + endif + elseif (apindex = 2) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then + break + endif + elseif (apindex = 3) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x45) then + break + endif + elseif (apindex = 4) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x45) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x84) then + break + endif + elseif (apindex = 6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x99) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + +write ";*********************************************************************" +write "; Step 7.15 Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x1345) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0045) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0133) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0130) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00000542) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00ab1543) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then + break + endif + elseif (index > 10) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 7.16 Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index < 2) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + write "<*> Failed (3002.3;3002.3.1) - ART shows APs fail max times not handled properly." + ut_setrequirements LC_30023, "F" + ut_setrequirements LC_300231, "F" + break + else + write "<*> Passed (3002.3;3002.3.1) - ART shows APs fail max times handled properly." + ut_setrequirements LC_30023, "P" + ut_setrequirements LC_300231, "P" + endif + elseif (index= 3) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 3) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 3) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + write "<*> Failed (3002.3;3002.3.1) - ART shows APs fail max times not handled properly." + ut_setrequirements LC_30023, "F" + ut_setrequirements LC_300231, "F" + break + else + write "<*> Passed (3002.3;3002.3.1) - ART shows APs fail max times handled properly." + ut_setrequirements LC_30023, "P" + ut_setrequirements LC_300231, "P" + endif + elseif (index = 11) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 3) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 3) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_30012, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3006, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3006) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3006, "P" +endif + + +write ";*********************************************************************" +write "; Step 7.17 Send packets for all WP defined in WDT, data run 4" +write ";*********************************************************************" + +s $sc_$cpu_lc_sendpackets("7.17",4) + +write ";*********************************************************************" +write "; Step 7.18 Send Sample Request for all 12 APs. Mixed results" +write ";*********************************************************************" + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=0 EndAP=0 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=1 EndAP=1 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_30021, "P" + else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" +endif + + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=2 EndAP=3 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=4 EndAP=4 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_30022, "P" + else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" +endif + + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=5 EndAP=5 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_30021, "P" + else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" +endif + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=6 EndAP=6 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_30022, "P" + else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" +endif + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_PASSTOFAIL_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=7 EndAP=7 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.1) - Received Pass to Fail transition event" + ut_setrequirements LC_30021, "P" + else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.1) - Did not receive Pass to Fail transition event." + ut_setrequirements LC_30021, "F" +endif + + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=8 EndAP=9 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +ut_setupevents "$SC", "$CPU", "TST_LC", TST_LC_SEND_SAMPLE_INF_EID, "INFO", 1 +ut_setupevents "$SC", "$CPU", {LCAppName}, LC_AP_FAILTOPASS_INF_EID, "INFO", 2 +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=10 EndAP=10 UpdateAge=0 +ut_tlmwait $SC_$CPU_find_event[2].num_found_messages, 1 +if (UT_TW_Status = UT_Success) THEN + if ($SC_$CPU_find_event[1].num_found_messages = 1) then + write "<*> Passed (3002.2) - Received Fail to Pass transition event" + ut_setrequirements LC_30022, "P" + else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" + write "Event Message count = ",$SC_$CPU_find_event[1].num_found_messages + endif +else + write " Failed (3002.2) - Did not receive Fail to Pass transition event." + ut_setrequirements LC_30022, "F" +endif + + +/$SC_$CPU_TST_LC_SENDSAMPLE StartAP=11 EndAP=11 UpdateAge=0 +ut_tlmupdate $SC_$CPU_TST_LC_CMDPC + +wait 5 + +write ";*********************************************************************" +write "; Step 7.19 Check housekeeping counters" +write ";*********************************************************************" + +if ($SC_$CPU_LC_APSAMPLECNT = 48) AND ($SC_$CPU_LC_MONMSGCNT = 80) AND ;; + ($SC_$CPU_LC_RTSCNT = 4) AND ;; + ($SC_$CPU_LC_WPSINUSE = 30) AND ($SC_$CPU_LC_ACTIVEAPS = 8) AND ;; + ($SC_$CPU_LC_CURLCSTATE=LC_STATE_ACTIVE) THEN + CmdStatus = CMDSUCCESS + + if ($SC_$CPU_LC_WRRESULTS[1].WPByteEntry.AllStatus <> 0x01) then + CmdStatus = CMDFAIL + wpindex = 1 + endif + + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[2].WPByteEntry.AllStatus <> 0x11) then + CmdStatus = CMDFAIL + wpindex = 2 + endif + endif + + if (CmdStatus = CMDSUCCESS) then + if ($SC_$CPU_LC_WRRESULTS[3].WPByteEntry.AllStatus <> 0x15) then + CmdStatus = CMDFAIL + wpindex = 3 + endif + endif + + if (CmdStatus = CMDSUCCESS) then + for wpindex = 4 to WPACKED do + if (wpindex <=7) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0) then + break + endif + elseif (wpindex = 8) then + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xf0) then + break + endif + else + if ($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus <> 0xff) then + break + endif + endif + enddo + endif + + for apindex = 1 to APACKED do + if (apindex = 1) or (apindex = 3) or (apindex = 4) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x54) then + break + endif + elseif (apindex = 2) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x95) then + break + endif + elseif (apindex = 5) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x84) then + break + endif + elseif (apindex = 6) then + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x98) then + break + endif + else + if ($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus <> 0x33) then + break + endif + endif + enddo + + if (wpindex < WPACKED) OR (apindex < APACKED) then + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + if (wpindex < WPACKED) then + write " WP Packed index = ", wpindex + write " WP Packed Results = ", %hex($SC_$CPU_LC_WRRESULTS[wpindex].WPByteEntry.AllStatus,2) + endif + + if (apindex < APACKED) then + write " AP Packed index = ", apindex + write " AP Packed Results = ", %hex($SC_$CPU_LC_ARRESULTS[apindex].APByteEntry.AllStatus,2) + endif + ut_setrequirements LC_8000, "F" + else + write "<*> Passed (8000) - Housekeeping telemetry updated properly." + ut_setrequirements LC_8000, "P" + endif +else + write " Failed (8000) - Housekeeping telemetry NOT correct after processing WPs." + write " CMDPC = ", $SC_$CPU_LC_CMDPC + write " CMDEC = ", $SC_$CPU_LC_CMDEC + write " PASSRTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " CURLCSTATE = ", p@$SC_$CPU_LC_CURLCSTATE + write " APSAMPLECNT = ", $SC_$CPU_LC_APSAMPLECNT + write " MONMSGCNT = ", $SC_$CPU_LC_MONMSGCNT + write " RTSCNT = ", $SC_$CPU_LC_RTSCNT + write " Passive RTSCNT = ", $SC_$CPU_LC_PASSRTSCNT + write " WP in use = ", $SC_$CPU_LC_WPSINUSE + write " Active APs = ", $SC_$CPU_LC_ACTIVEAPS + + write " Failed due to housekeeping counters so Packed Results were not checked" + ut_setrequirements LC_8000, "F" +endif + + +write ";*********************************************************************" +write "; Step 7.20 Dump WRT and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, WRTTblName, "A", "$cpu_dumpwrt", hostCPU, wrtID) +wait 5 + +for index = 0 to LC_MAX_WATCHPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x19) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x45) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x50) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x1346) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x1345) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0054) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0045) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0xff60) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xff54) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0133) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0130) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x0012456f) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x0012546f) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x23451200) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x23451300) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 3) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00000542) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x546) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 2) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0x00ab1543) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0xf0ab1543) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_TRUE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 1) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> $SC_$CPU_LC_WDT[index].ComparisonValue.UnSigned32) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0x3f9ddcc6) then + break + endif + elseif (index > 10) and (index < WDTentries) then + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_FALSE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 4) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) then +;; ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + else + if ($SC_$CPU_LC_WRT[index].WatchResults <> LC_WATCH_STALE) or ;; + ($SC_$CPU_LC_WRT[index].EvaluationCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FalsetoTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].ConsectiveTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].CumulativeTrueCount <> 0) or ;; + ($SC_$CPU_LC_WRT[index].FtoTValue <> 0) or ;; + ($SC_$CPU_LC_WRT[index].TtoFValue <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_WATCHPOINTS-1) then + write " Failed (2003;2003.1;2003.2;2003.3;2004) - WRT show WPs not evaluated properly." + write " Error occurred at WP = ", index + write " WatchResults = ", p@$SC_$CPU_LC_WRT[index].WatchResults + write " Evaluation Count = ", $SC_$CPU_LC_WRT[index].EvaluationCount + write " False to True Count = ", $SC_$CPU_LC_WRT[index].FalsetoTrueCount + write " Consecutive True = ", $SC_$CPU_LC_WRT[index].ConsectiveTrueCount + write " Cum True Count = ", $SC_$CPU_LC_WRT[index].CumulativeTrueCount + write " F to T Value = ", $SC_$CPU_LC_WRT[index].FtoTValue + write " T to F Value = ", $SC_$CPU_LC_WRT[index].TtoFValue + ut_setrequirements LC_2003, "F" + ut_setrequirements LC_20031, "F" + ut_setrequirements LC_20032, "F" + ut_setrequirements LC_20033, "F" + ut_setrequirements LC_2004, "F" +else + write "<*> Passed (2003;2003.1;2003.2;2003.3;2004) - WRT shows WPs evaluated properly." + ut_setrequirements LC_2003, "P" + ut_setrequirements LC_20031, "P" + ut_setrequirements LC_20032, "P" + ut_setrequirements LC_20033, "P" + ut_setrequirements LC_2004, "P" +endif + +write ";*********************************************************************" +write "; Step 7.21 Dump ART and check counters" +write ";*********************************************************************" +s get_tbl_to_cvt(ramDir, ARTTblName, "A", "$cpu_dumpart", hostCPU, artID) +wait 5 + +for index = 0 to LC_MAX_ACTIONPOINTS-1 do + if (index = 0) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 1) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 2) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 3) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 3) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 3) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif (index = 4) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 5) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 6) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 7) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 8) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_ACTIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + elseif (index = 9) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 2) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif (index = 10) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_PASS) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 1) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 3) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + elseif (index = 11) then + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_FAIL) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_APSTATE_PASSIVE) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 4) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 4) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 1) then + break + endif + else + if ($SC_$CPU_LC_ART[index].ActionResult <> LC_ACTION_STALE) or ;; + ($SC_$CPU_LC_ART[index].CurrentState <> LC_ACTION_NOT_USED) or ;; + ($SC_$CPU_LC_ART[index].FailToPassCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].PassToFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].ConsecutiveFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeFailCount <> 0) or ;; + ($SC_$CPU_LC_ART[index].CumulativeRTSExecCount <> 0) then + break + endif + endif +enddo + +if (index < LC_MAX_ACTIONPOINTS-1) then + write " Failed (3001;3001.1;3001.2;3002;3003;3004;3005;3006;4003;4005;4007;4009) - ART show APs not evaluated properly." + write " Error occurred at AP = ", index + write " Action Results = ", p@$SC_$CPU_LC_ART[index].ActionResult + write " Current State = ", p@$SC_$CPU_LC_ART[index].CurrentState + write " Fail to Pass Count = ", $SC_$CPU_LC_ART[index].FailToPassCount + write " Pass to Fail Count = ", $SC_$CPU_LC_ART[index].PassToFailCount + write " Consecutive Fail Count = ", $SC_$CPU_LC_ART[index].ConsecutiveFailCount + write " Cum Fail Count = ", $SC_$CPU_LC_ART[index].CumulativeFailCount + write " Cum RTS Count = ", $SC_$CPU_LC_ART[index].CumulativeRTSExecCount + ut_setrequirements LC_3001, "F" + ut_setrequirements LC_30011, "F" + ut_setrequirements LC_30012, "F" + ut_setrequirements LC_3002, "F" + ut_setrequirements LC_3003, "F" + ut_setrequirements LC_3004, "F" + ut_setrequirements LC_3005, "F" + ut_setrequirements LC_3006, "F" + ut_setrequirements LC_4003, "F" + ut_setrequirements LC_4005, "F" + ut_setrequirements LC_4007, "F" + ut_setrequirements LC_4009, "F" +else + write "<*> Passed (3001;3001.1;3001.2;3002;3003;3004;3005;3006;4003;4005;4007;4009) - ART shows APs evaluated properly." + ut_setrequirements LC_3001, "P" + ut_setrequirements LC_30011, "P" + ut_setrequirements LC_30012, "P" + ut_setrequirements LC_3002, "P" + ut_setrequirements LC_3003, "P" + ut_setrequirements LC_3004, "P" + ut_setrequirements LC_3005, "P" + ut_setrequirements LC_3006, "P" + ut_setrequirements LC_4003, "P" + ut_setrequirements LC_4005, "P" + ut_setrequirements LC_4007, "P" + ut_setrequirements LC_4009, "P" +endif + +write ";*********************************************************************" +write "; Step 8.0: Clean-up" +write ";*********************************************************************" + +/$SC_$CPU_ES_POWERONRESET +wait 10 + +close_data_center +wait 60 + +cfe_startup {hostCPU} +wait 5 + +write "**** Requirements Status Reporting" + +write "--------------------------" +write " Requirement(s) Report" +write "--------------------------" + +FOR i = 0 to ut_req_array_size DO + ut_pfindicate {cfe_requirements[i]} {ut_requirement[i]} +ENDDO + +drop ut_requirement ; needed to clear global variables +drop ut_req_array_size ; needed to clear global variables + +write ";*********************************************************************" +write "; End procedure $SC_$CPU_lc_withaction " +write ";*********************************************************************" +ENDPROC diff --git a/test_and_ground/asist/rdl/template/template_cmd_LC_CMD.rdl b/test_and_ground/asist/rdl/template/template_cmd_LC_CMD.rdl index 3496e70..77a8a87 100644 --- a/test_and_ground/asist/rdl/template/template_cmd_LC_CMD.rdl +++ b/test_and_ground/asist/rdl/template/template_cmd_LC_CMD.rdl @@ -1,57 +1,57 @@ -!============================================================================== -! Originator: B. Medina -! Responsible SC: -! Responsible CSE: -! Rev: Last Change: Nov 15, 2008 -! -! $sc $cpu LC Command Packet xxxx -! ================================ -! -! Packet Application ID: nnnn (Hex 'xxxx') -! Packet Title:$sc $cpu Limit Checker App Commands -! Packet Source: -! -! HISTORY: -! -! 15NOV08 BBM : Initial -! -!============================================================================= -! -#include "osconfig.h" -#include "cfe_mission_cfg.h" -#include "lc_msgdefs.h" - -CLASS Pxxxx APID=nnnn, DESC="$sc $cpu Limit Checker App Commands" -! - CMD $sc_$cpu_LC_NOOP FCTN=LC_NOOP_CC, DESC="$sc $cpu LC no-op command code" -! - CMD $sc_$cpu_LC_RESETCTRS FCTN=LC_RESET_CC, DESC="$sc $cpu LC reset counters command code" -! - CMDS $sc_$cpu_LC_SETLCSTATE FCTN=LC_SET_LC_STATE_CC, DESC="$sc $cpu LC Set Application State command code, 1=Active, 2= Passive, 3=Disabled" - UI NewLCState DESC="New LC Application State" - UI Padding INVISIBLE, DEFAULT=0 - END -! - CMDS $sc_$cpu_LC_SETAPSTATE FCTN=LC_SET_AP_STATE_CC, DESC="$sc $cpu LC Set AP State command code" - UI APNumber DESC="Which AP(s) to change, 0xFFFF specifies all APs" - UI NewAPState DESC="New AP state, 1=Active, 2=Passive, 3=Disabled" - END -! - CMDS $sc_$cpu_LC_SETAPPERMOFF FCTN=LC_SET_AP_PERMOFF_CC, DESC="$sc $cpu LC Set AP to Permanently Disabled command code" - UI APNumber DESC="Which AP(s) to change" - UI Padding INVISIBLE, DEFAULT=0 - END -! - CMDS $sc_$cpu_LC_RESETAPSTATS FCTN=LC_RESET_AP_STATS_CC, DESC="$sc $cpu LC Reset AP Statistics command code" - UI APNumber DESC="Which AP(s) to change, 0xFFFF specifies all APs" - UI Padding INVISIBLE, DEFAULT=0 - END -! - CMDS $sc_$cpu_LC_RESETWPSTATS FCTN=LC_RESET_WP_STATS_CC, DESC="$sc $cpu LC Reset WP Statistics code" - UI WPNumber DESC="Which WP(s) to change, 0xFFFF specifies all WPs" - UI Padding INVISIBLE, DEFAULT=0 - END -! -END !END PACKET -! -!============================================================================= +!============================================================================== +! Originator: B. Medina +! Responsible SC: +! Responsible CSE: +! Rev: Last Change: Nov 15, 2008 +! +! $sc $cpu LC Command Packet xxxx +! ================================ +! +! Packet Application ID: nnnn (Hex 'xxxx') +! Packet Title:$sc $cpu Limit Checker App Commands +! Packet Source: +! +! HISTORY: +! +! 15NOV08 BBM : Initial +! +!============================================================================= +! +#include "osconfig.h" +#include "cfe_mission_cfg.h" +#include "lc_msgdefs.h" + +CLASS Pxxxx APID=nnnn, DESC="$sc $cpu Limit Checker App Commands" +! + CMD $sc_$cpu_LC_NOOP FCTN=LC_NOOP_CC, DESC="$sc $cpu LC no-op command code" +! + CMD $sc_$cpu_LC_RESETCTRS FCTN=LC_RESET_CC, DESC="$sc $cpu LC reset counters command code" +! + CMDS $sc_$cpu_LC_SETLCSTATE FCTN=LC_SET_LC_STATE_CC, DESC="$sc $cpu LC Set Application State command code, 1=Active, 2= Passive, 3=Disabled" + UI NewLCState DESC="New LC Application State" + UI Padding INVISIBLE, DEFAULT=0 + END +! + CMDS $sc_$cpu_LC_SETAPSTATE FCTN=LC_SET_AP_STATE_CC, DESC="$sc $cpu LC Set AP State command code" + UI APNumber DESC="Which AP(s) to change, 0xFFFF specifies all APs" + UI NewAPState DESC="New AP state, 1=Active, 2=Passive, 3=Disabled" + END +! + CMDS $sc_$cpu_LC_SETAPPERMOFF FCTN=LC_SET_AP_PERMOFF_CC, DESC="$sc $cpu LC Set AP to Permanently Disabled command code" + UI APNumber DESC="Which AP(s) to change" + UI Padding INVISIBLE, DEFAULT=0 + END +! + CMDS $sc_$cpu_LC_RESETAPSTATS FCTN=LC_RESET_AP_STATS_CC, DESC="$sc $cpu LC Reset AP Statistics command code" + UI APNumber DESC="Which AP(s) to change, 0xFFFF specifies all APs" + UI Padding INVISIBLE, DEFAULT=0 + END +! + CMDS $sc_$cpu_LC_RESETWPSTATS FCTN=LC_RESET_WP_STATS_CC, DESC="$sc $cpu LC Reset WP Statistics code" + UI WPNumber DESC="Which WP(s) to change, 0xFFFF specifies all WPs" + UI Padding INVISIBLE, DEFAULT=0 + END +! +END !END PACKET +! +!============================================================================= diff --git a/test_and_ground/asist/rdl/template/template_pseudo_tlm_LC_HK_TLM.rdl b/test_and_ground/asist/rdl/template/template_pseudo_tlm_LC_HK_TLM.rdl new file mode 100644 index 0000000..3cf9710 --- /dev/null +++ b/test_and_ground/asist/rdl/template/template_pseudo_tlm_LC_HK_TLM.rdl @@ -0,0 +1,57 @@ +!============================================================================== +! +! Originator: W. Moleski +! Responsible SC: +! Responsible CSE: +! Rev: Last Change: Feb 2, 2012 +! +! Telemetry Packet # nnnn (dec) +! ================================= +! +! Packet Application ID: nnnn (Hex 'xxxx') +! Packet Title: $sc $cpu LC Pseudo HK Telemetry Data Packet +! +! REFERENCES: +! +! NOTES: +! +! HISTORY: +! 2012/02/02 WFM : Initial +! 2012/08/08 WFM : Changed Not Measured state to Stale +!============================================================================== + +PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC Pseudo HK Telemetry Packet" + +#include "ccsds_header.rdl" +#include "lc_platform_cfg.h" + +UB $sc_$cpu_LC_WPResult[0 .. LC_MAX_WATCHPOINTS - 1] mask=%x03,DESC="WP Results", + DISCRETE, DRANGE=(0,1,2,3),DLABEL=("False","True","Error","Stale") + +UB $sc_$cpu_LC_APResult[0 .. LC_MAX_ACTIONPOINTS - 1] mask=%x03,DESC="AP Results", + DISCRETE,DRANGE=(0,1,2,3),DLABEL=("Pass","Fail","Error","Stale") + +UB $sc_$cpu_LC_APState[0 .. LC_MAX_ACTIONPOINTS - 1] mask=%x03,DESC="AP State", + DISCRETE,DRANGE=(0,1,2,3),DLABEL=("Not Used","Active","Passive","Disabled") + +UI $sc_$cpu_PSEUDO_LC_TLM + DESC="$sc $cpu Limit Checker Pseudo Telemetry", + EQUATION = WHEN PKT_RCVD = rnnn + DO + FOR i = 1 TO LC_MAX_WATCHPOINTS/4 DO + $sc_$cpu_LC_WPResult[i*4 - 1] = $sc_$cpu_LC_WRResults[i].WPByteEntry.WP3Result + $sc_$cpu_LC_WPResult[i*4 - 2] = $sc_$cpu_LC_WRResults[i].WPByteEntry.WP2Result + $sc_$cpu_LC_WPResult[i*4 - 3] = $sc_$cpu_LC_WRResults[i].WPByteEntry.WP1Result + $sc_$cpu_LC_WPResult[i*4 - 4] = $sc_$cpu_LC_WRResults[i].WPByteEntry.WP0Result + ENDDO + + FOR i = 1 TO LC_MAX_ACTIONPOINTS/2 DO + $sc_$cpu_LC_APState[i*2 - 1] = $sc_$cpu_LC_ARResults[i].APByteEntry.AP1State + $sc_$cpu_LC_APResult[i*2 - 1] = $sc_$cpu_LC_ARResults[i].APByteEntry.AP1Result + + $sc_$cpu_LC_APState[i*2 - 2] = $sc_$cpu_LC_ARResults[i].APByteEntry.AP0State + $sc_$cpu_LC_APResult[i*2 - 2] = $sc_$cpu_LC_ARResults[i].APByteEntry.AP0Result + ENDDO + ENDDO + +END ! PACKET Pxxxx diff --git a/test_and_ground/asist/rdl/template/template_table_LC_ADT_TBL.rdl b/test_and_ground/asist/rdl/template/template_table_LC_ADT_TBL.rdl index 845b548..62b766c 100644 --- a/test_and_ground/asist/rdl/template/template_table_LC_ADT_TBL.rdl +++ b/test_and_ground/asist/rdl/template/template_table_LC_ADT_TBL.rdl @@ -1,56 +1,56 @@ -!============================================================================== -! -! Originator: B. Medina -! Responsible SC: -! Responsible CSE: -! Rev: Last Change: November 15, 2008 -! -! Telemetry Packet #nnnn (dec) -! ================================= -! -! Packet Application ID: nnnn (Hex 'xxxx') -! Packet Title: $sc $cpu LC ADT -! Packet Length: ?? Bytes (Including ?? Bytes Of Header) -! Collect Frequency: SEC -! -! REFERENCES: -! -! NOTES: -! -! HISTORY: -! 2008/11/15: B. Medina initial release -! 2012/01/04 WFM : Removed VARYING from Packet definition -!============================================================================== -! -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_platform_cfg.h" -TYPES - RECORD $sc_$cpu_LC_ADTEntry DESC="$sc $cpu LC AP Definition Table Entry" - UB DefaultState DESC="Default State for this AP", - DISCRETE, DRANGE=(1,2,3,4), - DLABEL=("Active","Passive","Disabled","Permanently Disabled") - UB MaxPassiveEvents DESC="The number of events before filter - RTS not started because AP is Passive" - UB MaxPassFailEvents DESC="The number of events before filter - AP result transition from pass to fail" - UB MaxFailPassEvents DESC="The number of events before filter - AP result transition from fail to pass" - UI RTSId DESC="RTS to request if the AP fails" - UI MaxFailsBefRTS DESC="How many consecutive failures before an RTS is issued" - UI RPNEquation[LC_MAX_RPN_EQU_SIZE] DESC="RPN that specifies when this AP should fail" - UI EventType DESC="Event Type used for event msg if AP fails", - DISCRETE, DRANGE=(1,2,3,4), - DLABEL=("Debug","Information","Error","Critical") - UI EventID DESC="Event ID used for event msg is AP fails" - CHAR EventText[LC_MAX_ACTION_TEXT] DESC="Test used for the event msg when with AP fails" - END -END_TYPES - -! LC AP Definition Table -PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC AP Definition Table" -! -#include "cfe_file_header.rdl" -#include "cfe_tbl_header.rdl" -! -$sc_$cpu_LC_ADTEntry $sc_$cpu_LC_ADT[0 .. LC_MAX_ACTIONPOINTS-1] DESC="$sc $cpu LC AP Definition Table" -! -END - +!============================================================================== +! +! Originator: B. Medina +! Responsible SC: +! Responsible CSE: +! Rev: Last Change: November 15, 2008 +! +! Telemetry Packet #nnnn (dec) +! ================================= +! +! Packet Application ID: nnnn (Hex 'xxxx') +! Packet Title: $sc $cpu LC ADT +! Packet Length: ?? Bytes (Including ?? Bytes Of Header) +! Collect Frequency: SEC +! +! REFERENCES: +! +! NOTES: +! +! HISTORY: +! 2008/11/15: B. Medina initial release +! 2012/01/04 WFM : Removed VARYING from Packet definition +!============================================================================== +! +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_platform_cfg.h" +TYPES + RECORD $sc_$cpu_LC_ADTEntry DESC="$sc $cpu LC AP Definition Table Entry" + UB DefaultState DESC="Default State for this AP", + DISCRETE, DRANGE=(1,2,3,4), + DLABEL=("Active","Passive","Disabled","Permanently Disabled") + UB MaxPassiveEvents DESC="The number of events before filter - RTS not started because AP is Passive" + UB MaxPassFailEvents DESC="The number of events before filter - AP result transition from pass to fail" + UB MaxFailPassEvents DESC="The number of events before filter - AP result transition from fail to pass" + UI RTSId DESC="RTS to request if the AP fails" + UI MaxFailsBefRTS DESC="How many consecutive failures before an RTS is issued" + UI RPNEquation[LC_MAX_RPN_EQU_SIZE] DESC="RPN that specifies when this AP should fail" + UI EventType DESC="Event Type used for event msg if AP fails", + DISCRETE, DRANGE=(1,2,3,4), + DLABEL=("Debug","Information","Error","Critical") + UI EventID DESC="Event ID used for event msg is AP fails" + CHAR EventText[LC_MAX_ACTION_TEXT] DESC="Test used for the event msg when with AP fails" + END +END_TYPES + +! LC AP Definition Table +PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC AP Definition Table" +! +#include "cfe_file_header.rdl" +#include "cfe_tbl_header.rdl" +! +$sc_$cpu_LC_ADTEntry $sc_$cpu_LC_ADT[0 .. LC_MAX_ACTIONPOINTS-1] DESC="$sc $cpu LC AP Definition Table" +! +END + diff --git a/test_and_ground/asist/rdl/template/template_table_LC_ART_TBL.rdl b/test_and_ground/asist/rdl/template/template_table_LC_ART_TBL.rdl index ce0935f..7d14d8c 100644 --- a/test_and_ground/asist/rdl/template/template_table_LC_ART_TBL.rdl +++ b/test_and_ground/asist/rdl/template/template_table_LC_ART_TBL.rdl @@ -1,57 +1,58 @@ -!============================================================================== -! -! Originator: B. Medina -! Responsible SC: -! Responsible CSE: -! Rev: Last Change: November 15, 2008 -! -! Telemetry Packet #nnnn (dec) -! ================================= -! -! Packet Application ID: nnnn (Hex 'xxxx') -! Packet Title: $sc $cpu LC ART -! Packet Length: ?? Bytes (Including ?? Bytes Of Header) -! Collect Frequency: SEC -! -! REFERENCES: -! -! NOTES: -! -! HISTORY: -! 2008/11/15 B. Medina initial release -! 2012/01/04 W. Moleski Removed VARYING from Packet definition -! 2012/08/08 W. Moleski Modified Not Measured state to Stale -!============================================================================== -! -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_platform_cfg.h" -TYPES - RECORD $sc_$cpu_LC_ARTEntry DESC="$sc $cpu LC AP Results Table Entry" - UB ActionResult DESC="Results for the last sample of this AP", - DISCRETE, DRANGE=(0,1,2,255), - DLABEL=("Pass","Fail","Error","Stale") - - UB CurrentState DESC="Current state of this AP", - DISCRETE, DRANGE=(1,2,3,4), - DLABEL=("Active","Passive","Disabled","Permanently Disabled") - UI Padding - ULI PassiveAPCount DESC="How many times this APs RTS has not been invoked because the AP was passive" - ULI FailToPassCount DESC="How many times this AP has transition from Fail to Pass" - ULI PassToFailCount DESC="How many times this AP has transition from Pass to Fail" - ULI ConsecutiveFailCount DESC="Number of consecutive times this AP has evaluated to Fail" - ULI CumulativeFailCount DESC="Total number of times this AP has evaluated to Fail" - ULI CumulativeRTSExecCount DESC="Total number of times an RTS request has been sent for this AP" - END -END_TYPES - -! LC AP Results Table -PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC AP Definition Table" -! -#include "cfe_file_header.rdl" -#include "cfe_tbl_header.rdl" -! -$sc_$cpu_LC_ARTEntry $sc_$cpu_LC_ART[0 .. LC_MAX_ACTIONPOINTS-1] DESC="$sc $cpu LC AP Results Table" -! -END - +!============================================================================== +! +! Originator: B. Medina +! Responsible SC: +! Responsible CSE: +! Rev: Last Change: November 15, 2008 +! +! Telemetry Packet #nnnn (dec) +! ================================= +! +! Packet Application ID: nnnn (Hex 'xxxx') +! Packet Title: $sc $cpu LC ART +! Packet Length: ?? Bytes (Including ?? Bytes Of Header) +! Collect Frequency: SEC +! +! REFERENCES: +! +! NOTES: +! +! HISTORY: +! 2008/11/15 B. Medina initial release +! 2012/01/04 W. Moleski Removed VARYING from Packet definition +! 2012/08/08 W. Moleski Modified Not Measured state to Stale +!============================================================================== +! +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_platform_cfg.h" +TYPES + RECORD $sc_$cpu_LC_ARTEntry DESC="$sc $cpu LC AP Results Table Entry" + UB ActionResult DESC="Results for the last sample of this AP", + DISCRETE, DRANGE=(0,1,2,255), + DLABEL=("Pass","Fail","Error","Stale") + + UB CurrentState DESC="Current state of this AP", + DISCRETE, DRANGE=(1,2,3,4), + DLABEL=("Active","Passive","Disabled","Permanently Disabled") + UI Padding + ULI PassiveAPCount DESC="How many times this APs RTS has not been invoked because the AP was passive" + ULI FailToPassCount DESC="How many times this AP has transition from Fail to Pass" + ULI PassToFailCount DESC="How many times this AP has transition from Pass to Fail" + ULI ConsecutiveFailCount DESC="Number of consecutive times this AP has evaluated to Fail" + ULI CumulativeFailCount DESC="Total number of times this AP has evaluated to Fail" + ULI CumulativeRTSExecCount DESC="Total number of times an RTS request has been sent for this AP" + ULI CumulativeMsgsSent DESC="Total number of event messages sent for this AP" + END +END_TYPES + +! LC AP Results Table +PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC AP Definition Table" +! +#include "cfe_file_header.rdl" +#include "cfe_tbl_header.rdl" +! +$sc_$cpu_LC_ARTEntry $sc_$cpu_LC_ART[0 .. LC_MAX_ACTIONPOINTS-1] DESC="$sc $cpu LC AP Results Table" +! +END + diff --git a/test_and_ground/asist/rdl/template/template_table_LC_WDT_TBL.rdl b/test_and_ground/asist/rdl/template/template_table_LC_WDT_TBL.rdl index b7f61af..5c6c37f 100644 --- a/test_and_ground/asist/rdl/template/template_table_LC_WDT_TBL.rdl +++ b/test_and_ground/asist/rdl/template/template_table_LC_WDT_TBL.rdl @@ -1,63 +1,68 @@ -!============================================================================== -! -! Originator: B. Medina -! Responsible SC: -! Responsible CSE: -! Rev: Last Change: November 15, 2008 -! -! Telemetry Packet #nnnn (dec) -! ================================= -! -! Packet Application ID: nnnn (Hex 'xxxx') -! Packet Title: $sc $cpu LC WDT -! Packet Length: ?? Bytes (Including ?? Bytes Of Header) -! Collect Frequency: SEC -! -! REFERENCES: -! -! NOTES: -! -! HISTORY: -! 2008/11/15 B. Medina initial release -! 2012/01/04 W. Moleski Removed VARYING from Packet definition -! 2012/08/08 W. Moleski Added StaleAge to WDTEntry record -!============================================================================== -! -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_platform_cfg.h" -TYPES - RECORD $sc_$cpu_LC_WDTEntry DESC="$sc $cpu LC WP Definition Table Entry" - UB DataType DESC="WP Data Type", DISCRETE, - DRANGE=(1,2,3,4,5,6,7,8,9,10,11,12,255), - DLABEL=("Byte","UBYTE","WORD_BE","WORD_LE","UWORD_BE", - "UWORD_LE","DWORD_BE","DWORD_LE","UDWORD_BE", - "UDWORD_LE","FLOAT_BE","FLOAT_LE","empty entry") - UB OperatorID DESC="Comparison Type", DISCRETE, - DRANGE=(1,2,3,4,5,6,7,255), - DLABEL=("<","<=","!=","==",">=",">","Custom Function", - "empty entry") - UI MessageID DESC="Message ID for the message containing the WP" - ULI WPOffset DESC="Byte offset from the beginning of the message (including any headers) to the WP" - ULI BitMask DESC="Value to be masked with WP data prior to comparison" - - UNION ComparisonValue DESC="Value WP Data is compared against" - SLI Signed32 DESC="compare signed" - ULI UnSigned32 DESC="compare unsigned" - SFP Float32 DESC="compare float", ORDER=(1,2,3,4) - END - ULI StaleAge DESC="Number of LC Sample AP commands that must be processed for result to go Stale" - ULI CustFctArgument DESC="Data passed to the custom function when the OperatorID is set to custom" - END -END_TYPES - -! LC WP Definition Table -PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC WP Definition Table" -! -#include "cfe_file_header.rdl" -#include "cfe_tbl_header.rdl" -! -$sc_$cpu_LC_WDTEntry $sc_$cpu_LC_WDT[0 .. LC_MAX_WATCHPOINTS-1] DESC="$sc $cpu LC WP Definition Table" -! -END - +!============================================================================== +! +! Originator: B. Medina +! Responsible SC: +! Responsible CSE: +! Rev: Last Change: November 15, 2008 +! +! Telemetry Packet #nnnn (dec) +! ================================= +! +! Packet Application ID: nnnn (Hex 'xxxx') +! Packet Title: $sc $cpu LC WDT +! Packet Length: ?? Bytes (Including ?? Bytes Of Header) +! Collect Frequency: SEC +! +! REFERENCES: +! +! NOTES: +! +! HISTORY: +! 2008/11/15 B. Medina initial release +! 2012/01/04 W. Moleski Removed VARYING from Packet definition +! 2012/08/08 W. Moleski Added StaleAge to WDTEntry record +!============================================================================== +! +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_platform_cfg.h" +TYPES + RECORD $sc_$cpu_LC_WDTEntry DESC="$sc $cpu LC WP Definition Table Entry" + UB DataType DESC="WP Data Type", DISCRETE, + DRANGE=(1,2,3,4,5,6,7,8,9,10,11,12,255), + DLABEL=("Byte","UBYTE","WORD_BE","WORD_LE","UWORD_BE", + "UWORD_LE","DWORD_BE","DWORD_LE","UDWORD_BE", + "UDWORD_LE","FLOAT_BE","FLOAT_LE","empty entry") + UB OperatorID DESC="Comparison Type", DISCRETE, + DRANGE=(1,2,3,4,5,6,7,255), + DLABEL=("<","<=","!=","==",">=",">","Custom Function", + "empty entry") + UI MessageID DESC="Message ID for the message containing the WP" + ULI WPOffset DESC="Byte offset from the beginning of the message (including any headers) to the WP" + ULI BitMask DESC="Value to be masked with WP data prior to comparison" + + UNION ComparisonValue DESC="Value WP Data is compared against" + SLI Signed32 DESC="compare 32 bit signed" + ULI UnSigned32 DESC="compare 32 bit unsigned" + SFP Float32 DESC="compare float", ORDER=(1,2,3,4) + UI UnSigned16 DESC="compare 16 bit unsigned" + SI Signed16 DESC="compare 16 bit signed" + UB UnSigned8 DESC="compare 8 bit unsigned" + SB Signed8 DESC="compare 8 bit unsigned" + UB RawByte[4] DESC="4 byte array" + END + ULI StaleAge DESC="Number of LC Sample AP commands that must be processed for result to go Stale" + ULI CustFctArgument DESC="Data passed to the custom function when the OperatorID is set to custom" + END +END_TYPES + +! LC WP Definition Table +PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC WP Definition Table" +! +#include "cfe_file_header.rdl" +#include "cfe_tbl_header.rdl" +! +$sc_$cpu_LC_WDTEntry $sc_$cpu_LC_WDT[0 .. LC_MAX_WATCHPOINTS-1] DESC="$sc $cpu LC WP Definition Table" +! +END + diff --git a/test_and_ground/asist/rdl/template/template_table_LC_WRT_TBL.rdl b/test_and_ground/asist/rdl/template/template_table_LC_WRT_TBL.rdl index 6688aea..cfcbe51 100644 --- a/test_and_ground/asist/rdl/template/template_table_LC_WRT_TBL.rdl +++ b/test_and_ground/asist/rdl/template/template_table_LC_WRT_TBL.rdl @@ -1,59 +1,91 @@ -!============================================================================== -! -! Originator: B. Medina -! Responsible SC: -! Responsible CSE: -! Rev: Last Change: Nov 15, 2008 -! -! Telemetry Packet #nnnn (dec) -! ================================= -! -! Packet Application ID: nnnn (Hex 'xxxx') -! Packet Title: $sc $cpu LC WRT -! Packet Length: ?? Bytes (Including ?? Bytes Of Header) -! Collect Frequency: SEC -! -! REFERENCES: -! -! NOTES: -! -! HISTORY: -! 2008/11/15 B. Medina initial release -! 2012/01/04 W. Moleski Removed VARYING from Packet definition -! 2012/08/03 W. Moleski Added CountdownToStale item to entry -!============================================================================== -! -#include "lc_msgdefs.h" -#include "lc_tbldefs.h" -#include "lc_platform_cfg.h" - -TYPES - RECORD $sc_$cpu_LC_WRTEntry DESC="$sc $cpu LC WP Results Table Entry" - UB WatchResults DESC="Results for the last evaluation of this WP", - DISCRETE, DRANGE=(0,1,2,255), - DLABEL=("False", "True", "Error", "Stale") - UB Padding[3] - ULI CountdownToStale DESC="Number of LC Sample AP commands to be processed before result goes stale" - ULI EvaluationCount DESC="How many times this WP has been evaluated" - ULI FalsetoTrueCount DESC="How many times this WP has transitioned form False to True" - ULI ConsectiveTrueCount DESC="Number of consecutive times this WP has evaluated to True" - ULI CumulativeTrueCount DESC="Total number of times this WP has evaluated to True" - ULI FtoTValue DESC="WP value at comparison that caused the F to T transition" - ULI SecFtoTTimeStamp DESC="Timestamp when the F to T transition was detected" - ULI SubSecFtoTTimeStamp DESC="Sub Timestamp when the F to T transition was detected" - ULI TtoFValue DESC="WP value at comparison that caused the T to F transition" - ULI SecTtoFTimeStamp DESC="Timestamp when the T to F transition was detected" - ULI SubSecTtoFTimeStamp DESC="Sub Timestamp when the T to F transition was detected" - END -END_TYPES - -! LC WP Results Table -PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC WP Results Table" -! -#include "cfe_file_header.rdl" -#include "cfe_tbl_header.rdl" -! -$sc_$cpu_LC_WRTEntry $sc_$cpu_LC_WRT[0 .. LC_MAX_WATCHPOINTS-1] DESC="$sc $cpu LC WP Results Table" -! -END - +!============================================================================== +! +! Originator: B. Medina +! Responsible SC: +! Responsible CSE: +! Rev: Last Change: Nov 15, 2008 +! +! Telemetry Packet #nnnn (dec) +! ================================= +! +! Packet Application ID: nnnn (Hex 'xxxx') +! Packet Title: $sc $cpu LC WRT +! Packet Length: ?? Bytes (Including ?? Bytes Of Header) +! Collect Frequency: SEC +! +! REFERENCES: +! +! NOTES: +! +! HISTORY: +! 2008/11/15 B. Medina initial release +! 2012/01/04 W. Moleski Removed VARYING from Packet definition +! 2012/08/03 W. Moleski Added CountdownToStale item to entry +!============================================================================== +! +#include "lc_msgdefs.h" +#include "lc_tbldefs.h" +#include "lc_platform_cfg.h" + +TYPES + RECORD $sc_$cpu_LC_WRTEntry DESC="$sc $cpu LC WP Results Table Entry" + UB WatchResults DESC="Results for the last evaluation of this WP", + DISCRETE, DRANGE=(0,1,2,255), + DLABEL=("False", "True", "Error", "Stale") + UB Padding[3] + ULI CountdownToStale DESC="Number of LC Sample AP commands to be processed before result goes stale" + ULI EvaluationCount DESC="How many times this WP has been evaluated" + ULI FalsetoTrueCount DESC="How many times this WP has transitioned form False to True" + ULI ConsectiveTrueCount DESC="Number of consecutive times this WP has evaluated to True" + ULI CumulativeTrueCount DESC="Total number of times this WP has evaluated to True" +! ULI FtoTValue DESC="WP value at comparison that caused the F to T transition" + UNION FtoTValue DESC="Value WP Data is compared against" + SLI Signed32 DESC="compare 32 bit signed" + ULI UnSigned32 DESC="compare 32 bit unsigned" + SFP Float32 DESC="compare float", ORDER=(1,2,3,4) + UI UnSigned16 DESC="compare 16 bit unsigned" + SI Signed16 DESC="compare 16 bit signed" + UB UnSigned8 DESC="compare 8 bit unsigned" + SB Signed8 DESC="compare 8 bit unsigned" + UB RawByte[4] DESC="4 byte array" + END + UB FtoTDataType DESC="False to True transition data type", DISCRETE, + DRANGE=(1,2,3,4,5,6,7,8,9,10,11,12,255), + DLABEL=("Byte","UBYTE","WORD_BE","WORD_LE","UWORD_BE", + "UWORD_LE","DWORD_BE","DWORD_LE","UDWORD_BE", + "UDWORD_LE","FLOAT_BE","FLOAT_LE","empty entry") + UB Padding_2[3] + ULI SecFtoTTimeStamp DESC="Timestamp when the F to T transition was detected" + ULI SubSecFtoTTimeStamp DESC="Sub Timestamp when the F to T transition was detected" +! ULI TtoFValue DESC="WP value at comparison that caused the T to F transition" + UNION TtoFValue DESC="Value WP Data is compared against" + SLI Signed32 DESC="compare 32 bit signed" + ULI UnSigned32 DESC="compare 32 bit unsigned" + SFP Float32 DESC="compare float", ORDER=(1,2,3,4) + UI UnSigned16 DESC="compare 16 bit unsigned" + SI Signed16 DESC="compare 16 bit signed" + UB UnSigned8 DESC="compare 8 bit unsigned" + SB Signed8 DESC="compare 8 bit unsigned" + UB RawByte[4] DESC="4 byte array" + END + UB TtoFDataType DESC="True to False transition data type", DISCRETE, + DRANGE=(1,2,3,4,5,6,7,8,9,10,11,12,255), + DLABEL=("Byte","UBYTE","WORD_BE","WORD_LE","UWORD_BE", + "UWORD_LE","DWORD_BE","DWORD_LE","UDWORD_BE", + "UDWORD_LE","FLOAT_BE","FLOAT_LE","empty entry") + UB Padding_3[3] + ULI SecTtoFTimeStamp DESC="Timestamp when the T to F transition was detected" + ULI SubSecTtoFTimeStamp DESC="Sub Timestamp when the T to F transition was detected" + END +END_TYPES + +! LC WP Results Table +PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC WP Results Table" +! +#include "cfe_file_header.rdl" +#include "cfe_tbl_header.rdl" +! +$sc_$cpu_LC_WRTEntry $sc_$cpu_LC_WRT[0 .. LC_MAX_WATCHPOINTS-1] DESC="$sc $cpu LC WP Results Table" +! +END + diff --git a/test_and_ground/asist/rdl/template/template_tlm_LC_HK_TLM.rdl b/test_and_ground/asist/rdl/template/template_tlm_LC_HK_TLM.rdl index 349398d..af2438f 100644 --- a/test_and_ground/asist/rdl/template/template_tlm_LC_HK_TLM.rdl +++ b/test_and_ground/asist/rdl/template/template_tlm_LC_HK_TLM.rdl @@ -1,108 +1,108 @@ -!============================================================================== -! -! Originator: B. Medina -! Responsible SC: -! Responsible CSE: -! Rev: Last Change: Nov 15, 2008 -! -! Telemetry Packet # nnnn (dec) -! ================================= -! -! Packet Application ID: nnnn (Hex 'xxxx') -! Packet Title: $sc $cpu LC Telemetry Data Packet -! Packet Length: ?? Bytes (Including 12 Bytes Of Header) -! Collect Frequency: SEC -! -! REFERENCES: -! -! NOTES: -! -! HISTORY: -! -! 2008/11/15 BBM : Initial -! 2011/07/05 WFM : Updated according to fsw changes -! 2012/01/18 WFM : Added record and unions for the WP and AP Packed -! : status arrays in order to display discrete status -!============================================================================== -! -#include "osconfig.h" -#include "lc_msgdefs.h" -#include "lc_platform_cfg.h" - -#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 -#define APACKED (LC_MAX_ACTIONPOINTS + 1)/2 - -TYPES - RECORD $sc_$cpu_LC_WPPackedType DESC="Watchpoint packed entry Record" - UNION WPByteEntry DESC="$sc $cpu LC WP Packed Results data, 2 bits per WP" - UB AllStatus DESC="Byte Value for all 4 Watchpoints" - UB WP0Result DESC="Result of WP in bits 0 and 1",mask=%x03,DISCRETE, - DRANGE=(0,1,2,3),DLABEL=("False","True","Error","Stale") - UB WP1Result DESC="Result of WP in bits 2 and 3",mask=%x0C,DISCRETE, - DRANGE=(0,1,2,3),DLABEL=("False","True","Error","Stale") - UB WP2Result DESC="Result of WP in bits 4 and 5",mask=%x30,DISCRETE, - DRANGE=(0,1,2,3),DLABEL=("False","True","Error","Stale") - UB WP3Result DESC="Result of WP in bits 6 and 7",mask=%xC0,DISCRETE, - DRANGE=(0,1,2,3),DLABEL=("False","True","Error","Stale") - END - END - - RECORD $sc_$cpu_LC_APPackedType DESC="Actionpoint packed entry Record" - UNION APByteEntry DESC="$sc $cpu LC AP Packed Results data, 4 bits per AP" - UB AllStatus DESC="Byte Value for all 4 Watchpoints" - UB AP0Result DESC="Result of AP in lower 4 bits (0-3)",mask=%x03, - DISCRETE, DRANGE=(0,1,2,3),DLABEL=("Pass","Fail", - "Error","Stale") - UB AP0State DESC="State of AP in lower 4 bits (0-3)",mask=%x0C, - DISCRETE,DRANGE=(0,1,2,3),DLABEL=("Not Used","Active", - "Passive","Disabled") - UB AP1Result DESC="Result of AP in upper 4 bits (4-7)",mask=%x30, - DISCRETE, DRANGE=(0,1,2,3),DLABEL=("Pass","Fail", - "Error","Stale") - UB AP1State DESC="State of AP in upper 4 bits (4-7)",mask=%xC0, - DISCRETE,DRANGE=(0,1,2,3),DLABEL=("Not Used","Active", - "Passive","Disabled") - END - END -END_TYPES - - -PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC Telemetry Data Packet", - STALE = 36 -#include "ccsds_header.rdl" -! - UB $sc_$cpu_LC_CMDPC DESC="$sc $cpu LC Command Processed Counter", - UNITS=Counts -! - UB $sc_$cpu_LC_CMDEC DESC="$sc $cpu LC Command Error Counter", - UNITS=Counts, YH=1, DOLIMIT -! - UB $sc_$cpu_LC_CURLCSTATE DESC="$sc $cpu LC Current LC application operating state", - DISCRETE, DRANGE=(1,2,3,4), - DLABEL=("Active","Passive","Disabled","Recover from CDS") -! - UB $sc_$cpu_LC_PAD1 DESC="$sc $cpu padding" -! -! UB $sc_$cpu_LC_WRRESULTS[WPACKED] DESC="$sc $cpu LC WP Packed Results data, 2 bits per WP" - $sc_$cpu_LC_WPPackedType $sc_$cpu_LC_WRRESULTS[WPACKED] DESC="$sc $cpu LC WP Packed Results data, 2 bits per WP" -! -! UB $sc_$cpu_LC_ARRESULTS[APACKED] DESC="$sc $cpu LC AP Packed Results data, 4 bits per AP" - $sc_$cpu_LC_APPackedType $sc_$cpu_LC_ARRESULTS[APACKED] DESC="$sc $cpu LC AP Packed Results data, 4 bits per AP" -! - UI $sc_$cpu_LC_PASSRTSCNT DESC="$sc $cpu LC Total Count of RTS sequences not initiated because application state is passive" -! - UI $sc_$cpu_LC_WPSINUSE DESC="$sc $cpu LC How many WPs are currently in effect" -! - UI $sc_$cpu_LC_ACTIVEAPS DESC="$sc $cpu LC How many APs are currently active" -! - UI $sc_$cpu_LC_PAD2 DESC = "$sc $cpu padding" -! - ULI $sc_$cpu_LC_APSAMPLECNT DESC="$sc $cpu LC Total Count of APs Sampled" -! - ULI $sc_$cpu_LC_MONMSGCNT DESC="$sc $cpu LC Total Count of Messages Monitored" -! - ULI $sc_$cpu_LC_RTSCNT DESC="$sc $cpu LC Total Count of RTS Sequences Initiated" -! -! END !END APPEND RECORD FUNCTION -! -END +!============================================================================== +! +! Originator: B. Medina +! Responsible SC: +! Responsible CSE: +! Rev: Last Change: Nov 15, 2008 +! +! Telemetry Packet # nnnn (dec) +! ================================= +! +! Packet Application ID: nnnn (Hex 'xxxx') +! Packet Title: $sc $cpu LC Telemetry Data Packet +! Packet Length: ?? Bytes (Including 12 Bytes Of Header) +! Collect Frequency: SEC +! +! REFERENCES: +! +! NOTES: +! +! HISTORY: +! +! 2008/11/15 BBM : Initial +! 2011/07/05 WFM : Updated according to fsw changes +! 2012/01/18 WFM : Added record and unions for the WP and AP Packed +! : status arrays in order to display discrete status +!============================================================================== +! +#include "osconfig.h" +#include "lc_msgdefs.h" +#include "lc_platform_cfg.h" + +#define WPACKED (LC_MAX_WATCHPOINTS + 3) / 4 +#define APACKED (LC_MAX_ACTIONPOINTS + 1)/2 + +TYPES + RECORD $sc_$cpu_LC_WPPackedType DESC="Watchpoint packed entry Record" + UNION WPByteEntry DESC="$sc $cpu LC WP Packed Results data, 2 bits per WP" + UB AllStatus DESC="Byte Value for all 4 Watchpoints" + UB WP0Result DESC="Result of WP in bits 0 and 1",mask=%x03,DISCRETE, + DRANGE=(0,1,2,3),DLABEL=("False","True","Error","Stale") + UB WP1Result DESC="Result of WP in bits 2 and 3",mask=%x0C,DISCRETE, + DRANGE=(0,1,2,3),DLABEL=("False","True","Error","Stale") + UB WP2Result DESC="Result of WP in bits 4 and 5",mask=%x30,DISCRETE, + DRANGE=(0,1,2,3),DLABEL=("False","True","Error","Stale") + UB WP3Result DESC="Result of WP in bits 6 and 7",mask=%xC0,DISCRETE, + DRANGE=(0,1,2,3),DLABEL=("False","True","Error","Stale") + END + END + + RECORD $sc_$cpu_LC_APPackedType DESC="Actionpoint packed entry Record" + UNION APByteEntry DESC="$sc $cpu LC AP Packed Results data, 4 bits per AP" + UB AllStatus DESC="Byte Value for all 4 Watchpoints" + UB AP0Result DESC="Result of AP in lower 4 bits (0-3)",mask=%x03, + DISCRETE, DRANGE=(0,1,2,3),DLABEL=("Pass","Fail", + "Error","Stale") + UB AP0State DESC="State of AP in lower 4 bits (0-3)",mask=%x0C, + DISCRETE,DRANGE=(0,1,2,3),DLABEL=("Not Used","Active", + "Passive","Disabled") + UB AP1Result DESC="Result of AP in upper 4 bits (4-7)",mask=%x30, + DISCRETE, DRANGE=(0,1,2,3),DLABEL=("Pass","Fail", + "Error","Stale") + UB AP1State DESC="State of AP in upper 4 bits (4-7)",mask=%xC0, + DISCRETE,DRANGE=(0,1,2,3),DLABEL=("Not Used","Active", + "Passive","Disabled") + END + END +END_TYPES + + +PACKET Pxxxx APID=nnnn, DESC="$sc $cpu LC Telemetry Data Packet", + STALE = 36 +#include "ccsds_header.rdl" +! + UB $sc_$cpu_LC_CMDPC DESC="$sc $cpu LC Command Processed Counter", + UNITS=Counts +! + UB $sc_$cpu_LC_CMDEC DESC="$sc $cpu LC Command Error Counter", + UNITS=Counts, YH=1, DOLIMIT +! + UB $sc_$cpu_LC_CURLCSTATE DESC="$sc $cpu LC Current LC application operating state", + DISCRETE, DRANGE=(1,2,3,4), + DLABEL=("Active","Passive","Disabled","Recover from CDS") +! + UB $sc_$cpu_LC_PAD1 DESC="$sc $cpu padding" +! +! UB $sc_$cpu_LC_WRRESULTS[WPACKED] DESC="$sc $cpu LC WP Packed Results data, 2 bits per WP" + $sc_$cpu_LC_WPPackedType $sc_$cpu_LC_WRRESULTS[WPACKED] DESC="$sc $cpu LC WP Packed Results data, 2 bits per WP" +! +! UB $sc_$cpu_LC_ARRESULTS[APACKED] DESC="$sc $cpu LC AP Packed Results data, 4 bits per AP" + $sc_$cpu_LC_APPackedType $sc_$cpu_LC_ARRESULTS[APACKED] DESC="$sc $cpu LC AP Packed Results data, 4 bits per AP" +! + UI $sc_$cpu_LC_PASSRTSCNT DESC="$sc $cpu LC Total Count of RTS sequences not initiated because application state is passive" +! + UI $sc_$cpu_LC_WPSINUSE DESC="$sc $cpu LC How many WPs are currently in effect" +! + UI $sc_$cpu_LC_ACTIVEAPS DESC="$sc $cpu LC How many APs are currently active" +! + UI $sc_$cpu_LC_PAD2 DESC = "$sc $cpu padding" +! + ULI $sc_$cpu_LC_APSAMPLECNT DESC="$sc $cpu LC Total Count of APs Sampled" +! + ULI $sc_$cpu_LC_MONMSGCNT DESC="$sc $cpu LC Total Count of Messages Monitored" +! + ULI $sc_$cpu_LC_RTSCNT DESC="$sc $cpu LC Total Count of RTS Sequences Initiated" +! +! END !END APPEND RECORD FUNCTION +! +END diff --git a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ADT.fmt b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ADT.fmt index 864e29f..ddecfde 100644 Binary files a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ADT.fmt and b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ADT.fmt differ diff --git a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ADT_RPN.fmt b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ADT_RPN.fmt index 6f68375..de443eb 100644 Binary files a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ADT_RPN.fmt and b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ADT_RPN.fmt differ diff --git a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ART.fmt b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ART.fmt index ef4509f..d91f62a 100644 Binary files a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ART.fmt and b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_ART.fmt differ diff --git a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK.fmt b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK.fmt index 4c43f0e..bb9742a 100644 Binary files a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK.fmt and b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK.fmt differ diff --git a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK_AP_RESULTS.fmt b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK_AP_RESULTS.fmt index 4f057ca..e881f0c 100644 Binary files a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK_AP_RESULTS.fmt and b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK_AP_RESULTS.fmt differ diff --git a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK_WP_RESULTS.fmt b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK_WP_RESULTS.fmt index a6a31ab..caf1a0b 100644 Binary files a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK_WP_RESULTS.fmt and b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_HK_WP_RESULTS.fmt differ diff --git a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_WDT.fmt b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_WDT.fmt index c53e8f1..c8829a5 100644 Binary files a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_WDT.fmt and b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_WDT.fmt differ diff --git a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_WRT.fmt b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_WRT.fmt index 3eda52e..63ddeb6 100644 Binary files a/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_WRT.fmt and b/test_and_ground/asist/sam/fmt/SCX_CPU1_LC_WRT.fmt differ diff --git a/test_and_ground/results/DataFiles.zip b/test_and_ground/results/DataFiles.zip index 660100f..f5e1c5f 100644 Binary files a/test_and_ground/results/DataFiles.zip and b/test_and_ground/results/DataFiles.zip differ diff --git a/test_and_ground/results/LCX_V2_0_0_0_TestReport.doc b/test_and_ground/results/LCX_V2_0_0_0_TestReport.doc deleted file mode 100644 index 131cfca..0000000 Binary files a/test_and_ground/results/LCX_V2_0_0_0_TestReport.doc and /dev/null differ diff --git a/test_and_ground/results/LC_V2_1_0_0_TestReport.docx b/test_and_ground/results/LC_V2_1_0_0_TestReport.docx new file mode 100644 index 0000000..a20f3b8 Binary files /dev/null and b/test_and_ground/results/LC_V2_1_0_0_TestReport.docx differ diff --git a/test_and_ground/results/LC_V2_1_0_0_TestReport.pdf b/test_and_ground/results/LC_V2_1_0_0_TestReport.pdf new file mode 100644 index 0000000..43d20c0 Binary files /dev/null and b/test_and_ground/results/LC_V2_1_0_0_TestReport.pdf differ diff --git a/test_and_ground/results/LogFiles.zip b/test_and_ground/results/LogFiles.zip index 7d472c2..6709fbe 100644 Binary files a/test_and_ground/results/LogFiles.zip and b/test_and_ground/results/LogFiles.zip differ diff --git a/test_and_ground/results/RTTM.html b/test_and_ground/results/RTTM.htm similarity index 59% rename from test_and_ground/results/RTTM.html rename to test_and_ground/results/RTTM.htm index 57ae5d7..98d8357 100644 --- a/test_and_ground/results/RTTM.html +++ b/test_and_ground/results/RTTM.htm @@ -1,9992 +1,9300 @@ - - - - - - - - - - - - - - - - CFS Requirements to Test Traceability Matrix (RTTM) - - - - - - - - - - - - - - -
- - - - -
-
CFS Requirements to Test Traceability Matrix (RTTM)

-

-
- - -Oct 2, 2012 -
- - - - ID - - ReqID - - Text - - Build Test Method - - Tested Build - - Build/SYS Test Result - - Build/SYS Test Comment - - Is Related To' - - - Related Tests - - - - -
- - - -
- - - - - - - - - - 19607 - - LCX1000 - - Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19609 - - LCX1001 - - Upon receipt of a Reset command, LCX shall reset the following housekeeping variables to a value of zero:
a) Valid Command Counter
b) Command Rejected Counter
c) Passive RTS Execution Counter
d) Actionpoint Sample Count
e) TLM Count
f) RTS Execution Counter
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19611 - - LCX1002 - - For all LCX commands, if the length contained in the message header is not equal to the expected length, LCX shall reject the command and issue an event message. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19613 - - LCX1003 - - If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event message - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19615 - - LCX1004 - - If LCX rejects any command, LCX shall abort the command execution, increment the LCX Command Rejected Counter and issue an error event message - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19617 - - LCX2000 - - The flight software shall monitor a maximum of <PLATFORM_DEFINED> Watchpoints. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19619 - - LCX2001 - - For each Watchpoint specified in the Watchpoint Definition Table (WDT) LCX shall specify an age value which indicates when the data becomes “stale”. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19621 - - LCX2002 - - For each Watchpoint specified in the Watchpoint Definition Table (WDT) LCX shall maintain the age of the data. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19623 - - LCX2003 - - Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19625 - - LCX2003.2 - - LCX shall support the following comparison values:
a)       =
b)       !=
c)       >
d)       >=
e)       <
f)        <=

- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19627 - - LCX2003.3 - - If the WDT comparison operator specifies that a  Custom Function shall be performed, LCX shall apply the custom function to the data contained in the message - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19629 - - LCX2003.4 - - If the comparison result for a Watchpoint results in a False, LCX shall set the Number of Consecutive True values to zero - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19631 - - LCX2003.5 - - If the Watchpoint cannot be evaluated, LCX shall set the Watchpoint Results Table to ERROR for the erroneous Watchpoint. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19633 - - LCX2004 - - For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19635 - - LCX2005 - - Upon receipt of a table update indication, LCX shall validate the Watchpoint Definition Table for the following:
a)       Valid operator
b)       Data size
c)       Message  ID
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19637 - - LCX3000 - - Limit Checker shall support up to a maximum of <PLATFORM_DEFINED> Actionpoints - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19639 - - LCX3001 - - Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19641 - - LCX3001.1 - - LCX shall support the following Reverse Polish Operators:
a)       and
b)       or
c)       xor
d)       not
e)       equals

- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19643 - - LCX3001.2 - - If the equation result for an Actionpoint results in a Pass, LCX shall set the Number of Consecutive Fail values to zero - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19645 - - LCX3001.3 - - If the Actionpoint cannot be evaluated, LCX shall set the Actionpoint Results Table to ERROR for the erroneous Actionpoint. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19647 - - LCX3002 - - For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:
a)       Active
b)       Passive - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19649 - - LCX3002.1 - - If the Actionpoint equation results in a transition from PASS to FAIL, LCX shall issue an event message indicating the failure - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19651 - - LCX3002.1.1 - - If the PASS to FAIL transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19653 - - LCX3002.2 - - If the Actionpoint equation results in a transition from FAIL to PASS, LCX shall issue an event message indicating that the actionpoint is now within limits - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19655 - - LCX3002.2.1 - - If the FAIL to PASS transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19657 - - LCX3002.3 - - If the equation has yielded a Fail result for the table-defined consecutive number of times limit and the Actionpoint is currently Active, LCX shall:
a)       generate an event message
b)       send a command to start the table-defined  RTS
c)       Increment the counter indicating Total count of commands sent to SC task to start an RTS
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19659 - - LCX3002.3.1 - - Once an RTS is initiated, LCX shall change the current state of the associated Actionpoint to Passive.  - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19661 - - LCX3002.4 - - If the equation has yielded a Fail result for the defined consecutive number of times and the Actionpoint is currently Passive, LCX shall
a)       generate an event message indicating that the Actionpoint Failed but the action was not taken
b)       Increment the counter indicating Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19663 - - LCX3003 - - If the Actionpoint is Disabled, LCX shall skip processing that actionpoint - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19665 - - LCX3004 - - If the Actionpoint is Unused, LCX shall skip processing that actionpoint - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19667 - - LCX3005 - - If the Actionpoint is Permanently Disabled, LCX shall skip processing that actionpoint - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19669 - - LCX3006 - - For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19671 - - LCX3007 - - Upon receipt of a table update indication, LCX shall validate the Actionpoint Definition Table for the following:
a)       valid default state
b)       RTS number (in range)
c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)
d)       Failure Count (in range)
e)       Action Equation syntax
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19673 - - LCX4000 - - Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to Active - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19675 - - LCX4001 - - Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to Passive - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19677 - - LCX4002 - - Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to Disabled - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19679 - - LCX4003 - - Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluation - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19681 - - LCX4004 - - Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluation - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19683 - - LCX4005 - - Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are taken - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19685 - - LCX4006 - - Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are taken - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19687 - - LCX4007 - - Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are taken - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19689 - - LCX4008 - - Upon receipt of a Set All Actionpoints to Disabled Command, LCX shall set the state for all Actionpoint to DISABLED such that:
a)       the actionpoints are not evaluated
b)       no actions are taken
c)       no event messages generated.
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19691 - - LCX4009 - - Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be Activated - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19693 - - LCX4009.1 - - If a command  is received to Activate an Actionpoint which has been permanently disabled, the command shall be rejected - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19695 - - LCX4010 - - Upon receipt of a Reset Actionpoint Statistics Command, LCX shall set to zero, all of the following Actionpoint Statistics for the command-specified Actionpoints :
a)       Total number of FAIL to PASS transitions
b)       Total number of PASS to FAIL transitions
c)       Number of consecutive FAIL results
d)       Total number of FAIL results
e)       Total number of RTS executions
f)        Total number of event messages sent  relating to that Actionpoint
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19697 - - LCX4011 - - Upon receipt of a Reset All Actionpoint Statistics Command, LCX shall set to zero, all of the following Actionpoint Statistics for all Actionpoints:
a)       Total number of FAIL to PASS transitions
b)       Total number of PASS to FAIL transitions
c)       Number of consecutive FAIL results
d)       Total number of FAIL results
e)       Total number of RTS executions
f)        Total number of event messages sent  relating to that Actionpoint
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19699 - - LCX4012 - - Upon receipt of a Reset Watchpoint Statistics Command, LCX shall set to zero all of the following Watchpoint Statistics for the command-specified Watchpoints:
a)       Total sample count for this watchpoint
b)       Number of times result transitioned from FALSE to TRUE
c)       Number of consecutive TRUE results
d)       Total number of TRUE results
e)       Most recent FALSE to TRUE transition value
f)        Most recent FALSE to TRUE transition timestamp
g)       Most recent TRUE to FALSE transition value
h)       Most recent TRUE to FALSE transition timestamp
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19701 - - LCX4013 - - Upon receipt of a Reset All Watchpoint Statistics Command, LCX shall set to zero, all of the following Watchpoint Statistics for all Watchpoints:
a)       Total sample count for this watchpoint
b)       Number of times result transitioned from FALSE to TRUE
c)       Number of consecutive TRUE results
d)       Total number of TRUE results
e)       Most recent FALSE to TRUE transition value
f)        Most recent FALSE to TRUE transition timestamp
g)       Most recent TRUE to FALSE transition value
h)       Most recent TRUE to FALSE transition timestamp
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19703 - - LCX8000 - - LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19705 - - LCX9000 - - Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19707 - - LCX9001 - - Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19709 - - LCX9002 - - Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21043LCX_EvtFilter2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21044LCX_GenCmds2.0.0.0Walt Moleski (wmoleski)Sep 27, 2012
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21046LCX_NoAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21050LCX_Stale2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21051LCX_Stress2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21054LCX_WithAction2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19711 - - LCX9003 - - Upon a cFE Processor Reset or LCX Application Reset,  if the <PLATFORM_DEFINED> Save Critical Data parameter is set to NO, LCX shall perform the same initialization as a cFE Power-on (see LCX9000, LCX9001, LCX9002, and 9003) - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19713 - - LCX9004 - - Upon a cFE Processor Reset or LCX Application Reset,  if the <PLATFORM_DEFINED> Save Critical Data parameter is set to YES, LCX shall  restore the following data:
a)       LCX housekeeping data
b)       WDT
c)       Watchpoint Statistics
d)       ADT
e)       Actionpoint Statistics
- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19715 - - LCX9004.1 - -  LCX shall initialize the LCX Application State to <PLATFORM_DEFINED> Default Reset State - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19717 - - LCX9004.1.1 - - If the platform defined Default Reset State indicates to use the state of the LCX Application prior to the reset, LCX shall set the state of the LCX Application to the state restored from the CDS - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19719 - - LCX9004.3 - - If LCX determines the Critical Data is invalid, LCX shall perform the same initialization as a cFE Power-on (see LCX9000, LCX9001 and LCX9002) - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19721 - - LCX9005 - - Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:
a)       valid operator
b)       data size
c)       Message ID

- - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19723 - - LCX9006 - - Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:
a)       valid default state
b)       RTS number (in range)
c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)
d)       Failure Count (in range)
e)       Action Equation syntax - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21045LCX_Monitoring2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19725 - - LCX9007 - - Upon any initialization, LCX shall subscribe to the messages defined in the WDT. - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21049LCX_ResetNoCDS2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
21053LCX_TableTesting2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19727 - - LCX9007.1 - - For a cFE Processor Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDS - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - - 19729 - - LCX9007.2 - - For an LCX Application Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDS - - Demonstration - - 2.0.0 - - Pass - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTEST_Test NameTEST_Current BuildTEST_Execution Assigned ToTEST_Execution Completion Date
21047LCX_ResetCDS2.0.0.0Walt Moleski (wmoleski)Oct 2, 2012
21048LCX_ResetCDSSTate2.0.0.0Walt Moleski (wmoleski)Oct 1, 2012
- - - - - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - + + + + + + + + + + + + + + + + cFS Requirements to Test Traceability Matrix + + + + + + + + + + + + + + +
+ + + + +
+
cFS Requirements to Test Traceability Matrix

+

+
+ + +Aug 28, 2017 +
+ + + + ID + + ReqID + + Text + + Build Test Method + + REQ_Build_Sys_Test_Results + + REQ_Build_Sys_Test_Comments + + + Related Tests + + + + +
+ + + +
+ + + + + + + + + + 7432 + + LC1000 + + Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7434 + + LC1001 + +

Upon receipt of a Reset command, LCX shall reset the following housekeeping variables to a value of zero:

a) Valid Command Counter

b) Command Rejected Counter

c) Passive RTS Execution Counter

d) Actionpoint Sample Count

e) TLM Count

f) RTS Execution Counter

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7436 + + LC1002 + + For all LCX commands, if the length contained in the message header is not equal to the expected length, LCX shall reject the command and issue an event message. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7438 + + LC1003 + + If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event message + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7440 + + LC1004 + + If LCX rejects any command, LCX shall abort the command execution, increment the LCX Command Rejected Counter and issue an error event message + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7442 + + LC2000 + + The flight software shall monitor a maximum of <PLATFORM_DEFINED> Watchpoints. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7444 + + LC2001 + + For each Watchpoint specified in the Watchpoint Definition Table (WDT) LCX shall specify an age value which indicates when the data becomes “staleâ€. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7446 + + LC2002 + + For each Watchpoint specified in the Watchpoint Definition Table (WDT) LCX shall maintain the age of the data. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7448 + + LC2003 + +

Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:

a)       Active

b)       Passive

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7450 + + LC2003.1 + +

LCX shall support the following comparison values:

a)       =

b)       !=

c)       >

d)      >=

e)      <

f)        <=

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7452 + + LC2003.2 + + If the WDT comparison operator specifies that a  Custom Function shall be performed, LCX shall apply the custom function to the data contained in the message + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7454 + + LC2003.3 + + If the comparison result for a Watchpoint results in a False, LCX shall set the Number of Consecutive True values to zero + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7456 + + LC2003.4 + + If the Watchpoint cannot be evaluated, LCX shall set the Watchpoint Results Table to ERROR for the erroneous Watchpoint. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7458 + + LC2004 + +

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7460 + + LC2005 + +

Upon receipt of a table update indication, LCX shall validate the Watchpoint Definition Table for the following:

a)       Valid operator

b)       Data size

c)       Message  ID

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7462 + + LC3000 + + Limit Checker shall support up to a maximum of <PLATFORM_DEFINED> Actionpoints + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7464 + + LC3001 + +

Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:

a)       Active

b)       Passive:

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7466 + + LC3001.1 + +

LCX shall support the following Reverse Polish Operators:

a)       and

b)       or

c)       xor

d) not

e) equlas

     

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7468 + + LC3001.2 + + If the equation result for an Actionpoint results in a Pass, LCX shall set the Number of Consecutive Fail values to zero + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7470 + + LC3001.3 + + If the Actionpoint cannot be evaluated, LCX shall set the Actionpoint Results Table to ERROR for the erroneous Actionpoint. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7472 + + LC3002 + +

For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:

a)       Active

b)       Passiv

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7474 + + LC3002.1 + + If the Actionpoint equation results in a transition from PASS to FAIL, LCX shall issue an event message indicating the failure + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7476 + + LC3002.1.1 + + If the PASS to FAIL transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7478 + + LC3002.2 + + If the Actionpoint equation results in a transition from FAIL to PASS, LCX shall issue an event message indicating that the actionpoint is now within limits + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7480 + + LC3002.2.1 + + If the FAIL to PASS transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7482 + + LC3002.3 + + If the equation has yielded a Fail result for the table-defined consecutive number of times limit and the Actionpoint is currently Active, LCX shall: a)       generate an event message b)       send a command to start the table-defined  RTS c)       Increment the counter indicating Total count of commands sent to SC task to start an RTS + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7484 + + LC3002.3.1 + + Once an RTS is initiated, LCX shall change the current state of the associated Actionpoint to Passive.  + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7486 + + LC3002.4 + + If the equation has yielded a Fail result for the defined consecutive number of times and the Actionpoint is currently Passive, LCX shall a)       generate an event message indicating that the Actionpoint Failed but the action was not taken b)       Increment the Passive RTS Execution Counter + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7488 + + LC3003 + + If the Actionpoint is Disabled, LCX shall skip processing that actionpoint + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7490 + + LC3004 + + If the Actionpoint is Unused, LCX shall skip processing that actionpoint + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7492 + + LC3005 + + If the Actionpoint is Permanently Disabled, LCX shall skip processing that actionpoint + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7494 + + LC3006 + +

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7496 + + LC3007 + +

Upon receipt of a table update indication, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7498 + + LC4000 + + Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to Active + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7500 + + LC4001 + + Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to Passive + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7502 + + LC4002 + + Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to Disabled + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7504 + + LC4003 + + Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluation + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7506 + + LC4004 + + Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluation + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7508 + + LC4005 + + Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are taken + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7510 + + LC4006 + + Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are taken + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7512 + + LC4007 + + Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are taken + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7514 + + LC4008 + +

Upon receipt of a Set All Actionpoints to Disabled Command, LCX shall set the state for all Actionpoint to DISABLED such that:

a)       the actionpoints are not evaluated

b)       no actions are taken

c)       no event messages generated.

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7516 + + LC4009 + + Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be Activated + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7518 + + LC4009.1 + + If a command  is received to Activate an Actionpoint which has been permanently disabled, the command shall be rejected + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7520 + + LC4010 + +

Upon receipt of a Reset Actionpoint Statistics Command, LCX shall set to zero, all of the following Actionpoint Statistics for the command-specified Actionpoints :

a)       Total number of FAIL to PASS transitions

b)       Total number of PASS to FAIL transitions

c)       Number of consecutive FAIL results

d)       Total number of FAIL results

e)       Total number of RTS executions

f)        Total number of event messages sent  relating to that Actionpoint

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7522 + + LC4011 + +

Upon receipt of a Reset All Actionpoint Statistics Command, LCX shall set to zero, all of the following Actionpoint Statistics for all Actionpoints:

a)       Total number of FAIL to PASS transitions

b)       Total number of PASS to FAIL transitions

c)       Number of consecutive FAIL results

d)       Total number of FAIL results

e)       Total number of RTS executions

f)        Total number of event messages sent  relating to that Actionpoint

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7524 + + LC4012 + +

Upon receipt of a Reset Watchpoint Statistics Command, LCX shall set to zero all of the following Watchpoint Statistics for the command-specified Watchpoints:

a)       Total sample count for this watchpoint

b)       Number of times result transitioned from FALSE to TRUE

c)       Number of consecutive TRUE results

d)       Total number of TRUE results

e)       Most recent FALSE to TRUE transition value

f)        Most recent FALSE to TRUE transition timestamp

g)       Most recent TRUE to FALSE transition value

h)       Most recent TRUE to FALSE transition timestamp

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7526 + + LC4013 + +

Upon receipt of a Reset All Watchpoint Statistics Command, LCX shall set to zero, all of the following Watchpoint Statistics for all Watchpoints:

a)       Total sample count for this watchpoint

b)       Number of times result transitioned from FALSE to TRUE

c)       Number of consecutive TRUE results

d)       Total number of TRUE results

e)       Most recent FALSE to TRUE transition value

f)        Most recent FALSE to TRUE transition timestamp

g)       Most recent TRUE to FALSE transition value

h)       Most recent TRUE to FALSE transition timestamp

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7528 + + LC8000 + +

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7530 + + LC9000 + +

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7532 + + LC9001 + +

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7534 + + LC9002 + +

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_EvtFilter2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_GenCmds2.1.0.0Walt Moleski (wmoleski)Aug 8, 2017
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_NoAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stale2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_Stress2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7536 + + LC9003 + + Upon a cFE Processor Reset or LCX Application Reset,  if the <PLATFORM_DEFINED> Save Critical Data parameter is set to NO, LCX shall perform the same initialization as a cFE Power-on (see LCX9000, LCX9001, LCX9002, and 9003) + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7538 + + LC9004 + +

Upon a cFE Processor Reset or LCX Application Reset,  if the <PLATFORM_DEFINED> Save Critical Data parameter is set to YES, LCX shall  restore the following data:

a)       LCX housekeeping data

b)       WDT

c)       Watchpoint Statistics

d)       ADT

e)       Actionpoint Statistics

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7540 + + LC9004.1 + +  LCX shall initialize the LCX Application State to <PLATFORM_DEFINED> Default Reset State + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7542 + + LC9004.1.1 + + If the platform defined Default Reset State indicates to use the state of the LCX Application prior to the reset, LCX shall set the state of the LCX Application to the state restored from the CDS + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7544 + + LC9004.2 + + If LCX determines the Critical Data is invalid, LCX shall perform the same initialization as a cFE Power-on (see LCX9000, LCX9001 and LCX9002) + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7546 + + LC9005 + +

Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:

a)       valid operator

b)       data size

c)       Message ID

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7548 + + LC9006 + +

Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

+ + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7550 + + LC9007 + + Upon any initialization, LCX shall subscribe to the messages defined in the WDT. + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_Monitoring2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetNoCDS2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_TableTesting2.1.0.0Walt Moleski (wmoleski)Aug 9, 2017
LC_WithAction2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7552 + + LC9007.1 + + For a cFE Processor Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDS + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + + + 7554 + + LC9007.2 + + For an LCX Application Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDS + + Demonstration + + Pass + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TEST_Test_NameTEST_Current_BuildTEST_Execution_Assigned_ToTEST_Execution_Completion_Date
LC_ResetCDS2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
LC_ResetCDSState2.1.0.0Walt Moleski (wmoleski)Aug 10, 2017
+ + + + + + + + + + + +
+ + + + + + + + +
+ + + + + + + + +
+ + + + + + + \ No newline at end of file diff --git a/test_and_ground/results/TestExecutionSummary.htm b/test_and_ground/results/TestExecutionSummary.htm new file mode 100644 index 0000000..3f54b8c --- /dev/null +++ b/test_and_ground/results/TestExecutionSummary.htm @@ -0,0 +1,6833 @@ + + + + + + + + + + + + + Test Execution Summary + + + + + + + + + + + + + + + + +
Test Execution Summary 
+ + +
+ + + +
+

+

Aug 28, 2017

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LC_EvtFilter - Item 4531
TEST_Test_Name: LC_EvtFilter
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) properly filters the PASS to FAIL and FAIL to PASS transition events when the table-defined maximum number of times has been reached for an ActionPoint (AP).
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 8, 2017
TEST_Execution_Time: 1998.15 seconds; 33.3026 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC3001

Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:

a)       Active

b)       Passive:

DemonstrationPass   
LC3001.2If the equation result for an Actionpoint results in a Pass, LCX shall set the Number of Consecutive Fail values to zeroDemonstrationPass   
LC3002

For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:

a)       Active

b)       Passiv

DemonstrationPass   
LC3002.1If the Actionpoint equation results in a transition from PASS to FAIL, LCX shall issue an event message indicating the failureDemonstrationPass   
LC3002.1.1If the PASS to FAIL transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter.DemonstrationPass   
LC3002.2If the Actionpoint equation results in a transition from FAIL to PASS, LCX shall issue an event message indicating that the actionpoint is now within limitsDemonstrationPass   
LC3002.2.1If the FAIL to PASS transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter.DemonstrationPass   
LC3002.3If the equation has yielded a Fail result for the table-defined consecutive number of times limit and the Actionpoint is currently Active, LCX shall: a)       generate an event message b)       send a command to start the table-defined  RTS c)       Increment the counter indicating Total count of commands sent to SC task to start an RTSDemonstrationPass   
LC3002.3.1Once an RTS is initiated, LCX shall change the current state of the associated Actionpoint to Passive. DemonstrationPass   
LC3002.4If the equation has yielded a Fail result for the defined consecutive number of times and the Actionpoint is currently Passive, LCX shall a)       generate an event message indicating that the Actionpoint Failed but the action was not taken b)       Increment the Passive RTS Execution CounterDemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
+

 
LC_GenCmds - Item 4532
TEST_Test_Name: LC_GenCmds
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) general commands function properly. All LCX commands will be tested as well as invalid commands and an application reset to see if the LCX application behaves appropriately.
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 8, 2017
TEST_Execution_Time: 2516.69 seconds; 41.9448 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1000Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message.DemonstrationPass   
LC1001

Upon receipt of a Reset command, LCX shall reset the following housekeeping variables to a value of zero:

a) Valid Command Counter

b) Command Rejected Counter

c) Passive RTS Execution Counter

d) Actionpoint Sample Count

e) TLM Count

f) RTS Execution Counter

DemonstrationPass   
LC1002For all LCX commands, if the length contained in the message header is not equal to the expected length, LCX shall reject the command and issue an event message.DemonstrationPass   
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC1004If LCX rejects any command, LCX shall abort the command execution, increment the LCX Command Rejected Counter and issue an error event messageDemonstrationPass   
LC2004

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

DemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC4001Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to PassiveDemonstrationPass   
LC4002Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to DisabledDemonstrationPass   
LC4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4005Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are takenDemonstrationPass   
LC4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass   
LC4007Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are takenDemonstrationPass   
LC4008

Upon receipt of a Set All Actionpoints to Disabled Command, LCX shall set the state for all Actionpoint to DISABLED such that:

a)       the actionpoints are not evaluated

b)       no actions are taken

c)       no event messages generated.

DemonstrationPass   
LC4009Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be ActivatedDemonstrationPass   
LC4009.1If a command  is received to Activate an Actionpoint which has been permanently disabled, the command shall be rejectedDemonstrationPass   
LC4010

Upon receipt of a Reset Actionpoint Statistics Command, LCX shall set to zero, all of the following Actionpoint Statistics for the command-specified Actionpoints :

a)       Total number of FAIL to PASS transitions

b)       Total number of PASS to FAIL transitions

c)       Number of consecutive FAIL results

d)       Total number of FAIL results

e)       Total number of RTS executions

f)        Total number of event messages sent  relating to that Actionpoint

DemonstrationPass   
LC4011

Upon receipt of a Reset All Actionpoint Statistics Command, LCX shall set to zero, all of the following Actionpoint Statistics for all Actionpoints:

a)       Total number of FAIL to PASS transitions

b)       Total number of PASS to FAIL transitions

c)       Number of consecutive FAIL results

d)       Total number of FAIL results

e)       Total number of RTS executions

f)        Total number of event messages sent  relating to that Actionpoint

DemonstrationPass   
LC4012

Upon receipt of a Reset Watchpoint Statistics Command, LCX shall set to zero all of the following Watchpoint Statistics for the command-specified Watchpoints:

a)       Total sample count for this watchpoint

b)       Number of times result transitioned from FALSE to TRUE

c)       Number of consecutive TRUE results

d)       Total number of TRUE results

e)       Most recent FALSE to TRUE transition value

f)        Most recent FALSE to TRUE transition timestamp

g)       Most recent TRUE to FALSE transition value

h)       Most recent TRUE to FALSE transition timestamp

DemonstrationPass   
LC4013

Upon receipt of a Reset All Watchpoint Statistics Command, LCX shall set to zero, all of the following Watchpoint Statistics for all Watchpoints:

a)       Total sample count for this watchpoint

b)       Number of times result transitioned from FALSE to TRUE

c)       Number of consecutive TRUE results

d)       Total number of TRUE results

e)       Most recent FALSE to TRUE transition value

f)        Most recent FALSE to TRUE transition timestamp

g)       Most recent TRUE to FALSE transition value

h)       Most recent TRUE to FALSE transition timestamp

DemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
+

 
LC_Monitoring - Item 4533
TEST_Test_Name: LC_Monitoring
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when monitoring WP.  All WP evaluate to false so that no AP will be triggered to take action.  During this test the LC is set as follows:
•       LC Active with all AP disabled.  
•       LC Active with all AP active.
•       LC Active with all AP passive
•       LC Active with AP in mix of states (active, passive, disabled, permanently disabled, unused)
•       LC Passive with all AP active
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 10, 2017
TEST_Execution_Time: 1665.01 seconds; 27.7501 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1000Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message.DemonstrationPass   
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC2003

Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:

a)       Active

b)       Passive

DemonstrationPass   
LC2003.1

LCX shall support the following comparison values:

a)       =

b)       !=

c)       >

d)      >=

e)      <

f)        <=

DemonstrationPass   
LC2003.2If the WDT comparison operator specifies that a  Custom Function shall be performed, LCX shall apply the custom function to the data contained in the messageDemonstrationPass   
LC2004

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

DemonstrationPass   
LC3001

Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:

a)       Active

b)       Passive:

DemonstrationPass   
LC3001.1

LCX shall support the following Reverse Polish Operators:

a)       and

b)       or

c)       xor

d) not

e) equlas

     

DemonstrationPass   
LC3002

For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:

a)       Active

b)       Passiv

DemonstrationPass   
LC3003If the Actionpoint is Disabled, LCX shall skip processing that actionpointDemonstrationPass   
LC3004If the Actionpoint is Unused, LCX shall skip processing that actionpointDemonstrationPass   
LC3005If the Actionpoint is Permanently Disabled, LCX shall skip processing that actionpointDemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC4001Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to PassiveDemonstrationPass   
LC4002Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to DisabledDemonstrationPass   
LC4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4005Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are takenDemonstrationPass   
LC4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass   
LC4007Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are takenDemonstrationPass   
LC4008

Upon receipt of a Set All Actionpoints to Disabled Command, LCX shall set the state for all Actionpoint to DISABLED such that:

a)       the actionpoints are not evaluated

b)       no actions are taken

c)       no event messages generated.

DemonstrationPass   
LC4009Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be ActivatedDemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC9005

Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:

a)       valid operator

b)       data size

c)       Message ID

DemonstrationPass   
LC9006

Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

DemonstrationPass   
LC9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass   
+

 
LC_NoAction - Item 4534
TEST_Test_Name: LC_NoAction
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when monitoring WP.  All WP evaluate to a mix of true, false, error, and not measured.  All AP Pass so they are not triggered to take action.  During this test the LC is set as follows:
•       LC Active with all AP disabled.  
•       LC Active with all AP active.
•       LC Active with all AP passive
•       LC Active with AP in mix of states (active, passive, disabled, permanently disabled, unused)

The following WP true/false transitions will be tested:

WP T/F Transitions Tested
WP1     T, T, T, T      WP7     F, T, F, T
WP2     T, T, T, F      WP8     F, T, T, F
WP3     T, T, F, F      WP9     F, T, T, T
WP4     T, F, F, F      WP10    F, F, T, T
WP5     T, F, F, T      WP11    F, F, F, T
WP6     T, F, T, F      WP12    F, F, F, F
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 10, 2017
TEST_Execution_Time: 1130.75 seconds; 18.8458 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1000Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message.DemonstrationPass   
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC2003

Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:

a)       Active

b)       Passive

DemonstrationPass   
LC2003.1

LCX shall support the following comparison values:

a)       =

b)       !=

c)       >

d)      >=

e)      <

f)        <=

DemonstrationPass   
LC2003.3If the comparison result for a Watchpoint results in a False, LCX shall set the Number of Consecutive True values to zeroDemonstrationPass   
LC2004

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

DemonstrationPass   
LC3001

Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:

a)       Active

b)       Passive:

DemonstrationPass   
LC3001.1

LCX shall support the following Reverse Polish Operators:

a)       and

b)       or

c)       xor

d) not

e) equlas

     

DemonstrationPass   
LC3002

For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:

a)       Active

b)       Passiv

DemonstrationPass   
LC3003If the Actionpoint is Disabled, LCX shall skip processing that actionpointDemonstrationPass   
LC3004If the Actionpoint is Unused, LCX shall skip processing that actionpointDemonstrationPass   
LC3005If the Actionpoint is Permanently Disabled, LCX shall skip processing that actionpointDemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4005Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are takenDemonstrationPass   
LC4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass   
LC4007Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are takenDemonstrationPass   
LC4009Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be ActivatedDemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
+

 
LC_ResetCDS - Item 4535
TEST_Test_Name: LC_ResetCDS
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly properly when an application, cFE processor, or cFE power-on reset is performed. This test verifies that the appropriate data items are initialized to their proper values after each reset. Also, this test verifies that the data is restored from the cFE Critical Data Store (CDS) after an Application and Processesor reseti is performed. Finally, this test verifies that the LC application restores the default values if the CDS is corrupted.

NOTE: This test SHOULD NOT be executed if the configuration parameter indicating Save Critical Data is set to NO by the Mission.
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 10, 2017
TEST_Execution_Time: 3504.64 seconds; 58.4106 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1000Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message.DemonstrationPass   
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC2004

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

DemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC9004

Upon a cFE Processor Reset or LCX Application Reset,  if the <PLATFORM_DEFINED> Save Critical Data parameter is set to YES, LCX shall  restore the following data:

a)       LCX housekeeping data

b)       WDT

c)       Watchpoint Statistics

d)       ADT

e)       Actionpoint Statistics

DemonstrationPass   
LC9004.1 LCX shall initialize the LCX Application State to <PLATFORM_DEFINED> Default Reset StateDemonstrationPass   
LC9004.1.1If the platform defined Default Reset State indicates to use the state of the LCX Application prior to the reset, LCX shall set the state of the LCX Application to the state restored from the CDSDemonstrationPass   
LC9004.2If LCX determines the Critical Data is invalid, LCX shall perform the same initialization as a cFE Power-on (see LCX9000, LCX9001 and LCX9002)DemonstrationPass   
LC9005

Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:

a)       valid operator

b)       data size

c)       Message ID

DemonstrationPass   
LC9006

Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

DemonstrationPass   
LC9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass   
LC9007.1For a cFE Processor Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDSDemonstrationPass   
LC9007.2For an LCX Application Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDSDemonstrationPass   
+

 
LC_ResetCDSState - Item 4536
TEST_Test_Name: LC_ResetCDSState
TEST_Description: This test verifies that the CFS Limit Checker (LC) application restores the proper Application State after a reset occurs (Processor and Application).
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 10, 2017
TEST_Execution_Time: See comment for times
TEST_Execution_Comments:

All requirements passed. This test was executed three times with three different configurations. The configuration and execution times for each setting of :LC_STATE_WHEN_CDS_RESTORED are:

 

1. LC_STATE_FROM_CDS => 490.211 seconds or 8.17019 minutes

2. LC_STATE ACTIVE => 493.01 seconds or 8.21684 minutes

3. LC_STATE_PASSIVE => 488.942 seconds or 8.14903 minutes

TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1000Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message.DemonstrationPass   
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC9004.1 LCX shall initialize the LCX Application State to <PLATFORM_DEFINED> Default Reset StateDemonstrationPass   
LC9005

Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:

a)       valid operator

b)       data size

c)       Message ID

DemonstrationPass   
LC9006

Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

DemonstrationPass   
LC9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass   
LC9007.2For an LCX Application Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDSDemonstrationPass   
+

 
LC_ResetNoCDS - Item 4537
TEST_Test_Name: LC_ResetNoCDS
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly properly when an application, cFE processor, or cFE power-on reset is performed. This test verifies that the appropriate data items are initialized to their default values after each reset.

 NOTE: This test SHOULD NOT be executed if the configuration parameter indicating Save Critical Data is set to YES by the Mission.
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 9, 2017
TEST_Execution_Time: 1035.5 seconds; 17.2584 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC2004

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

DemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC9003Upon a cFE Processor Reset or LCX Application Reset,  if the <PLATFORM_DEFINED> Save Critical Data parameter is set to NO, LCX shall perform the same initialization as a cFE Power-on (see LCX9000, LCX9001, LCX9002, and 9003)DemonstrationPass   
LC9005

Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:

a)       valid operator

b)       data size

c)       Message ID

DemonstrationPass   
LC9006

Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

DemonstrationPass   
LC9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass   
+

 
LC_Stale - Item 4538
TEST_Test_Name: LC_Stale
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) Application properly handles "stale" data. Stale data is data that has not been received for x Sample commands as specified in the WatchPoint Definition.
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 9, 2017
TEST_Execution_Time: 645.167 seconds; 10.7528 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC2001For each Watchpoint specified in the Watchpoint Definition Table (WDT) LCX shall specify an age value which indicates when the data becomes “staleâ€.DemonstrationPass   
LC2002For each Watchpoint specified in the Watchpoint Definition Table (WDT) LCX shall maintain the age of the data.DemonstrationPass   
LC2004

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

DemonstrationPass   
LC3001

Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:

a)       Active

b)       Passive:

DemonstrationPass   
LC3002

For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:

a)       Active

b)       Passiv

DemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
+

 
LC_Stress - Item 4539
TEST_Test_Name: LC_Stress
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when monitoring the maximum number of WatchPoints (WP). All evaluate to false. The maximum number of ActionPoints (AP) also evaluate to fail.Several anomaly tests are performed to ensure that the LC Application handles these conditions properly.
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 10, 2017
TEST_Execution_Time: 927.849 seconds; 15.4642 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC2000The flight software shall monitor a maximum of <PLATFORM_DEFINED> Watchpoints.DemonstrationPass   
LC2003

Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:

a)       Active

b)       Passive

DemonstrationPass   
LC2003.2If the WDT comparison operator specifies that a  Custom Function shall be performed, LCX shall apply the custom function to the data contained in the messageDemonstrationPass   
LC2004

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

DemonstrationPass   
LC3000Limit Checker shall support up to a maximum of <PLATFORM_DEFINED> ActionpointsDemonstrationPass   
LC3001

Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:

a)       Active

b)       Passive:

DemonstrationPass   
LC3001.1

LCX shall support the following Reverse Polish Operators:

a)       and

b)       or

c)       xor

d) not

e) equlas

     

DemonstrationPass   
LC3001.3If the Actionpoint cannot be evaluated, LCX shall set the Actionpoint Results Table to ERROR for the erroneous Actionpoint.DemonstrationPass   
LC3002

For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:

a)       Active

b)       Passiv

DemonstrationPass   
LC3002.3If the equation has yielded a Fail result for the table-defined consecutive number of times limit and the Actionpoint is currently Active, LCX shall: a)       generate an event message b)       send a command to start the table-defined  RTS c)       Increment the counter indicating Total count of commands sent to SC task to start an RTSDemonstrationPass   
LC3002.3.1Once an RTS is initiated, LCX shall change the current state of the associated Actionpoint to Passive. DemonstrationPass   
LC3002.4If the equation has yielded a Fail result for the defined consecutive number of times and the Actionpoint is currently Passive, LCX shall a)       generate an event message indicating that the Actionpoint Failed but the action was not taken b)       Increment the Passive RTS Execution CounterDemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
+

 
LC_TableTesting - Item 4540
TEST_Test_Name: LC_TableTesting
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when loading new WDT and ADT tables.  This includes updating one table at a time and both table simultaneously with the application is active, passive, and disabled.  It also includes updating using tables that contain errors.
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 9, 2017
TEST_Execution_Time: 1348.95 seconds; 22.4824 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC2004

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

DemonstrationPass   
LC2005

Upon receipt of a table update indication, LCX shall validate the Watchpoint Definition Table for the following:

a)       Valid operator

b)       Data size

c)       Message  ID

DemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC3007

Upon receipt of a table update indication, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

DemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC4001Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to PassiveDemonstrationPass   
LC4002Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to DisabledDemonstrationPass   
LC4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC9005

Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:

a)       valid operator

b)       data size

c)       Message ID

DemonstrationPass   
LC9006

Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

DemonstrationPass   
LC9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass   
+

 
LC_WithAction - Item 4541
TEST_Test_Name: LC_WithAction
TEST_Description: The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when monitoring WP.  All WP evaluate to a mix of true, false, error, and not measured.  All AP evaluate to a mix of pass, fail, error, and not measured so some actions will be taken.  During this test the LC is set as follows:
•       LC Active with all AP disabled.  
•       LC Active with all AP active.
•       LC Active with all AP passive
•       LC Active with AP in mix of states (active, passive, disabled, permanently disabled, unused)
•       LC Passive with all AP active
•       LC Disabled with all AP active

The following WP true/false transitions and AP pass/fail transitions are tested:

WP T/F Transitions Tested       AP P/F Transitions Tested
WP1     T, T, T, T      WP7     F, T, F, T      AP1     P, P, P, P      AP7     F, P, F, P
WP2     T, T, T, F      WP8     F, T, T, F      AP2     P, P, P, F      AP8     F, P, P, F
WP3     T, T, F, F      WP9     F, T, T, T      AP3     P, P, F, F      AP9     F, P, P, P
WP4     T, F, F, F      WP10    F, F, T, T      AP4     P, F, F, F      AP10    F, F, P, P
WP5     T, F, F, T      WP11    F, F, F, T      AP5     P, F, F, P      AP11    F, F, F, P
WP6     T, F, T, F      WP12    F, F, F, F      AP6     P, F, P, F      AP12    F, F, F, F
TEST_Current_Build: 2.1.0.0
TEST_Execution_Assigned_To: Walt Moleski (wmoleski)
TEST_Execution_Testbed: cFE 6.5.0.0; OSAL 4.2.0.0; PSP 1.3.0.0
TEST_Execution_Checksum: 50244
TEST_Execution_Completion_Date: Aug 10, 2017
TEST_Execution_Time: 2230.55 seconds; 37.1759 minutes
TEST_Execution_Comments: All requirements passed.
TEST_Comments:  
DCRs Submitted / Tested and Requirements Validated
Links_To_TEST_from_DCRs_Backward,ALM_Validates:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ReqIDTextBuild Test MethodREQ_Build_Sys_Test_ResultsREQ_Build_Sys_Test_CommentsDCR_TitleDCR_TEST_Outcome
LC1000Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message.DemonstrationPass   
LC1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass   
LC2003

Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:

a)       Active

b)       Passive

DemonstrationPass   
LC2003.2If the WDT comparison operator specifies that a  Custom Function shall be performed, LCX shall apply the custom function to the data contained in the messageDemonstrationPass   
LC2003.3If the comparison result for a Watchpoint results in a False, LCX shall set the Number of Consecutive True values to zeroDemonstrationPass   
LC2003.4If the Watchpoint cannot be evaluated, LCX shall set the Watchpoint Results Table to ERROR for the erroneous Watchpoint.DemonstrationPass   
LC2004

For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:

a)       The result of the last relational comparison (False, True, Error, or Stale)

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        Most recent FALSE to TRUE transition value

g)       Most recent FALSE to TRUE transition timestamp

h)       Most recent TRUE to FALSE transition value

i)         Most recent TRUE to FALSE transition timestamp

j) Most recent comparison age

DemonstrationPass   
LC2005

Upon receipt of a table update indication, LCX shall validate the Watchpoint Definition Table for the following:

a)       Valid operator

b)       Data size

c)       Message  ID

DemonstrationPass   
LC3001

Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:

a)       Active

b)       Passive:

DemonstrationPass   
LC3001.1

LCX shall support the following Reverse Polish Operators:

a)       and

b)       or

c)       xor

d) not

e) equlas

     

DemonstrationPass   
LC3001.2If the equation result for an Actionpoint results in a Pass, LCX shall set the Number of Consecutive Fail values to zeroDemonstrationPass   
LC3002

For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:

a)       Active

b)       Passiv

DemonstrationPass   
LC3002.1If the Actionpoint equation results in a transition from PASS to FAIL, LCX shall issue an event message indicating the failureDemonstrationPass   
LC3002.1.1If the PASS to FAIL transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter.DemonstrationPass   
LC3002.2If the Actionpoint equation results in a transition from FAIL to PASS, LCX shall issue an event message indicating that the actionpoint is now within limitsDemonstrationPass   
LC3002.2.1If the FAIL to PASS transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter.DemonstrationPass   
LC3002.3If the equation has yielded a Fail result for the table-defined consecutive number of times limit and the Actionpoint is currently Active, LCX shall: a)       generate an event message b)       send a command to start the table-defined  RTS c)       Increment the counter indicating Total count of commands sent to SC task to start an RTSDemonstrationPass   
LC3002.3.1Once an RTS is initiated, LCX shall change the current state of the associated Actionpoint to Passive. DemonstrationPass   
LC3002.4If the equation has yielded a Fail result for the defined consecutive number of times and the Actionpoint is currently Passive, LCX shall a)       generate an event message indicating that the Actionpoint Failed but the action was not taken b)       Increment the Passive RTS Execution CounterDemonstrationPass   
LC3003If the Actionpoint is Disabled, LCX shall skip processing that actionpointDemonstrationPass   
LC3004If the Actionpoint is Unused, LCX shall skip processing that actionpointDemonstrationPass   
LC3005If the Actionpoint is Permanently Disabled, LCX shall skip processing that actionpointDemonstrationPass   
LC3006

For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:

a)       The result of the last Sample (Pass, Fail, Error, or Stale)

b)       The current state (PermOff, Disabled, Active, Passive, Unused)

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC3007

Upon receipt of a table update indication, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

DemonstrationPass   
LC4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass   
LC4001Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to PassiveDemonstrationPass   
LC4002Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to DisabledDemonstrationPass   
LC4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass   
LC4005Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are takenDemonstrationPass   
LC4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass   
LC4007Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are takenDemonstrationPass   
LC4009Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be ActivatedDemonstrationPass   
LC8000

LCX shall generate a housekeeping message containing the following:

a)       Valid  Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter (Total count of RTS sequences not initiated because either the LC application state or the state of the actionpoint that failed is set to Passive)

d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...

e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...

f)        Total count of packets monitored for watchpoints (cmd and tlm)

g)       RTS Execution Counter (Total count of commands sent to SC task to start an RTS)

h)       Selected data from watchpoint results table

i)         Selected data from actionpoint results table

DemonstrationPass   
LC9000

Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):

a)       Valid Command Counter

b)       Command Rejected Counter

c)       Passive RTS Execution Counter

d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State

e)       Actionpoint Sample Count

f)        TLM Count

g)       RTS Execution Counter

h)       Watch Results (bitmapped)

i)         Action Results (bitmapped)

DemonstrationPass   
LC9001

Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:

a)       The result of the last watchpoint relational comparison to STALE

b)       The number of times this Watchpoint has been compared

c)       The number of times this Watchpoint has crossed from the False to True result

d)       The number of consecutive times the comparison has yielded a True result

e)       The cumulative number of times the comparison has yielded a True result

f)        The value that caused the last False-to-True crossing, and the crossing time stamp

g)       The value that caused the last True-to-False crossing, and the crossing time stamp

DemonstrationPass   
LC9002

Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:

a)       The result of the last Actionpoint Sample to STALE

b)       The current state as defined in the ADT

c)       The number of times this Actionpoint has crossed from the Fail to Pass state

d)       The number of times this Actionpoint has crossed from the Pass to Fail state

e)       The number of consecutive times the equation result = Failed

f)        The cumulative number of times the equation result = Failed

g)       The cumulative count of the RTS executions

h)       Total number of event messages sent

DemonstrationPass   
LC9005

Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:

a)       valid operator

b)       data size

c)       Message ID

DemonstrationPass   
LC9006

Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:

a)       valid default state

b)       RTS number (in range)

c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)

d)       Failure Count (in range)

e)       Action Equation syntax

DemonstrationPass   
LC9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass   
+

 
+ + + \ No newline at end of file diff --git a/test_and_ground/results/TestExecutionSummary.html b/test_and_ground/results/TestExecutionSummary.html deleted file mode 100644 index 03b212b..0000000 --- a/test_and_ground/results/TestExecutionSummary.html +++ /dev/null @@ -1,8573 +0,0 @@ - - - - - - - - - - - - Test Execution Summary - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-
Test Execution Summary

-

Test Status with Linked Requirements and DCRs -(Arranged in the order of Test Name)
-
-
Oct 2, 2012
LCX_EvtFilter -- 21043
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) properly filters the PASS to FAIL and FAIL to PASS transition events when the table-defined maximum number of times has been reached for an ActionPoint (AP).
- - - - - -
TEST_Test Name:LCX_EvtFilter
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Sep 27, 2012
- - - - - -
TEST_Execution_Time:1694.85 seconds; 28.2475 minutes
- - - - - -
TEST_Execution Comments:All requirements passed.
- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19639SR_RequirementLCX3001Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19643SR_RequirementLCX3001.2If the equation result for an Actionpoint results in a Pass, LCX shall set the Number of Consecutive Fail values to zeroDemonstrationPass  REQ_Approved 
19647SR_RequirementLCX3002For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19649SR_RequirementLCX3002.1If the Actionpoint equation results in a transition from PASS to FAIL, LCX shall issue an event message indicating the failureDemonstrationPass  REQ_Approved 
19651SR_RequirementLCX3002.1.1If the PASS to FAIL transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter.DemonstrationPass  REQ_Approved 
19653SR_RequirementLCX3002.2If the Actionpoint equation results in a transition from FAIL to PASS, LCX shall issue an event message indicating that the actionpoint is now within limitsDemonstrationPass  REQ_Approved 
19655SR_RequirementLCX3002.2.1If the FAIL to PASS transition event message has been sent for the table-defined number of times, LCX shall apply the table-defined event message filter.DemonstrationPass  REQ_Approved 
19657SR_RequirementLCX3002.3If the equation has yielded a Fail result for the table-defined consecutive number of times limit and the Actionpoint is currently Active, LCX shall:
a)       generate an event message
b)       send a command to start the table-defined  RTS
c)       Increment the counter indicating Total count of commands sent to SC task to start an RTS
DemonstrationPass  REQ_Approved 
19659SR_RequirementLCX3002.3.1Once an RTS is initiated, LCX shall change the current state of the associated Actionpoint to Passive. DemonstrationPass  REQ_Approved 
19661SR_RequirementLCX3002.4If the equation has yielded a Fail result for the defined consecutive number of times and the Actionpoint is currently Passive, LCX shall
a)       generate an event message indicating that the Actionpoint Failed but the action was not taken
b)       Increment the counter indicating Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
DemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
-
-

 
LCX_GenCmds -- 21044
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) general commands function properly. All LCX commands will be tested as well as invalid commands and an application reset to see if the LCX application behaves appropriately.
- - - - - -
TEST_Test Name:LCX_GenCmds
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Sep 27, 2012
- - - - - -
TEST_Execution_Time:2603.95 seconds; 43.3992 minutes
- - - - - -
TEST_Execution Comments:

All requirements passed.

- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19607SR_RequirementLCX1000Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message.DemonstrationPass  REQ_Approved 
19609SR_RequirementLCX1001Upon receipt of a Reset command, LCX shall reset the following housekeeping variables to a value of zero:
a) Valid Command Counter
b) Command Rejected Counter
c) Passive RTS Execution Counter
d) Actionpoint Sample Count
e) TLM Count
f) RTS Execution Counter
DemonstrationPass  REQ_Approved 
19611SR_RequirementLCX1002For all LCX commands, if the length contained in the message header is not equal to the expected length, LCX shall reject the command and issue an event message.DemonstrationPass  REQ_Approved 
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19615SR_RequirementLCX1004If LCX rejects any command, LCX shall abort the command execution, increment the LCX Command Rejected Counter and issue an error event messageDemonstrationPass  REQ_Approved 
19633SR_RequirementLCX2004For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
DemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19675SR_RequirementLCX4001Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to PassiveDemonstrationPass  REQ_Approved 
19677SR_RequirementLCX4002Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to DisabledDemonstrationPass  REQ_Approved 
19679SR_RequirementLCX4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19681SR_RequirementLCX4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19683SR_RequirementLCX4005Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are takenDemonstrationPass  REQ_Approved 
19685SR_RequirementLCX4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass  REQ_Approved 
19687SR_RequirementLCX4007Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are takenDemonstrationPass  REQ_Approved 
19689SR_RequirementLCX4008Upon receipt of a Set All Actionpoints to Disabled Command, LCX shall set the state for all Actionpoint to DISABLED such that:
a)       the actionpoints are not evaluated
b)       no actions are taken
c)       no event messages generated.
DemonstrationPass  REQ_Approved 
19691SR_RequirementLCX4009Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be ActivatedDemonstrationPass  REQ_Approved 
19693SR_RequirementLCX4009.1If a command  is received to Activate an Actionpoint which has been permanently disabled, the command shall be rejectedDemonstrationPass  REQ_Approved 
19695SR_RequirementLCX4010Upon receipt of a Reset Actionpoint Statistics Command, LCX shall set to zero, all of the following Actionpoint Statistics for the command-specified Actionpoints :
a)       Total number of FAIL to PASS transitions
b)       Total number of PASS to FAIL transitions
c)       Number of consecutive FAIL results
d)       Total number of FAIL results
e)       Total number of RTS executions
f)        Total number of event messages sent  relating to that Actionpoint
DemonstrationPass  REQ_Approved 
19697SR_RequirementLCX4011Upon receipt of a Reset All Actionpoint Statistics Command, LCX shall set to zero, all of the following Actionpoint Statistics for all Actionpoints:
a)       Total number of FAIL to PASS transitions
b)       Total number of PASS to FAIL transitions
c)       Number of consecutive FAIL results
d)       Total number of FAIL results
e)       Total number of RTS executions
f)        Total number of event messages sent  relating to that Actionpoint
DemonstrationPass  REQ_Approved 
19699SR_RequirementLCX4012Upon receipt of a Reset Watchpoint Statistics Command, LCX shall set to zero all of the following Watchpoint Statistics for the command-specified Watchpoints:
a)       Total sample count for this watchpoint
b)       Number of times result transitioned from FALSE to TRUE
c)       Number of consecutive TRUE results
d)       Total number of TRUE results
e)       Most recent FALSE to TRUE transition value
f)        Most recent FALSE to TRUE transition timestamp
g)       Most recent TRUE to FALSE transition value
h)       Most recent TRUE to FALSE transition timestamp
DemonstrationPass  REQ_Approved 
19701SR_RequirementLCX4013Upon receipt of a Reset All Watchpoint Statistics Command, LCX shall set to zero, all of the following Watchpoint Statistics for all Watchpoints:
a)       Total sample count for this watchpoint
b)       Number of times result transitioned from FALSE to TRUE
c)       Number of consecutive TRUE results
d)       Total number of TRUE results
e)       Most recent FALSE to TRUE transition value
f)        Most recent FALSE to TRUE transition timestamp
g)       Most recent TRUE to FALSE transition value
h)       Most recent TRUE to FALSE transition timestamp
DemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
-
-

 
LCX_Monitoring -- 21045
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when monitoring WP.  All WP evaluate to false so that no AP will be triggered to take action.  During this test the LC is set as follows:
•       LC Active with all AP disabled.  
•       LC Active with all AP active.
•       LC Active with all AP passive
•       LC Active with AP in mix of states (active, passive, disabled, permanently disabled, unused)
•       LC Passive with all AP active
- - - - - -
TEST_Test Name:LCX_Monitoring
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0 OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Oct 1, 2012
- - - - - -
TEST_Execution_Time:1780.83 seconds; 29.6806 minutes
- - - - - -
TEST_Execution Comments:

All requirements passed.

- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19623SR_RequirementLCX2003Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19625SR_RequirementLCX2003.2LCX shall support the following comparison values:
a)       =
b)       !=
c)       >
d)       >=
e)       <
f)        <=

DemonstrationPass  REQ_Approved 
19627SR_RequirementLCX2003.3If the WDT comparison operator specifies that a  Custom Function shall be performed, LCX shall apply the custom function to the data contained in the messageDemonstrationPass  REQ_Approved 
19633SR_RequirementLCX2004For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
DemonstrationPass  REQ_Approved 
19639SR_RequirementLCX3001Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19641SR_RequirementLCX3001.1LCX shall support the following Reverse Polish Operators:
a)       and
b)       or
c)       xor
d)       not
e)       equals

DemonstrationPass  REQ_Approved 
19647SR_RequirementLCX3002For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19663SR_RequirementLCX3003If the Actionpoint is Disabled, LCX shall skip processing that actionpointDemonstrationPass  REQ_Approved 
19665SR_RequirementLCX3004If the Actionpoint is Unused, LCX shall skip processing that actionpointDemonstrationPass  REQ_Approved 
19667SR_RequirementLCX3005If the Actionpoint is Permanently Disabled, LCX shall skip processing that actionpointDemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19675SR_RequirementLCX4001Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to PassiveDemonstrationPass  REQ_Approved 
19677SR_RequirementLCX4002Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to DisabledDemonstrationPass  REQ_Approved 
19679SR_RequirementLCX4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19681SR_RequirementLCX4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19683SR_RequirementLCX4005Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are takenDemonstrationPass  REQ_Approved 
19685SR_RequirementLCX4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass  REQ_Approved 
19687SR_RequirementLCX4007Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are takenDemonstrationPass  REQ_Approved 
19689SR_RequirementLCX4008Upon receipt of a Set All Actionpoints to Disabled Command, LCX shall set the state for all Actionpoint to DISABLED such that:
a)       the actionpoints are not evaluated
b)       no actions are taken
c)       no event messages generated.
DemonstrationPass  REQ_Approved 
19691SR_RequirementLCX4009Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be ActivatedDemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19721SR_RequirementLCX9005Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:
a)       valid operator
b)       data size
c)       Message ID

DemonstrationPass  REQ_Approved 
19723SR_RequirementLCX9006Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:
a)       valid default state
b)       RTS number (in range)
c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)
d)       Failure Count (in range)
e)       Action Equation syntax
DemonstrationPass  REQ_Approved 
-
-

 
LCX_NoAction -- 21046
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when monitoring WP.  All WP evaluate to a mix of true, false, error, and not measured.  All AP Pass so they are not triggered to take action.  During this test the LC is set as follows:
•       LC Active with all AP disabled.  
•       LC Active with all AP active.
•       LC Active with all AP passive
•       LC Active with AP in mix of states (active, passive, disabled, permanently disabled, unused)

The following WP true/false transitions will be tested:

WP T/F Transitions Tested
WP1     T, T, T, T      WP7     F, T, F, T
WP2     T, T, T, F      WP8     F, T, T, F
WP3     T, T, F, F      WP9     F, T, T, T
WP4     T, F, F, F      WP10    F, F, T, T
WP5     T, F, F, T      WP11    F, F, F, T
WP6     T, F, T, F      WP12    F, F, F, F

- - - - - -
TEST_Test Name:LCX_NoAction
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:10060
- - - - - -
TEST_Execution Completion Date:Oct 1, 2012
- - - - - -
TEST_Execution_Time:1202.69 seconds; 20.0449 minutes
- - - - - -
TEST_Execution Comments:

All requirements passed.

- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19623SR_RequirementLCX2003Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19625SR_RequirementLCX2003.2LCX shall support the following comparison values:
a)       =
b)       !=
c)       >
d)       >=
e)       <
f)        <=

DemonstrationPass  REQ_Approved 
19627SR_RequirementLCX2003.3If the WDT comparison operator specifies that a  Custom Function shall be performed, LCX shall apply the custom function to the data contained in the messageDemonstrationPass  REQ_Approved 
19633SR_RequirementLCX2004For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
DemonstrationPass  REQ_Approved 
19639SR_RequirementLCX3001Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19641SR_RequirementLCX3001.1LCX shall support the following Reverse Polish Operators:
a)       and
b)       or
c)       xor
d)       not
e)       equals

DemonstrationPass  REQ_Approved 
19647SR_RequirementLCX3002For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19663SR_RequirementLCX3003If the Actionpoint is Disabled, LCX shall skip processing that actionpointDemonstrationPass  REQ_Approved 
19665SR_RequirementLCX3004If the Actionpoint is Unused, LCX shall skip processing that actionpointDemonstrationPass  REQ_Approved 
19667SR_RequirementLCX3005If the Actionpoint is Permanently Disabled, LCX shall skip processing that actionpointDemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19679SR_RequirementLCX4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19681SR_RequirementLCX4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19683SR_RequirementLCX4005Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are takenDemonstrationPass  REQ_Approved 
19685SR_RequirementLCX4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass  REQ_Approved 
19687SR_RequirementLCX4007Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are takenDemonstrationPass  REQ_Approved 
19691SR_RequirementLCX4009Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be ActivatedDemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
-
-

 
LCX_ResetCDS -- 21047
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly properly when an application, cFE processor, or cFE power-on reset is performed. This test verifies that the appropriate data items are initialized to their proper values after each reset. Also, this test verifies that the data is restored from the cFE Critical Data Store (CDS) after an Application and Processesor reseti is performed. Finally, this test verifies that the LC application restores the default values if the CDS is corrupted.

NOTE: This test SHOULD NOT be executed if the configuration parameter indicating Save Critical Data is set to NO by the Mission.
- - - - - -
TEST_Test Name:LCX_ResetCDS
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Oct 2, 2012
- - - - - -
TEST_Execution_Time:3507.84 seconds; 58.4639 minutes
- - - - - -
TEST_Execution Comments:

All requirements passed.

- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19607SR_RequirementLCX1000Upon receipt of a No-Op command, LCX shall increment the LCX Valid Command Counter and generate an event message.DemonstrationPass  REQ_Approved 
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19633SR_RequirementLCX2004For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
DemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19681SR_RequirementLCX4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19713SR_RequirementLCX9004Upon a cFE Processor Reset or LCX Application Reset,  if the <PLATFORM_DEFINED> Save Critical Data parameter is set to YES, LCX shall  restore the following data:
a)       LCX housekeeping data
b)       WDT
c)       Watchpoint Statistics
d)       ADT
e)       Actionpoint Statistics
DemonstrationPass  REQ_Approved 
19715SR_RequirementLCX9004.1 LCX shall initialize the LCX Application State to <PLATFORM_DEFINED> Default Reset StateDemonstrationPass  REQ_Approved 
19717SR_RequirementLCX9004.1.1If the platform defined Default Reset State indicates to use the state of the LCX Application prior to the reset, LCX shall set the state of the LCX Application to the state restored from the CDSDemonstrationPass  REQ_Approved 
19719SR_RequirementLCX9004.3If LCX determines the Critical Data is invalid, LCX shall perform the same initialization as a cFE Power-on (see LCX9000, LCX9001 and LCX9002)DemonstrationPass  REQ_Approved 
19721SR_RequirementLCX9005Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:
a)       valid operator
b)       data size
c)       Message ID

DemonstrationPass  REQ_Approved 
19723SR_RequirementLCX9006Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:
a)       valid default state
b)       RTS number (in range)
c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)
d)       Failure Count (in range)
e)       Action Equation syntax
DemonstrationPass  REQ_Approved 
19725SR_RequirementLCX9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass  REQ_Approved 
19727SR_RequirementLCX9007.1For a cFE Processor Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDSDemonstrationPass  REQ_Approved 
19729SR_RequirementLCX9007.2For an LCX Application Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDSDemonstrationPass  REQ_Approved 
-
-

 
LCX_ResetCDSSTate -- 21048
- - - - - -
TEST_Description:This test verifies that the CFS Limit Checker eXtended (LCX) application restores the proper Application State after a reset occurs (Processor and Appication).
- - - - - -
TEST_Test Name:LCX_ResetCDSSTate
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Oct 1, 2012
- - - - - -
TEST_Execution_Time:587.436 seconds; 9.79059 minutes (Passive); 563.914 seconds; 9.39856 minutes (Active)
- - - - - -
TEST_Execution Comments:All requirements passed. This test was executed twice with two different configurations. The first was with the LC_STATE_WHEN_CDS_RESTORED set to PASSIVE and the second with it set to ACTIVE.
- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19715SR_RequirementLCX9004.1 LCX shall initialize the LCX Application State to <PLATFORM_DEFINED> Default Reset StateDemonstrationPass  REQ_Approved 
19721SR_RequirementLCX9005Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:
a)       valid operator
b)       data size
c)       Message ID

DemonstrationPass  REQ_Approved 
19723SR_RequirementLCX9006Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:
a)       valid default state
b)       RTS number (in range)
c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)
d)       Failure Count (in range)
e)       Action Equation syntax
DemonstrationPass  REQ_Approved 
19725SR_RequirementLCX9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass  REQ_Approved 
19729SR_RequirementLCX9007.2For an LCX Application Reset, If the Save Critical Data parameter is YES, LCX shall subscribe to the messages defined in the WDT restored from the CDSDemonstrationPass  REQ_Approved 
-
-

 
LCX_ResetNoCDS -- 21049
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly properly when an application, cFE processor, or cFE power-on reset is performed. This test verifies that the appropriate data items are initialized to their default values after each reset.

 NOTE: This test SHOULD NOT be executed if the configuration parameter indicating Save Critical Data is set to YES by the Mission.
- - - - - -
TEST_Test Name:LCX_ResetNoCDS
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Oct 1, 2012
- - - - - -
TEST_Execution_Time:1161.55 seconds; 19.3592 minutes
- - - - - -
TEST_Execution Comments:

All requirements passed.

- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19633SR_RequirementLCX2004For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
DemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19711SR_RequirementLCX9003Upon a cFE Processor Reset or LCX Application Reset,  if the <PLATFORM_DEFINED> Save Critical Data parameter is set to NO, LCX shall perform the same initialization as a cFE Power-on (see LCX9000, LCX9001, LCX9002, and 9003)DemonstrationPass  REQ_Approved 
19721SR_RequirementLCX9005Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:
a)       valid operator
b)       data size
c)       Message ID

DemonstrationPass  REQ_Approved 
19723SR_RequirementLCX9006Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:
a)       valid default state
b)       RTS number (in range)
c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)
d)       Failure Count (in range)
e)       Action Equation syntax
DemonstrationPass  REQ_Approved 
19725SR_RequirementLCX9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass  REQ_Approved 
-
-

 
LCX_Stale -- 21050
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) Application properly handles "stale" data. Stale data is data that has not been received for x Sample commands as specified in the WatchPoint Definition.
- - - - - -
TEST_Test Name:LCX_Stale
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Oct 1, 2012
- - - - - -
TEST_Execution_Time:697.281 seconds; 11.6213 minutes
- - - - - -
TEST_Execution Comments:All requirements passed.
- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19619SR_RequirementLCX2001For each Watchpoint specified in the Watchpoint Definition Table (WDT) LCX shall specify an age value which indicates when the data becomes “stale”.DemonstrationPass  REQ_Approved 
19621SR_RequirementLCX2002For each Watchpoint specified in the Watchpoint Definition Table (WDT) LCX shall maintain the age of the data.DemonstrationPass  REQ_Approved 
19633SR_RequirementLCX2004For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
DemonstrationPass  REQ_Approved 
19639SR_RequirementLCX3001Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19647SR_RequirementLCX3002For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
-
-

 
LCX_Stress -- 21051
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when monitoring the maximum number of WatchPoints (WP). All evaluate to false. The maximum number of ActionPoints (AP) also evaluate to fail.Several anomaly tests are performed to ensure that the LC Application handles these conditions properly.
- - - - - -
TEST_Test Name:LCX_Stress
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Oct 1, 2012
- - - - - -
TEST_Execution_Time:996.539 seconds; 16.609 minutes
- - - - - -
TEST_Execution Comments:

All requirements passed.

- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19617SR_RequirementLCX2000The flight software shall monitor a maximum of <PLATFORM_DEFINED> Watchpoints.DemonstrationPass  REQ_Approved 
19623SR_RequirementLCX2003Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19625SR_RequirementLCX2003.2LCX shall support the following comparison values:
a)       =
b)       !=
c)       >
d)       >=
e)       <
f)        <=

DemonstrationPass  REQ_Approved 
19631SR_RequirementLCX2003.5If the Watchpoint cannot be evaluated, LCX shall set the Watchpoint Results Table to ERROR for the erroneous Watchpoint.DemonstrationPass  REQ_Approved 
19633SR_RequirementLCX2004For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
DemonstrationPass  REQ_Approved 
19637SR_RequirementLCX3000Limit Checker shall support up to a maximum of <PLATFORM_DEFINED> ActionpointsDemonstrationPass  REQ_Approved 
19639SR_RequirementLCX3001Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19641SR_RequirementLCX3001.1LCX shall support the following Reverse Polish Operators:
a)       and
b)       or
c)       xor
d)       not
e)       equals

DemonstrationPass  REQ_Approved 
19645SR_RequirementLCX3001.3If the Actionpoint cannot be evaluated, LCX shall set the Actionpoint Results Table to ERROR for the erroneous Actionpoint.DemonstrationPass  REQ_Approved 
19647SR_RequirementLCX3002For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19657SR_RequirementLCX3002.3If the equation has yielded a Fail result for the table-defined consecutive number of times limit and the Actionpoint is currently Active, LCX shall:
a)       generate an event message
b)       send a command to start the table-defined  RTS
c)       Increment the counter indicating Total count of commands sent to SC task to start an RTS
DemonstrationPass  REQ_Approved 
19659SR_RequirementLCX3002.3.1Once an RTS is initiated, LCX shall change the current state of the associated Actionpoint to Passive. DemonstrationPass  REQ_Approved 
19661SR_RequirementLCX3002.4If the equation has yielded a Fail result for the defined consecutive number of times and the Actionpoint is currently Passive, LCX shall
a)       generate an event message indicating that the Actionpoint Failed but the action was not taken
b)       Increment the counter indicating Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
DemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19679SR_RequirementLCX4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19681SR_RequirementLCX4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19685SR_RequirementLCX4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
-
-

 
LCX_TableTesting -- 21053
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when loading new WDT and ADT tables.  This includes updating one table at a time and both table simultaneously with the application is active, passive, and disabled.  It also includes updating using tables that contain errors.
- - - - - -
TEST_Test Name:LCX_TableTesting
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Oct 1, 2012
- - - - - -
TEST_Execution_Time:1253.19 seconds; 20.8865 minutes
- - - - - -
TEST_Execution Comments:

All requirements passed.

- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19633SR_RequirementLCX2004For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
DemonstrationPass  REQ_Approved 
19635SR_RequirementLCX2005Upon receipt of a table update indication, LCX shall validate the Watchpoint Definition Table for the following:
a)       Valid operator
b)       Data size
c)       Message  ID
DemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19671SR_RequirementLCX3007Upon receipt of a table update indication, LCX shall validate the Actionpoint Definition Table for the following:
a)       valid default state
b)       RTS number (in range)
c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)
d)       Failure Count (in range)
e)       Action Equation syntax
DemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19675SR_RequirementLCX4001Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to PassiveDemonstrationPass  REQ_Approved 
19677SR_RequirementLCX4002Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to DisabledDemonstrationPass  REQ_Approved 
19681SR_RequirementLCX4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19721SR_RequirementLCX9005Upon any initialization, LCX shall validate the Watchpoint Definition Table for the following:
a)       valid operator
b)       data size
c)       Message ID

DemonstrationPass  REQ_Approved 
19723SR_RequirementLCX9006Upon any initialization, LCX shall validate the Actionpoint Definition Table for the following:
a)       valid default state
b)       RTS number (in range)
c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)
d)       Failure Count (in range)
e)       Action Equation syntax
DemonstrationPass  REQ_Approved 
19725SR_RequirementLCX9007Upon any initialization, LCX shall subscribe to the messages defined in the WDT.DemonstrationPass  REQ_Approved 
-
-

 
LCX_WithAction -- 21054
- - - - - -
TEST_Description:The purpose of this test is to verify that Limit Checker eXtended (LCX) functions properly when monitoring WP.  All WP evaluate to a mix of true, false, error, and not measured.  All AP evaluate to a mix of pass, fail, error, and not measured so some actions will be taken.  During this test the LC is set as follows:
•       LC Active with all AP disabled.  
•       LC Active with all AP active.
•       LC Active with all AP passive
•       LC Active with AP in mix of states (active, passive, disabled, permanently disabled, unused)
•       LC Passive with all AP active
•       LC Disabled with all AP active

The following WP true/false transitions and AP pass/fail transitions are tested:

WP T/F Transitions Tested       AP P/F Transitions Tested
WP1     T, T, T, T      WP7     F, T, F, T      AP1     P, P, P, P      AP7     F, P, F, P
WP2     T, T, T, F      WP8     F, T, T, F      AP2     P, P, P, F      AP8     F, P, P, F
WP3     T, T, F, F      WP9     F, T, T, T      AP3     P, P, F, F      AP9     F, P, P, P
WP4     T, F, F, F      WP10    F, F, T, T      AP4     P, F, F, F      AP10    F, F, P, P
WP5     T, F, F, T      WP11    F, F, F, T      AP5     P, F, F, P      AP11    F, F, F, P
WP6     T, F, T, F      WP12    F, F, F, F      AP6     P, F, P, F      AP12    F, F, F, F
- - - - - -
TEST_Test Name:LCX_WithAction
- - - - - -
TEST_Current Build:2.0.0.0
- - - - - -
TEST_Procedure LOC:
 
- - - - - -
TEST_Execution Assigned To:Walt Moleski (wmoleski)
- - - - - -
TEST_Execution_Testbed:cFE 6.3.2.0; OSAL 3.5.0.0; PSP 1.1.0.0
- - - - - -
TEST_Execution_Checksum:37960
- - - - - -
TEST_Execution Completion Date:Oct 1, 2012
- - - - - -
TEST_Execution_Time:2371.55 seconds; 39.5258 minutes
- - - - - -
TEST_Execution Comments:

All requirements passed.

- - - - - -
DCR/TEST_Leads_Comments: 
- - - - - -
TEST_Execution Log:/s/opr/accounts/cfs_test/test_logs/LCX2.0.0.0
- -
DCRs Submitted/Tested and Requirements Validated
Links to DCRs from Test,SR_Validates:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IDTypeReqIDTextBuild Test MethodBuild/SYS Test ResultBuild/SYS Test CommentDCR_TitleStateDCR_TEST_Outcome
19613SR_RequirementLCX1003If LCX accepts any command as valid, LCX shall execute the command, increment the LCX Valid Command Counter and issue an event messageDemonstrationPass  REQ_Approved 
19623SR_RequirementLCX2003Upon receipt of a message, LCX shall compare the data in the message to the table-defined value using the table-defined comparison value and comparison operator for each data point defined in the Watchpoint Definition Table (WDT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19625SR_RequirementLCX2003.2LCX shall support the following comparison values:
a)       =
b)       !=
c)       >
d)       >=
e)       <
f)        <=

DemonstrationPass  REQ_Approved 
19627SR_RequirementLCX2003.3If the WDT comparison operator specifies that a  Custom Function shall be performed, LCX shall apply the custom function to the data contained in the messageDemonstrationPass  REQ_Approved 
19629SR_RequirementLCX2003.4If the comparison result for a Watchpoint results in a False, LCX shall set the Number of Consecutive True values to zeroDemonstrationPass  REQ_Approved 
19633SR_RequirementLCX2004For each Watchpoint, the flight software shall maintain the following statistics in the dump-only Watchpoint Results Table:
a)       The result of the last relational comparison (False, True, Error, or Stale)
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        Most recent FALSE to TRUE transition value
g)       Most recent FALSE to TRUE transition timestamp
h)       Most recent TRUE to FALSE transition value
i)         Most recent TRUE to FALSE transition timestamp
j) Most recent comparison age
DemonstrationPass  REQ_Approved 
19635SR_RequirementLCX2005Upon receipt of a table update indication, LCX shall validate the Watchpoint Definition Table for the following:
a)       Valid operator
b)       Data size
c)       Message  ID
DemonstrationPass  REQ_Approved 
19639SR_RequirementLCX3001Upon receipt of a Sample Request, LCX shall process the request specified Actionpoints defined in the Actionpoint Definition Table (ADT) if the LCX Application State is one of the following:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19641SR_RequirementLCX3001.1LCX shall support the following Reverse Polish Operators:
a)       and
b)       or
c)       xor
d)       not
e)       equals

DemonstrationPass  REQ_Approved 
19643SR_RequirementLCX3001.2If the equation result for an Actionpoint results in a Pass, LCX shall set the Number of Consecutive Fail values to zeroDemonstrationPass  REQ_Approved 
19647SR_RequirementLCX3002For Each table-defined Actionpoint, LCX shall store the results in the dump-only Actionpoint Results Table if the Actionpoint state is either:
a)       Active
b)       Passive
DemonstrationPass  REQ_Approved 
19649SR_RequirementLCX3002.1If the Actionpoint equation results in a transition from PASS to FAIL, LCX shall issue an event message indicating the failureDemonstrationPass  REQ_Approved 
19653SR_RequirementLCX3002.2If the Actionpoint equation results in a transition from FAIL to PASS, LCX shall issue an event message indicating that the actionpoint is now within limitsDemonstrationPass  REQ_Approved 
19657SR_RequirementLCX3002.3If the equation has yielded a Fail result for the table-defined consecutive number of times limit and the Actionpoint is currently Active, LCX shall:
a)       generate an event message
b)       send a command to start the table-defined  RTS
c)       Increment the counter indicating Total count of commands sent to SC task to start an RTS
DemonstrationPass  REQ_Approved 
19659SR_RequirementLCX3002.3.1Once an RTS is initiated, LCX shall change the current state of the associated Actionpoint to Passive. DemonstrationPass  REQ_Approved 
19661SR_RequirementLCX3002.4If the equation has yielded a Fail result for the defined consecutive number of times and the Actionpoint is currently Passive, LCX shall
a)       generate an event message indicating that the Actionpoint Failed but the action was not taken
b)       Increment the counter indicating Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
DemonstrationPass  REQ_Approved 
19663SR_RequirementLCX3003If the Actionpoint is Disabled, LCX shall skip processing that actionpointDemonstrationPass  REQ_Approved 
19665SR_RequirementLCX3004If the Actionpoint is Unused, LCX shall skip processing that actionpointDemonstrationPass  REQ_Approved 
19667SR_RequirementLCX3005If the Actionpoint is Permanently Disabled, LCX shall skip processing that actionpointDemonstrationPass  REQ_Approved 
19669SR_RequirementLCX3006For each Actionpoint, the flight software shall maintain the following statistics in the dump-only Actionpoint Results Table:
a)       The result of the last Sample (Pass, Fail, Error, or Stale)
b)       The current state (PermOff, Disabled, Active, Passive, Unused)
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
19671SR_RequirementLCX3007Upon receipt of a table update indication, LCX shall validate the Actionpoint Definition Table for the following:
a)       valid default state
b)       RTS number (in range)
c)       Event Type (DEBUG, INFO, ERROR, CRITICAL)
d)       Failure Count (in range)
e)       Action Equation syntax
DemonstrationPass  REQ_Approved 
19673SR_RequirementLCX4000Upon receipt of a Set LCX Application State To Active Command, LCX shall set the state of the LCX Application to ActiveDemonstrationPass  REQ_Approved 
19675SR_RequirementLCX4001Upon receipt of a Set LCX Application State to Passive Command, LCX shall set the LCX Application State to PassiveDemonstrationPass  REQ_Approved 
19677SR_RequirementLCX4002Upon receipt of a Set LCX Application State to Disable Command, LCX shall set the LCX Application State to DisabledDemonstrationPass  REQ_Approved 
19679SR_RequirementLCX4003Upon receipt of a Set Actionpoint to Active Command, LCX shall set the state for the command-specified Actionpoint to ACTIVE such that the actionpoint is evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19681SR_RequirementLCX4004Upon receipt of a Set All Actionpoints to Active Command, LCX shall set the state for all Actionpoints to ACTIVE such that the actionpoints are evaluated and the table-defined actions are taken based on the evaluationDemonstrationPass  REQ_Approved 
19683SR_RequirementLCX4005Upon receipt of a Set Actionpoint to Passive Command, LCX shall set the state for the command-specified Actionpoint to PASSIVE such that the actionpoint is evaluated, however, no actions are takenDemonstrationPass  REQ_Approved 
19685SR_RequirementLCX4006Upon receipt of a Set All Actionpoints to Passive Command, LCX shall set the state for the all Actionpoints to PASSIVE such that all actionpoints are evaluated, however, no actions are takenDemonstrationPass  REQ_Approved 
19687SR_RequirementLCX4007Upon receipt of a Set Actionpoint to Disabled Command, LCX shall set the state for the command-specified Actionpoint to DISABLED such that the actionpoints are not evaluated and no actions are takenDemonstrationPass  REQ_Approved 
19691SR_RequirementLCX4009Upon receipt of a Set Actionpoint to Permanent Disable, LCX shall mark the command-specified Actionpoint such that the Actionpoint cannot be ActivatedDemonstrationPass  REQ_Approved 
19703SR_RequirementLCX8000LCX shall generate a housekeeping message containing the following:
a)       Valid  Command Counter
b)       Command Rejected Counter
c)       Number of Start RTS commands NOT sent to SC task because LCX Application is PASSIVE
d)       Current LCX Application State (LCX_ACTIVE, LCX_PASSIVE, LCX_DISABLED)...
e)       Total count of actionpoints sampled while LCX_ACTIVE or LCX_PASSIVE...
f)        Total count of packets monitored for watchpoints (cmd and tlm)
g)       Total count of commands sent to SC task to start an RTS
h)       Selected data from watchpoint results table
i)         Selected data from actionpoint results table
DemonstrationPass  REQ_Approved 
19705SR_RequirementLCX9000Upon cFE Power-On LCX shall initialize the following Housekeeping data to Zero (or value specified):
a)       Valid Command Counter
b)       Command Rejected Counter
c)       Passive RTS Execution Counter
d)       Current LCX State to <PLATFORM_DEFINED> Default Power-on State
e)       Actionpoint Sample Count
f)        TLM Count
g)       RTS Execution Counter
h)       Watch Results (bitmapped)
i)         Action Results (bitmapped)
DemonstrationPass  REQ_Approved 
19707SR_RequirementLCX9001Upon cFE Power-On LCX shall initialize the following Watchpoint data to Zero (or value specified) for all Watchpoints:
a)       The result of the last watchpoint relational comparison to STALE
b)       The number of times this Watchpoint has been compared
c)       The number of times this Watchpoint has crossed from the False to True result
d)       The number of consecutive times the comparison has yielded a True result
e)       The cumulative number of times the comparison has yielded a True result
f)        The value that caused the last False-to-True crossing, and the crossing time stamp
g)       The value that caused the last True-to-False crossing, and the crossing time stamp  
DemonstrationPass  REQ_Approved 
19709SR_RequirementLCX9002Upon cFE Power-On LCX shall initialize the following Actionpoint data to Zero (or value specified for all Actionpoints:
a)       The result of the last Actionpoint Sample to STALE
b)       The current state as defined in the ADT
c)       The number of times this Actionpoint has crossed from the Fail to Pass state
d)       The number of times this Actionpoint has crossed from the Pass to Fail state
e)       The number of consecutive times the equation result = Failed
f)        The cumulative number of times the equation result = Failed
g)       The cumulative count of the RTS executions
h)       Total number of event messages sent
DemonstrationPass  REQ_Approved 
-
-

 
- - \ No newline at end of file