Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ visca_check_completion(3X) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

viscalib(3X)

VISCA(3X)  —  NEWS-OS Programmer’s Manual

NAME

visca_send_message, visca_check_completion, visca_get_reply, visca_cancel_message  − Function to operate VISCA message. 

SYNOPSIS

#include <visca.h>
 vs_midvisca_send_message( channel,  adrs,  msg,  care )
int channel;
int adrs;
vs_msg msg;
int care;

intvisca_check_completion( msgid )
vs_mid msgid;

intvisca_get_reply( repl,  msgid,  sync )
vs_msg ∗repl;
vs_mid msgid;
int sync;

intvisca_cancel_message( msgid )
vs_mid msgid;

DESCRIPTION

visca_send_message sends msg to the VISCA device of adrs th order that is connected to the channel number which is indicated by channel. If TRUE is set to care execution status and its result for the message that is sent by visca_check_completion(3X) visca_get_reply(3X) visca_cancel_message(3X).  If FALSE is set, reply message is discarded inside the library.  If ended with success, message ID is returned as return value.  If resulted in error during execution, NULL is returned.  In this case, error number is set in the external variable vs_error. 

visca_check_completion inquires to the device if execution of the message indicated by msgid has ended or not.  If message has ended, 0 is returned.  If message has not yet ended, 1 is returned.  If error has occurred during execution, −1 is returned.  If time has run out without response from VISCA device, −2 is returned. 

visca_get_reply receives reply from device against the message given by msgid. If TRUE is set to sync, it waits until execution of message is complete. If FALSE is set, it ends without waiting completion of message.  To use this function care of visca_send_message should be set to TRUE.  The same value as visca_check_completion is returned as return value.  If 0 is returned as return value, reply message from device is set in repl.

visca_cancel_message cancels the message indicated by msgid. As the return value, 0 is returned when ended with success, and −1 is returned when ended with error.

STRUCTURE

vs_msg has the following structure. 

 #include <visca.h>
 typedefstruct vs_msg {
u_charformat_type;
u_charcategory;
u_charformat_info[5];
u_charbody[VS_MAXMSG];
} vs_msg;
 

In the format_type, the format type of VISCA protocol is input.  As the format type, followings are defined as header file. 

 #defineVS_COMMAND10x01
#defineVS_COMMAND20x02
#defineVS_COMMAND30x03
#defineVS_COMMAND40x04
#defineVS_INQUIRY0x09
#define VS_COMP0x50
#define VS_ERROR0x60
 

In the category, category type of VISCA protocol is input.  As the category type, followings are defined as header file. 

 #defineVS_INTERFACE0x00
#defineVS_CONTROL_S0x01
#defineVS_MEDIA_DEVICE0x02
 

In the format_info, format information of VISCA protocol is input.  This attains the value that changed with the setting of format_type.  If format_type is VS_COMMAND2, clock time of VISCA device is input to format_info.  In case of VS_COMMAND3 VS_COMMAND4, specified position of tape is input to format_info. 
In the body, body data of message is input.  Body data must be ended with VS_TERM.  VS_TERM is defined as follows. 

 #define VS_TERM0xff

 
For details of VISCA protocol, refer to VISCA command list or VISCA DEVELOPER MANUAL of the merchandise corresponding to VISCA.

FILES

/usr/sony/lib/libvisca.a labrary

/usr/sony/include/visca.h heade file

SEE ALSO

viscalib(3X)

NEWS-OSRelease 4.2.1R

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026