Action Item #549

Port picam pncMsgSend() to libpibox

Added by Hammel over 4 years ago. Updated 10 months ago.

Status:ClosedStart date:05 Sep 2016
Priority:ImmediateDue date:
Assignee:Hammel% Done:


Target version:PiBox - 1.1.0 - Upgrades
Severity:03 - Medium


This is a client function for messaging piboxd. That means the type, action and subaction definitions need to move into libpibox too.

Related issues

Related to PiBox - Feature #433: Add an API/library for app messaging New 06 Mar 2015
Blocked by monkey - Bug #749: Upstream web site disappeared Closed 10 Mar 2020

Associated revisions

Revision db3c80f2
Added by Hammel 10 months ago

RM #549: Migrate piboxMsg to a more complete API so multiple apps can use it.

Revision c571ad38
Added by Hammel 10 months ago

RM #549: Don't try to write to a NULL pointer.

Revision a9c2b19e
Added by Hammel 10 months ago

RM #549: Add missing tag send to piboxMsg.

Revision af90c05b
Added by Hammel 10 months ago

RM #549: Make sure MT_STREAM actions require a payload.

Revision 54e4aae4
Added by Hammel 10 months ago

RM #549: Migrate picam to libpibox's version of piboxMsg(), which is now more full featured than the old local version, which is being removed.

Revision e5fc9562
Added by Hammel 10 months ago

RM #549: Remove deprecated piboxMsgSend from utils header.

Revision 826d5b32
Added by Hammel 10 months ago

RM #549: Remove piboxMsgSend from utils. It's not used and if it is needed later there is a better version in libpibox.


#1 Updated by Hammel about 4 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 30

piboxMsg() is now in libpibox but picam is still using piboxMsgSend() in it's utils.c module. I need to check that the latter can be replaced with the former, then make sure all message types are supported in the library function.

#2 Updated by Hammel almost 2 years ago

  • Target version changed from 0.12.0 to 1.1.0 - Upgrades

#3 Updated by Hammel 11 months ago

  • Priority changed from Urgent to Immediate
  • Severity changed from 02 - High to 03 - Medium

#4 Updated by Hammel 11 months ago

The piboxlib version of the function is not as full featured as the picam version. So the former needs updating. But I wasn't sure who else was using it. Turns out no one is using it except PiCam. So I can update the library to the PiCam version and test that, then update a Dev platform with the new library, builds all the apps and make sure they all still work.

To verify that no one else is using it I just grep'd for piboxMsg in every app that I wrote that doesn't wrap some 3rd party software. Looks like only PiCam is using this function. So I THINK I'm safe in doing this.

Ran the following command from the top of my source trees:

find pi* appmgr iotapp ironman launcher libpibox musicfe pnc videofe xeonnc -type f -name "*.c" -exec grep -li piboxmsg {} \;

It generated this list

  • picam: the thing I wanted updated by this issue
  • pitemplate: a copy of picam
  • pixm: an unused utility function that should be removed
  • iotapp: also needs updating, like picam
  • libpibox: library function picam and iotapp will use, plus unit tests
  • xeonnc: also needs updating, like picam

#5 Updated by Hammel 11 months ago

piboxlib is ported and basically passes unit tests. I need to run it with piboxd running to complete those unit test runs.

I can then package piboxlib for rpi4's archive and rebuild the rootfs and staging tree. Then I can start to update the apps to use the updated piboxMsg() function.

#6 Updated by Hammel 10 months ago

  • % Done changed from 30 to 40

libpibox tested with piboxd and passed.

rpi4 build updated with latest libpibox. Ready to port apps.

#7 Updated by Hammel 10 months ago

Initial test failed because libpibox had a segfault (attempt to write to NULL pointer). That's now fixed.

Tried to build apps but Monkey build was broken (see RM #749). That's fixed now. Building apps again.

#8 Updated by Hammel 10 months ago

Next problem: picam worked after fixing a few bugs in libpibox but it didn't switch to the correct VT on exit. I have a bug report (RM #751) for adding a function to libpibox for fixing this.

After finding the right vtsrc I was able to verify that the old picam is working. I believe the new picam will also work but need to retest it. I just set vtsrc in the config file to correct vt where X is running.

#9 Updated by Hammel 10 months ago

Picam worked just fine. I am now fixing all other references and removing extraneous utility copies of piboxMsg from other code.

#10 Updated by Hammel 10 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 40 to 100

Done. All updates committed, tested (except xeonnc, but that project will need re-evaluation later anyway) and pushed.

Closing issue.

Also available in: Atom PDF