Skip to content

Commit 7eb9447

Browse files
authored
Merge pull request #99 from nasa/fix-98-python-missionlib
Fix #98, resolve build errors in missionlib python module
2 parents 02bdefb + 929a656 commit 7eb9447

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

cfecfs/missionlib/python/src/cfe_missionlib_python_database.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
#include "cfe_missionlib_runtime.h"
4040

4141
#include "cfe_mission_eds_interface_parameters.h"
42-
#include "ccsds_spacepacket_eds_datatypes.h"
43-
#include "ccsds_spacepacket_eds_defines.h"
42+
#include "cfe_hdr_eds_datatypes.h"
43+
#include "cfe_hdr_eds_defines.h"
4444
#include "cfe_sb_eds_datatypes.h"
4545
#include "edslib_binding_objects.h"
4646

@@ -382,7 +382,8 @@ static PyObject *CFE_MissionLib_Python_DecodeEdsId(PyObject *obj, PyObject *args
382382

383383
Py_ssize_t BytesSize;
384384
char *NetworkBuffer;
385-
CFE_MSG_Message_Buffer_t LocalBuffer;
385+
386+
EdsNativeBuffer_CFE_HDR_Message_t LocalBuffer;
386387

387388
EdsInterface_CFE_SB_SoftwareBus_PubSub_t PubSubParams;
388389
EdsComponent_CFE_SB_Publisher_t PublisherParams;
@@ -438,15 +439,15 @@ static PyObject *CFE_MissionLib_Python_DecodeEdsId(PyObject *obj, PyObject *args
438439
CFE_MissionLib_UnmapPublisherComponent(&PublisherParams, &PubSubParams);
439440
TopicId = PublisherParams.Telemetry.TopicId;
440441

441-
Status = CFE_MissionLib_GetArgumentType(IntfDb->IntfDb, EdsInterface_CFE_SB_Telemetry_ID,
442+
Status = CFE_MissionLib_GetArgumentType(IntfDb->IntfDb, EDS_INTERFACE_ID(CFE_SB_Telemetry),
442443
PublisherParams.Telemetry.TopicId, 1, 1, &EdsId);
443444
}
444445
else if (CFE_MissionLib_PubSub_IsListenerComponent(&PubSubParams))
445446
{
446447
CFE_MissionLib_UnmapListenerComponent(&ListenerParams, &PubSubParams);
447448
TopicId = ListenerParams.Telecommand.TopicId;
448449

449-
Status = CFE_MissionLib_GetArgumentType(IntfDb->IntfDb, EdsInterface_CFE_SB_Telecommand_ID,
450+
Status = CFE_MissionLib_GetArgumentType(IntfDb->IntfDb, EDS_INTERFACE_ID(CFE_SB_Telecommand),
450451
ListenerParams.Telecommand.TopicId, 1, 1, &EdsId);
451452
}
452453
else
@@ -482,7 +483,7 @@ static PyObject * CFE_MissionLib_Python_Set_PubSub(PyObject *obj, PyObject *arg
482483
EdsLib_Python_ObjectBase_t *Python_Packet;
483484
EdsLib_Python_Buffer_t *StorageBuffer;
484485
EdsLib_Binding_Buffer_Content_t edsbuf;
485-
CFE_MSG_Message_t *Packet;
486+
EdsDataType_CFE_HDR_Message_t *Packet;
486487

487488
EdsComponent_CFE_SB_Listener_t Params;
488489
EdsInterface_CFE_SB_SoftwareBus_PubSub_t PubSub;
@@ -529,7 +530,7 @@ static PyObject * CFE_MissionLib_Python_Set_PubSub(PyObject *obj, PyObject *arg
529530
Python_Packet = (EdsLib_Python_ObjectBase_t *) arg3;
530531
StorageBuffer = Python_Packet->StorageBuf;
531532
edsbuf = StorageBuffer->edsbuf;
532-
Packet = (CFE_MSG_Message_t *) edsbuf.Data;
533+
Packet = (EdsDataType_CFE_HDR_Message_t *) edsbuf.Data;
533534

534535
CFE_MissionLib_MapListenerComponent(&PubSub, &Params);
535536
CFE_MissionLib_Set_PubSub_Parameters(Packet, &PubSub);

cfecfs/missionlib/python/src/cfe_missionlib_python_interface.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,15 @@ PyObject *CFE_MissionLib_Python_Interface_GetFromIntfName(CFE_MissionLib_Python_
372372
int32_t status;
373373
uint16_t InterfaceId;
374374

375-
status = CFE_MissionLib_FindInterfaceByName(dbobj->IntfDb, PyBytes_AsString(IntfName), &InterfaceId);
375+
status = CFE_MissionLib_FindInterfaceByName(obj->IntfDb, PyBytes_AsString(InterfaceName), &InterfaceId);
376376

377377
if (status != CFE_MISSIONLIB_SUCCESS)
378378
{
379-
PyErr_Format(PyExc_RuntimeError, "Interface %s undefined", PyBytes_AsString(IntfName));
379+
PyErr_Format(PyExc_RuntimeError, "Interface %s undefined", PyBytes_AsString(InterfaceName));
380380
return NULL;
381381
}
382382

383-
return (PyObject*)CFE_MissionLib_Python_Interface_GetFromInterfaceId_Impl(&CFE_MissionLib_Python_InterfaceType, (PyObject *)dbobj, InterfaceId);
383+
return (PyObject*)CFE_MissionLib_Python_Interface_GetFromInterfaceId_Impl(&CFE_MissionLib_Python_InterfaceType, (PyObject *)obj, InterfaceId);
384384
}
385385

386386
static PyObject * CFE_MissionLib_Python_Interface_iter(PyObject *obj)

cfecfs/missionlib/python/src/cfe_missionlib_python_topic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,15 +416,15 @@ PyObject *CFE_MissionLib_Python_Topic_GetFromTopicName(CFE_MissionLib_Python_Int
416416
}
417417
}
418418

419-
status = CFE_MissionLib_FindTopicByName(intfobj->DbObj->IntfDb, intfobj->InterfaceId, PyBytes_AsString(TopicName), &TopicId);
419+
status = CFE_MissionLib_FindTopicByName(obj->DbObj->IntfDb, obj->InterfaceId, PyBytes_AsString(TopicName), &TopicId);
420420

421421
if (status != CFE_MISSIONLIB_SUCCESS)
422422
{
423423
PyErr_Format(PyExc_RuntimeError, "Topic %s undefined:%u", PyBytes_AsString(TopicName));
424424
return NULL;
425425
}
426426

427-
return (PyObject*)CFE_MissionLib_Python_Topic_GetFromTopicId_Impl(&CFE_MissionLib_Python_TopicType, (PyObject *)intfobj, TopicId);
427+
return (PyObject*)CFE_MissionLib_Python_Topic_GetFromTopicId_Impl(&CFE_MissionLib_Python_TopicType, (PyObject *)obj, TopicId);
428428
}
429429

430430
static PyObject * CFE_MissionLib_Python_Topic_iter(PyObject *obj)

0 commit comments

Comments
 (0)