Firmware update
79
Bonito PRO Technical Manual V1.0.0
Active Silicon frame grabber
Step 5: Close camera file
Euresys frame grabber
void write( const data_vector &data ) const
{
std::cout<<"\n";
const size_t maxWrite = static_cast<size_t>(m_FileAccessLength->GetMax());
data_vector::const_iterator pos = data.begin();
size_t sizeData = data.size();
m_FileOperationSelector->FromString("Write");
while( pos != data.end() )
{
int64_t sizeToWrite = static_cast<int64_t>( std::min( maxWrite,sizeData) );
m_FileAccessLength->SetValue( sizeToWrite );
m_FileAccessBuffer->Set(&*pos, sizeToWrite);
m_FileOperationExecute->Execute();
pos += sizeToWrite;
sizeData -=sizeToWrite;
double percent = 100.0- (sizeData*100.0)/data.size();
std::cout<<std::fixed<<std::setprecision(2)<<"\r"<<percent<<"% ";
}
std::cout<<"\n";
}
Code snippet: Active Silicon code snippet example
template <typename T>
static bool CloseCameraFile(EGrabber<T> &frameGrabber, const std::string &fileName)
{
// basically fopen( fileName,"w")
frameGrabber.setString<RemoteModule>("FileSelector", fileName);
frameGrabber.setString<RemoteModule>("FileOperationSelector", "Close");
frameGrabber.execute<RemoteModule>("FileOperationExecute");
if (frameGrabber.getString<RemoteModule>("FileOperationStatus") == "Success"
&& frameGrabber.getString<RemoteModule>("FileStatus") == "Closed")
{
return true;
}
return false;
}
Code snippet: Euresys code snippet example