00001 #include "IOComponent.hpp"
00002
00003
00004 #include "ocl/ComponentLoader.hpp"
00005 ORO_CREATE_COMPONENT( OCL::IOComponent )
00006
00007 using namespace Orocos;
00008
00009 namespace OCL
00010 {
00011
00012 void IOComponent::createAPI()
00013 {
00014
00015 this->methods()->addMethod( method( "addAnalogInput", &IOComponent::addAnalogInput, this),
00016 "Add an analog input as data port",
00017 "PortName", "The name of the port to create.",
00018 "Inputname", "The name of the AnalogInInterface device to use.",
00019 "Channel", "The channel of the device to use.");
00020 this->methods()->addMethod( method( "addAnalogOutput", &IOComponent::addAnalogOutput, this),
00021 "Add an analog input as data port",
00022 "PortName", "The name of the port to create.",
00023 "Outputname", "The name of the AnalogOutInterface device to use.",
00024 "Channel", "The channel of the device to use.");
00025 this->methods()->addMethod( method( "addDigitalInput", &IOComponent::addDigitalInput, this),
00026 "Add an digital input",
00027 "Name", "The name of the new input.",
00028 "Inputname", "The name of the DigitalInInterface device to use.",
00029 "Channel", "The channel of the device to use.",
00030 "Invert", "Set to true to invert this bit.");
00031 this->methods()->addMethod( method( "addDigitalOutput", &IOComponent::addDigitalOutput, this),
00032 "Add an digital input",
00033 "Name", "The name of the new output.",
00034 "Outputname", "The name of the DigitalOutInterface device to use.",
00035 "Channel", "The channel of the device to use.",
00036 "Invert", "Set to true to invert this bit.");
00037
00038
00039 this->methods()->addMethod( method( "addAnalogInputs", &IOComponent::addAnalogInInterface, this),
00040 "Add an AnalogInInterface as an array data port",
00041 "PortName", "The name of the port to create.",
00042 "Inputname", "The name of the AnalogInInterface device to use.");
00043
00044 this->methods()->addMethod( method( "addAnalogOutputs", &IOComponent::addAnalogOutInterface, this),
00045 "Add an AnalogOutInterface as an array data port",
00046 "PortName", "The name of the port to create.",
00047 "Outputname", "The name of the AnalogOutInterface device to use.");
00048
00049 this->methods()->addMethod( method( "addInputChannel", &IOComponent::addInputChannel, this),
00050 "Add an analog input signal into InputValues",
00051 "Pos", "The position of the signal in ChannelValues.",
00052 "InputName", "The name of the AnalogInInterface device to use.",
00053 "Channel", "The channel of the device to use.");
00054 this->methods()->addMethod( method( "addOutputChannel", &IOComponent::addOutputChannel, this),
00055 "Add an analog input signal into OutputValues",
00056 "Pos", "The position of the signal in ChannelValues.",
00057 "OutputName", "The name of the AnalogOutInterface device to use.",
00058 "Channel", "The channel of the device to use.");
00059
00060
00061 this->methods()->addMethod( method( "switchOn", &IOComponent::switchOn, this),
00062 "Switch A Digital Output on",
00063 "Name","The Name of the DigitalOutput."
00064 );
00065 this->methods()->addMethod( method( "isOn", &IOComponent::isOn, this),
00066 "Inspect the status of a Digital Input or Output.",
00067 "Name", "The Name of the Digital Input or Output."
00068 );
00069 this->methods()->addMethod( method( "switchOff", &IOComponent::switchOff, this),
00070 "Switch A Digital Output off",
00071 "Name","The Name of the DigitalOutput."
00072 );
00073 this->methods()->addMethod( method( "value", &IOComponent::value, this),
00074 "Inspect the value of an Analog Input or Output.",
00075 "Name", "The Name of the Analog Input or Output."
00076 );
00077 this->methods()->addMethod( method( "rawValue", &IOComponent::rawValue, this),
00078 "Inspect the raw value of an Analog Input or Output.",
00079 "Name", "The Name of the Analog Input or Output."
00080 );
00081 this->methods()->addMethod( method( "inputChannels", &IOComponent::getInputChannels, this),
00082 "Get the number of channels this component monitors."
00083 );
00084 this->methods()->addMethod( method( "outputChannels", &IOComponent::getOutputChannels, this),
00085 "Get the number of channels this component outputs."
00086 );
00087 }
00088 }