ADCDevice::ADCDevice() : BaseDevice() { this->connectionPoints = new list<ConnectionPoint*> (); this->pinouts = new std::list<Pinout*>(); this->outPoint = new OutConnectionPoint( 2, "Output", "ADC Device Output", FLOAT_TYPE, new float(0) ); this->outPoint->RegisterRefreshHandler( this ); this->connectionPoints->push_back( outPoint ); // ADC Pionout definition: Command cmdInit( INIT_CMD ); Command cmdStop( STOP_CMD ); list<Command>* pinoutSupportedCommands = new list<Command>(); pinoutSupportedCommands->push_back( cmdInit ); pinoutSupportedCommands->push_back( cmdStop ); list<Event>* pinoutSupportedEvents = new list<Event>(); list<EventParameter>* eventParams = new list<EventParameter>(); eventParams->push_back( EventParameter( ADCDevice_VALUE, 0, INT_TYPE ) ); Event eventClick( ADCDevice_VALEVENT, eventParams ); pinoutSupportedEvents->push_back( eventClick ); Pinout* pinout = new Pinout( 0, "ADC Pinout", "ADC Device Pinout", pinoutSupportedCommands, pinoutSupportedEvents ); pinout->PinoutEventTriggered = &PinoutEventTriggered; this->pinouts->push_back( pinout ); this->currentPinoutValue = 0.0f; this->SetName( ADCDevice_DEVNAME ); }
void osdHandleFirst(AG_Event *event) { state.currentFrame = 0; if (state.mode & SM_RECORD) { cmdStop(0); } osdUpdate(); }
void osdHandleLast(AG_Event *event) { state.currentFrame = state.totalFrames - 1; cmdStop(0); osdUpdate(); }
void osdHandleNext(AG_Event *event) { if (state.currentFrame < state.totalFrames - 1) state.currentFrame++; cmdStop(0); osdUpdate(); }
void osdHandlePrev(AG_Event *event) { if (state.currentFrame > 0) state.currentFrame--; cmdStop(0); osdUpdate(); }