Skip to content

Commit

Permalink
Fixup for script merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jphickey committed Apr 15, 2024
1 parent 59600a5 commit 95b93ea
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fsw/src/sample_app_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ CFE_Status_t SAMPLE_APP_DoExampleCmd(const SAMPLE_APP_DoExampleCmd_t *Msg)
CFE_ES_WriteToSysLog("%s: Command Value=%u", __func__, (unsigned int)Msg->Payload.Value);

/* JPHFIX: Lua bindings need update to allow proper "const" objects */
SCRIPTENGINE_CallFunctionArg("TestFunc2", (void*)&Msg->Payload,
SCRIPTENGINE_CallFunctionArg("TestExampleMessageSend", (void*)&Msg->Payload,
EDS_INDEX(SAMPLE_APP), SAMPLE_APP_DoExample_Payload_DATADICTIONARY);

return CFE_SUCCESS;
Expand Down
16 changes: 15 additions & 1 deletion scripts/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,19 @@ function TestMessageHandler(inmsg)
end
end

function TestExampleMessageSend(msg)
print "This is TestFunc2()"

TestMessageSender("NoopCmd")
if (msg) then
print ("Got A Message: " .. tostring(msg))

-- Using the "call" syntax returns the actual value
print ("The Input value is: " .. msg.Value())
end

testobj = EdsDB.NewMessage(outintf, "NoopCMD")

print("obj=" .. EdsDB.ToHexString(testobj))

CFE.SendMsg(testobj)
end

0 comments on commit 95b93ea

Please sign in to comment.