Table Update does not update file #708
-
|
I have a table I have updated. But it does not update (save back to disk). After I update if I call CFE_TBL_Update it says CFE_TBL_INFO_NO_UPDATE_PENDING. I definitely updated the table but for some reason it does not pick up the update. The table is stored in the location returned by CFE_TBL_GetAddress. The table is initially loaded successfully but will not save. I tried adding in CFE_TBL_DumpToBuffer and CFE_TBL_Manage but I am either missing a step or doing the stepping in the wrong order. This is the draco-rc4 version of cFE, |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 3 replies
-
|
Did you remember to "Activate" the table?
…-David
On Tue, Sep 26, 2023 at 1:18 PM aebaranoff ***@***.***> wrote:
I have a table I have updated. But it does not update (save back to disk).
After I update if I call CFE_TBL_Update it says
CFE_TBL_INFO_NO_UPDATE_PENDING. I definitely updated the table but for some
reason it does not pick up the update.
The table is stored in the location returned by CFE_TBL_GetAddress. The
table is initially loaded successfully but will not save.
I tried adding in CFE_TBL_DumpToBuffer and CFE_TBL_Manage but I am either
missing a step or doing the stepping in the wrong order.
—
Reply to this email directly, view it on GitHub
<#708>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKJGI2AIBTMPVC3OPTZNMIDX4ME4XANCNFSM6AAAAAA5ICDLFQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
To be more clear,
One first "Loads" a table. This moves the data from a file into a
temporary buffer.
One can then "Verify" the table. This allows the application to look at
the contents of the temporary buffer to make sure it is logically sound for
its purpose.
Then you "Activate" the table. At this point, Table Services will notify
the application the next time it calls "Manage" and the application will
update the contents of the table.
…-David
On Tue, Sep 26, 2023 at 1:35 PM David Kobe ***@***.***> wrote:
Did you remember to "Activate" the table?
-David
On Tue, Sep 26, 2023 at 1:18 PM aebaranoff ***@***.***>
wrote:
> I have a table I have updated. But it does not update (save back to disk).
>
> After I update if I call CFE_TBL_Update it says
> CFE_TBL_INFO_NO_UPDATE_PENDING. I definitely updated the table but for some
> reason it does not pick up the update.
>
> The table is stored in the location returned by CFE_TBL_GetAddress. The
> table is initially loaded successfully but will not save.
>
> I tried adding in CFE_TBL_DumpToBuffer and CFE_TBL_Manage but I am either
> missing a step or doing the stepping in the wrong order.
>
> —
> Reply to this email directly, view it on GitHub
> <#708>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AKJGI2AIBTMPVC3OPTZNMIDX4ME4XANCNFSM6AAAAAA5ICDLFQ>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
|
How do I activate? I am new to cFE/CFS. Thanks, |
Beta Was this translation helpful? Give feedback.
-
|
There should be an Activate command in your command database for your ground system to do it. |
Beta Was this translation helpful? Give feedback.
-
|
I want to activate it on the payload. |
Beta Was this translation helpful? Give feedback.
-
|
Ah, I have been misunderstanding what you were trying to do. Is the application modifying the table the same one that uses the table? Or are you trying to modify the table of Application "A" with Application "B"? |
Beta Was this translation helpful? Give feedback.
-
|
Based on HW interaction we want to save a table updates. Also, if the ground commands it we would change the table and then that would update the flash file copy of the table. |
Beta Was this translation helpful? Give feedback.
-
|
Sounds like your paradigm might be a little different from what Table services was originally designed to do. However, it can still be done but you may need to send commands over the software bus to the CFE TBL application to make it work correctly. Let me see if I understand what you are trying to do: An application is registering a table with table services with a call to CFE_TBL_Register(). If this is the general usage of the table, you should also be sure to call CFE_TBL_Modified() whenever you have changed the contents. This will result in a flag in telemetry letting the ground operator know that the table image is no longer the same as the original source. It also makes it clear to table services that the table has changed and if it is a Critical table, it will update the copy kept in the Critical Data Store. Now, I think you are saying that you want to save the table updates to some non-volatile location (e.g. file storage). If you want to save it to a file on your file system, I would form a command in your application to the CFE TBL application that commands CFE TBL to "Dump" the table to a filename of your choice and send that as a message on the software bus. CFE TBL services will then communicate back to your application (via the CFE_TBL_Manage() API) and dump the contents of the table into the file you specified. |
Beta Was this translation helpful? Give feedback.
In the initialization section, the code following CFE_TBL_Manage shouldn't be needed. CFE_TBL_Manage will do any verification if there is any that needs to be done. The status returned by CFE_TBL_Load will let you know whether the file was successfully loaded into the table or not.
In the TableUpdate function, the first assignment statement may be copying the contents of the table into Config[TableData->index]. You are now manipulating the contents of a copy rather than the actual active table managed by Table Services. I would suggest the code looking something like the following:
TableData->test = TableData->test - 1;Then notify Table Services that the contents have been modified:
CFE…