diff --git a/src/cas/example/vxEntry.cc b/src/cas/example/vxEntry.cc index 4a416117b..2d2a23cab 100644 --- a/src/cas/example/vxEntry.cc +++ b/src/cas/example/vxEntry.cc @@ -1,11 +1,25 @@ +// +// $Id$ +// Author: Jeff HIll (LANL) +// +// $Log$ +// #include #include // -// main() +// so we can call this from the vxWorks shell // -int excas (unsigned debugLevel=0u, unsigned delaySec=0) +extern "C" { + +exServer *pExampleCAS; + +// +// excas () +// (vxWorks example server entry point) +// +int excas (unsigned debugLevel, unsigned delaySec) { osiTime begin(osiTime::getCurrent()); exServer *pCAS; @@ -16,12 +30,13 @@ int excas (unsigned debugLevel=0u, unsigned delaySec=0) } pCAS->setDebugLevel(debugLevel); + pExampleCAS = pCAS; if (delaySec==0u) { // // loop here forever // - while (aitTrue) { + while (1) { taskDelay(10); } } @@ -37,7 +52,19 @@ int excas (unsigned debugLevel=0u, unsigned delaySec=0) delay = osiTime::getCurrent() - begin; } } + pCAS->show(debugLevel); + pExampleCAS = NULL; delete pCAS; - return (0); + return 0; } +int excasShow(unsigned level) +{ + if (pExampleCAS!=NULL) { + pExampleCAS->show(level); + } + return 0; +} + +} // extern "C" +