I've looked at the code - it all makes sense.
A question about your test case, though: What's the spacecraft id for? I
presume you meant that to be some sort of identifier, but should it end
up in the encoded command, too?
PayloadCodec supports encoding to GenericPayload, which carries a
payloadIdentifier. That would be the logical place to stick some id
(like ApId) for the encoded command. For TM, we used the "HEADER" / base
container reference in XTCE (see our test xml file). What's the
equivalent we'd use for encoding commands?
Regarding the CCSDS protocols support: Commanding is definitely
supported, see
org.hbird.transport.protocols.ccsds.spacepacket.CcsdsPacketEncoder.
If it is initialised with CcsdsPacketType.TC, it will set the command
flag to 1. The rest is identical to TM encoding.
On 04/29/2012 03:41 PM, Mark Doyle wrote:
> I did this this morning. It has one test and which passes ok.
>
> It needs reviewing, tweaking etc because I had a toddler hanging off my
> arm at the same time. Lauri and Johannes are probably best to go over it?
>
> Test is here which should give you an idea of how it works:
>
https://github.com/JohannesKlug/hbird/blob/master/src/core/xtce/src/test/java/org/hbird/core/xtce/CommandModelTest.java
>
> I think the solution will work. The payload codec should be able to
> encode the commands without any adjustments.
>
> I made some assumptions with XTCE as it's a little over complex for us!
>
> * A command argument is treated the same as a Parameter. You can use
> the terms interchangeably when referring to commands (it wouldn't
> make sense to call a TM parameter an argument).
> * Currently only support the definition of arguments using the
> <
https://github.com/JohannesKlug/hbird/blob/master/src/core/xtce/src/test/resources/org/hbird/core/xtce/TestSat-all-uints.xml>l
> * Commands are defined by MetaCommands. The CommandContainer seems, on
> the surface, to define attributes outside of our current scope.
> * Arguments *must *be defined along with their type in
> the xtce:CommandMetaData section of the xml file. In theory there is
> no problem in reusing parameters and their type definition from the
> xtce:TelemetryMetaData section. This would prevent duplication of
> common types (for example, 1 bit flag, 8 bit ints). An adjustment to
> the XtceSpaceSystemModelFactory class would achieve this.
> * Like TM (I think) we ignore initial value and a few other xtce
> attributes.
>
> TODO:
>
> * I haven't changed the publisher. This means one can't grab a list of
> currently supported commands or (in the future) be updated if the
> command model changes. It's next on the list.
> * There is currently no CCSDS protocols support for command