EIR-OPS-013: Storage Channel Operations
Objective
To perform different operations related to the on-board storage channels.
Introduction
This procedure will guide the Operator through the different parameters and actions that can be used to work with the on-board storage channels.
Procedure
This procedure has the following sub-procedures:
Important
These sub-procedures have been grouped together in this procedure as they are all related to the on-board storage channels. However, each of the sub-procedures are standalone procedures that can be carried individually to achieve the objectives/assess the settings stated in the sub-procedure titles.
Note
A communication window is required for each of these sub-procedures.
A. Determine the No. of Rows in a Channel
A.1.
Prior to the pass, establish which storage channel ID you wish to perform this operation for.
This channel ID will be referred to as ‘ChID’ for the remainder of this section.
Tip
The ROW Google Sheet provides information on channel IDs for different data types.
Important
You are about to send the first TC of this procedure - Have you completed the EIR-OPS-003: Start a Communication Pass procedure? A Communication Pass must be started prior to carrying out the operations planned for the pass. Don’t forget to open and set-up the parameters/actions that will be required before the pass starts!
A.2.
To determine how many rows of data are currently in a storage channel,
Querythecore.Storage.channelContentparameter with theParameter index in block= ChID (dec).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes |
Data Info |
|
Allowed Value(s) |
1 - 88 (dec) |
Expected Value(s) |
ChID (dec). |
TM Details |
|
Data Expected from TC |
Number of rows in ChID ( + ACK ) |
Data Size |
4 bytes |
Data Info |
Number of rows in the channel |
Allowed Value(s) |
0 - 65535 (dec) |
A.3.
As an alternative approach or to verify the TM from the previous step,
Getthecore.Storage.numRowsparameter withFirst row=Last row= ChID (dec).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes, 4 bytes |
Data Info |
|
Allowed Value(s) |
1 - 88 (dec), 1 - 88 (dec) |
Expected Value(s) |
ChID (dec), ChID (dec) |
TM Details |
|
Data Expected from TC |
Number of rows in ChID ( + ACK ) |
Data Size |
4 bytes |
Data Info |
Number of rows in the channel |
Allowed Value(s) |
0 - 65535 (dec) |
B. Determine if a Channel is Full
B.1.
Prior to the pass, establish which storage channel ID you wish to perform this operation for.
This channel ID will be referred to as ‘ChID’ for the remainder of this section.
Tip
The ROW Google Sheet provides information on channel IDs for different data types.
B.2.
To determine whether a channel is full,
Getthe parametercore.Storage.isFullwithFirst row=Last row= ChID (dec).If 0 is returned, that storage channel is not currently full.
Else, the channel is full.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes, 4 bytes |
Data Info |
|
Allowed Value(s) |
1 - 88 (dec), 1 - 88 (dec) |
Expected Value(s) |
ChID (dec), ChID (dec) |
TM Details |
|
Data Expected from TC |
|
Data Size |
Boolean |
Data Info |
1 = Full, 0 = Not Full |
Allowed Value(s) |
0 - 1 |
Note
For a full storage channel, if the channel is circular then any data written to the channel will result in the oldest data being erased from the channel. However, if the channel is linear, any attempt to write data to the channel will fail. This is explained in more detail in Section 3.4 Storage Channels & Downlink Logic .
B.3.
Different operations can be performed once a channel is full.
Depending on the desired outcome, the data stored in the channel can be downlinked and/or the channel can be ‘wiped’ of data as per Section C. Wipe a Storage Channel .
C. Wipe a Storage Channel
C.1.
Prior to the pass, establish which storage channel ID you wish to perform this operation for.
This channel ID will be referred to as ‘ChID’ for the remainder of this section.
Tip
The ROW Google Sheet provides information on channel IDs for different data types.
C.2.
To erase/wipe the contents of a storage channel,
Invokethe actioncore.Storage.wipewith the action argument = ChID (dec).
Caution
This action will permanently erase the data in the defined storage channel. Therefore, ensure that the data in the channel is first downlinked following the procedure EIR-OPS-011: Downlink Data From Storage if the data is of importance prior to carrying out this TC.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes |
Data Info |
The ID of the channel to wipe |
Allowed Value(s) |
1 - 88 (dec) |
Expected Value(s) |
ChID (dec) |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
C.3.
Follow Section A. Determine the No. of Rows in a Channel to confirm the channel is now empty.
D. Uplink to a Channel
D.1.
Before uplinking data to a storage channel, a channel that is not currently in use must be found. To do this,
Getthe parametercore.Storage.isClaimedwithFirst row= 1 andLast row= 88 (i.e. the number of channels configured in the OBSW).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes, 4 bytes |
Data Info |
|
Allowed Value(s) |
1-88 (dec), 1-88 (dec) |
Expected Value(s) |
1 (dec), 88 (dec) |
TM Details |
|
Data Expected from TC |
|
Data Size |
List of booleans |
Data Info |
0 if channel not claimed |
Allowed Value(s) |
0-1 for each row of the parameter |
D.2.
For each row/channel,
core.Storage.isClaimedreturns a boolean.If 0 is returned, a channel is not claimed and can be used to uplink data to.
Therefore, from the TM returned in Step D.1, select an unclaimed channel, where
core.Storage.isClaimed= 0, for use in the next steps.This channel ID will be referred to as ‘ChID’ for the remainder of this section.
D.3.
Once ChID is identified, the Operator must also confirm that there is no existing data in that channel. To do this,
Querythecore.Storage.channelContentparameter with theParameter index in block= ChID (dec).If 0 (rows) is returned, proceed to the next step.
Else, there is data in the channel. Consult with the Software Engineer to determine how to proceed. Alternatively, return to Step D.1. to identify another unclaimed channel.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes |
Data Info |
|
Allowed Value(s) |
1 - 88 (dec) |
Expected Value(s) |
ChID (dec). |
TM Details |
|
Data Expected from TC |
Number of rows in the channel ( + ACK ) |
Data Size |
4 bytes |
Data Info |
Number of rows in the channel |
Allowed Value(s) |
0 - 65535 (dec) |
D.4.
To determine the format of the storage channel that the data will be uplinked to,
Getthe parametercore.Storage.rowLengthwithFirst row=Last row= ChID (dec).The value returned is the current row length (in bytes) configured for the rows of the specified channel (i.e. ChID).
If
rowLengthis already as desired, skip ahead to Step D.7.Else, proceed to the next step.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes, 4 bytes |
Data Info |
|
Allowed Value(s) |
1-88 (dec), 1-88 (dec) |
Expected Value(s) |
ChID (dec), ChID (dec) |
TM Details |
|
Data Expected from TC |
|
Data Size |
4 bytes |
Data Info |
Row length of storage channel |
Allowed Value(s) |
00000000 - FFFFFFFF (hex) |
Note
Setting the core.Storage.rowLength of a storage channel will cause an attempt to format the channel to the new length. This will only succeed if the channel is unclaimed (not in use). Reformatting a channel will cause all data existing in the channel to be lost/erased.
D.5.
Setthe parametercore.Storage.rowLengthwithFirst row=Last row= ChID (dec) to a row length that is consistent with the data you are uplinking.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes, 4 bytes, 4 bytes |
Data Info |
|
Allowed Value(s) |
1-88 (dec), 1-88 (dec), 00000000 - FFFFFFFF (hex) |
Expected Value(s) |
ChID (dec), ChID (dec), N/A |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
D.6.
Confirm the
Setin the previous step with aGet(i.e. confirm the value was set successfully).
D.7.
Important
As you are about to perform a large uplink of data to the spacecraft, ensure that MCS’s Transfer Window is visible to the Operator before proceeding with this step.
Uplinkthe desired data file to the parametercore.storage.channelContentwith:First row= 0,Last row= the number of rows in the data file (given the ChID’srowLength) - 1, andResize ticked.
Caution
If the data in the file you intend to uplink is in hex, ensure the file is saved as such (e.g. in Sublime Text, save the the file with hex encoding via ‘File > Save with Encoding > Hexadecimal’).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes; 4 bytes; 4 bytes; 1 byte |
Data Info |
|
Allowed Value(s) |
0001 - FFFF (Hex); N/A; N/A; 0 - 1 |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
D.8.
Wait for the Transfer Window on MCS to indicate that the uplink has completed successfully.
D.9.
To further verify that the uplink completed successfully,
Querythecore.Storage.channelContentparameter with theParameter index in block= ChID (dec).Ensure the number of rows in ChID = the number of rows in the data file (given the ChID’s
rowLength).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes |
Data Info |
|
Allowed Value(s) |
1 - 88 (dec) |
Expected Value(s) |
ChID (dec). |
TM Details |
|
Data Expected from TC |
Number of rows in the channel ( + ACK ) |
Data Size |
4 bytes |
Data Info |
Number of rows in the channel |
Allowed Value(s) |
0 - 65535 (dec) |
Expected Value(s) |
The number of rows in the data file |
E. Assign a Logger to a Channel
E.1.
Before assigning a logger to a storage channel, a channel that is not currently in use must be found. To do this,
Getthe parametercore.Storage.isClaimedwithFirst row= 1 andLast row= 88 (i.e. the number of channels configured in the OBSW).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes, 4 bytes |
Data Info |
|
Allowed Value(s) |
1-88 (dec), 1-88 (dec) |
Expected Value(s) |
1 (dec), 88 (dec) |
TM Details |
|
Data Expected from TC |
|
Data Size |
List of booleans |
Data Info |
0 if channel not claimed |
Allowed Value(s) |
0-1 for each row of the parameter |
E.2.
For each row/channel,
core.Storage.isClaimedreturns a boolean.If 0 is returned, a channel is not claimed and can be used to uplink data to.
Therefore, from the TM returned in Step E.1, select an unclaimed channel, where
core.Storage.isClaimed= 0, for use in the next steps.This channel ID will be referred to as ‘ChID’ for the remainder of this section.
E.3.
Once ChID is identified, the Operator must also confirm that there is no existing data in that channel. To do this,
Querythecore.Storage.channelContentparameter with theParameter index in block= ChID (dec).If 0 (rows) is returned, proceed to the next step.
Else, there is data in the channel. Consult with the Software Engineer to determine how to proceed. Alternatively, return to Step E.1. to identify another unclaimed channel.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
4 bytes |
Data Info |
|
Allowed Value(s) |
1 - 88 (dec) |
Expected Value(s) |
ChID (dec). |
TM Details |
|
Data Expected from TC |
Number of rows in the channel ( + ACK ) |
Data Size |
4 bytes |
Data Info |
Number of rows in the channel |
Allowed Value(s) |
0 - 65535 (dec) |
E.4.
To assign the desired Logger to ChID,
Setthe Logger’scdh.logging.XXXXLogger.channelIdparameter to ChID (dec), whereXXXX=ADCS,HK,TED, etc.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
2 bytes |
Data Info |
Channel ID the logger will write to |
Allowed Value(s) |
1-88 (dec) |
Expected Value(s) |
ChID (dec) |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
E.5.
Confirm the
Setin the previous step with aGet(i.e. confirm the value was set successfully).
E.6.
If the Operator wishes to enable this Logger,
Setthe Logger’scdh.logging.XXXXLogger.enabledparameter to 1.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Size |
Boolean |
Data Info |
Enable (1) or disable (0) logging |
Allowed Value(s) |
0-1 |
Expected Value(s) |
1 |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
E.7.
Confirm the
Setin the previous step with aGet(i.e. confirm the value was set successfully).
Note
It can take up to ~1 minute for a logger to enable/disable.
END OF PROCEDURE