ViscaParser C++ lib. Control protocol parser library for VISCA camera

€200.00

ViscaParser C++ library is designed for parsing VISCA (trademark of Sony Corporation) protocol messages.

LICENSE: We sell source code of this library as is, without future updates and technical support according to perpetual non-exclusive royalty-free license. You pay once and can use this library in your software and hardware products without limits. Please read the license agreement before purchasing: LICENSE.

ViscaParser C++ library is designed for parsing VISCA (trademark of Sony Corporation) protocol messages.

LICENSE: We sell source code of this library as is, without future updates and technical support according to perpetual non-exclusive royalty-free license. You pay once and can use this library in your software and hardware products without limits. Please read the license agreement before purchasing: LICENSE.

Overview

The ViscaParser is a C++ library for encoding control commands and checking responses for VISCA protocol messages. The library is designed according to the VISCA protocol description for the camera Sony FCB-EV7520A. The library allows developer to control other cameras that support the VISCA protocol. Before encoding and decoding specific commands, please check the source code of the library for the corresponding command according to the technical description of your camera. The library includes basic methods for preparing commands (encoding) and interpreting the camera responses (checking command arguments). It uses C++17 standard. The library provides simple interface and doesn’t have third party dependencies. Also, the library includes test application to test communication with cameras. Test application depends on SerialPort library (provides methods to work with serial ports, source code included, Apache 2.0 license).

Documentation

Documentation: GO TO DOCUMENTATION

Simple interface

class ViscaParser
{
public:

    /// Encode COMMAND or ENQUIRY COMMAND.
    bool encodeCommand(
        visca::ViscaPackets commandId, uint8_t* packet,
        uint32_t& packetSize, uint32_t cameraAddress,
        uint32_t param1 = 0, uint32_t param2 = 0,
        uint32_t param3 = 0, uint32_t param4 = 0,
        uint32_t param5 = 0, uint32_t param6 = 0,
        uint32_t param7 = 0, uint32_t param8 = 0,
        uint32_t param9 = 0, uint32_t param10 = 0);

    /// Decode input data byte-by-byte.
    visca::ViscaPackets decodeData(
        uint8_t nextByte, uint32_t cameraAddress,
        uint32_t& param1, uint32_t& param2,
        uint32_t& param3, uint32_t& param4,
        uint32_t& param5, uint32_t& param6,
        uint32_t& param7, uint32_t& param8,
        uint32_t& param9, uint32_t& param10);

    /// Get library version.
    static std::string getVersion();
};

Prepare command example

// Encoding
uint8_t packetData[24];
uint32_t packetSize = 0;
visca_parser.encodeCommand(cr::visca::ViscaPackets::INQUIRY_CAM_ZoomPosInq,
                           packetData, packetSize, 1, 1);

// Sending to serial port.
serialPort.sendData(packetData, packetSize);