Skip to content

Commit

Permalink
adding binding interfaces for IControlMode
Browse files Browse the repository at this point in the history
  • Loading branch information
apaikan committed Dec 1, 2015
1 parent be0a95a commit 3d094af
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bindings/yarp.i
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ MAKE_COMMS(Bottle)
%template(DVector) std::vector<double>;
%template(BVector) std::vector<bool>;
%template(SVector) std::vector<std::string>;
%template(IVector) std::vector<int>;
#if defined(SWIGCSHARP)
SWIG_STD_VECTOR_SPECIALIZE_MINIMUM(Pid,yarp::dev::Pid)
#endif
Expand Down Expand Up @@ -984,6 +985,20 @@ typedef yarp::os::BufferedPort<ImageRgbFloat> BufferedPortImageRgbFloat;
}
}

%extend yarp::dev::IControlMode {
int getControlMode(int j) {
int buffer;
bool ok = self->getControlMode(j, &buffer);
if (!ok) return -1;
return buffer;
}

bool getControlModes(std::vector<int>& data) {
return self->getControlModes(&data[0]);
}
}


%extend yarp::sig::Vector {

double get(int j)
Expand Down

0 comments on commit 3d094af

Please sign in to comment.