October 22, 2024
Chicago 12, Melborne City, USA
C#

How to make a function uncallable by the VxWorks Console


Is there a way to make C functions in VxWorks uncallable from the VxWorks console?

I know setting the function to static would work, but I also need the function to be called from outside its source file.

Example

SpeakerDiagnostics.h

extern void reportSpeakerError(int error); 



SpeakerDiagnostics.c

static int errorBitMask = 0;

void reportSpeakerError(int error)
{
   errorBitMask |= error;
}



Diagnostics.c

#include "SpeakerDiagnostics.h"

void checkSpeaker()
{
    int broken = 0x1;

    //some code

    if (some error check fails)
    {
        reportSpeakerError(broken);
    }
}



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video