virtualIO Purpose This behaviour allows the VCC model to communicate with the Window Dressing application. It sends the contents of the screen buffer out and receives mouse events sending them out to a Port. Parameters This behaviour takes a single parameter ClientString, this string is passed to the screenOut and mouseIn models inorder to generate the relevant kernel names. VCC Symbol Contents Click on one of the above blocks contained within the virtualIO behaviour for further information. |
||||
A predefined VCC block that generates trigger signals with a parameterised frequency. |
||||
Purpose This behaviour receives screen_buffer messages on the screenBuffersIn port and sends them across a Win32 pipe to the Window Dressing application. This module requires the vccStub.lib and win2vcc.lib in order to be built. Parameters This behaviour takes a single parameter ScreenString, this string is passed passed to the ScreenClient constructor and is used to generate kernel object names. Code screenOut: black.h |
||||
#include "black_interface.h" //generated
by "fabricate" #ifndef _screenOut_h_ #define _screenOut_h_ #include "VCCStub.h" class CPP_MODEL_IMPLEMENTATION : public CPP_MODEL_INTERFACE void Init(); void Run(); void WrapUp(); #endif |
||||
screenOut: black.cpp |
||||
#include "black.h"
CPP_MODEL_IMPLEMENTATION::CPP_MODEL_IMPLEMENTATION(const ModuleProto
&proto, InstanceInit &inst) void CPP_MODEL_IMPLEMENTATION::Init() ostream& Error = ErrorStream(); void CPP_MODEL_IMPLEMENTATION::Run() char tempPalette[768]; Stratego_palette_t palette = scrnBuff.get_palette(); Stratego_screen_t screen = scrnBuff.get_screen(); bool result = screenPipeOut->write( if(!result){ void CPP_MODEL_IMPLEMENTATION::WrapUp() |
||||
Purpose On recieving a trigger this block attempts to deque a mouseMessage from a Win32 pipe connected to the Window Dressing application. If a message is dequed it is sent out on the mouseClicksOut port as a mouse_click type. This module requires the vccStub.lib and win2vcc.lib in order to be built. Parameters This behaviour takes a single parameter MouseString, this string is passed passed to the MouseClient constructor and is used to generate kernel object names. Code mouseIn: black.h |
||||
#include "black_interface.h" //generated
by "fabricate" #ifndef _mouseInput_h_ #define _mouseInput_h_ #include "VCCStub.h" class CPP_MODEL_IMPLEMENTATION : public CPP_MODEL_INTERFACE void Init(); #endif |
||||
mouseIn: black.cpp |
||||
#include "black.h"
CPP_MODEL_IMPLEMENTATION::CPP_MODEL_IMPLEMENTATION(const ModuleProto
&proto, InstanceInit &inst) void CPP_MODEL_IMPLEMENTATION::Init() ostream& Error = ErrorStream(); switch( mousePipeIn->connect() ){ void CPP_MODEL_IMPLEMENTATION::Run() ostream& Error = ErrorStream(); switch( mousePipeIn->deQueueMessage(&msg) ){ clicksOut.Post(output); void CPP_MODEL_IMPLEMENTATION::WrapUp() |
||||
|
||||
![]() |
![]() |