This is VISCA.h in view mode; [Download] [Up]
//
// VISCA.h
//
// VISCA generic driver object library (phew)
// Version 1
//
// Copyright (c) 1991,1992 by Jiro Nakamura
// All Rights Reserved.
//
// Original Author: Jiro Nakamura
// Created: Dec 17, 1991
//
// RCS Information
// Revision Number-> $Revision: 1.2 $
// Last Revised-> $Date: 92/07/20 23:58:29 $
// ------------------
// History:
// 20-Jul-92 Jiro
// Cleaned up for commercial release
// 17-Dec-91 Jiro Nakamura
// Created.
#import <objc/Object.h>
struct ct_tme {
unsigned char pos;
};
struct ct_hms {
unsigned char hh;
unsigned char mm;
unsigned char ss;
};
struct ct_hmsf {
unsigned char hh;
unsigned char mm;
unsigned char ss;
unsigned char ff;
};
struct ct_hmst {
unsigned char hh;
unsigned char mm;
unsigned char ss;
unsigned char t1;
unsigned char t2;
};
struct ct_bcd {
unsigned char d1;
unsigned char d2;
unsigned char d3;
unsigned char d4;
unsigned char d5;
};
union counterType {
struct ct_tme tme;
struct ct_hms hms;
struct ct_hmsf hmsf;
struct ct_hmst hmst;
struct ct_bcd bcd;
};
#define WHEN_NOW 0x01
#define WHEN_CLOCK 0x02
#define WHEN_AFTERCOUNTER 0x03
#define WHEN_BEFORECOUNTER 0x04
#define CT_TME 0x01
#define CT_4-DIGIT 0x11
#define CT_HMS 0x12
#define CT_HMSF 0x13
#define CT_TIMECODE 0x21
#define POWER_ON 0x02
#define POWER_OFF 0x03
#define INQ_DEVICETYPE 0x02
#define INQ_CLOCK 0x03
#define ZOOM_STOP 0x00
#define ZOOM_TELE 0x02
#define ZOOM_WIDE 0x03
#define FOCUS_STOP 0x00
#define FOCUS_FAR 0x02
#define FOCUS_NEAR 0x03
#define MC1_STOP 0x00
#define MC1_FAST_FORWARD 0x08
#define MC1_REWIND 0x10
#define MC1_EJECT 0x18
#define MC1_PAUSE 0x20
#define MC1_SLOW2 0x24
#define MC1_SLOW1 0x26
#define MC1_PLAY 0x28
#define MC1_FAST1 0x2A
#define MC1_FAST2 0x2C
#define MC1_SCAN 0x2E
#define MC1_REVERSE_SLOW2 0x34
#define MC1_REVERSE_SLOW1 0x36
#define MC1_REVERSE_PLAY 0x38
#define MC1_REVERSE_FAST1 0x3A
#define MC1_REVERSE_FAST2 0x3C
#define MC1_REVERSE_SCAN 0x3E
#define MC1_RECORD_PAUSE 0x40
#define MC1_RECORD 0x48
#define MC1_CAMERA_REC_PAUSE 0x50
#define MC1_CAMERA_REC 0x58
#define MC1_EDIT_SEARCH_FORWARD 0x5C
#define MC1_EDIT_SEARCH_REVERSE 0x5E
#define MC2_FRAME_FORWARD 0x02
#define MC2_FRAME_REVERSE 0x03
#define SC_COUNTER_RESET 0x01
#define SC_REAL_COUNTER 0x21
#define SC_RELATIVE_COUNTER 0x22
#define SC_TOGGLE_AUDIO 0x43
#define SC_TOGGLE_SPEED 0x44
#define SC_TOGGLE_DISPLAY 0x45
#define SC_CYCLE_VIDEO_IN 0x46
#define CMD_ACKNOWLEDGE 0x40
#define CMD_COMPLETION 0x50
#define CMD_ERROR 0x60
// Section 3-3-21 -- MD Error Codes
#define ERROR_NOERROR 0x00
#define ERROR_POWER 0x40
#define ERROR_TIMEOUT 0x41
#define ERROR_SEARCH 0x42
#define ERROR_CONDITION 0x43
#define ERROR_CAMERAMODE 0x44
#define ERROR_VCRMODE 0x45
#define ERROR_COUNTERTYPE 0x46
#define ERROR_TUNER 0x47
#define ERROR_EMERGENCYSTOP 0x48
#define ERROR_NOMEDIA 0x49
#define ERRMSG_NOERROR "No error"
#define ERRMSG_POWER "Device turned off"
#define ERRMSG_TIMEOUT "Command timed-out"
#define ERRMSG_SEARCH "Search error"
#define ERRMSG_CONDITION "Condition error"
#define ERRMSG_CAMERAMODE "VCR Command to Camera"
#define ERRMSG_VCRMODE "Camera command to VCR"
#define ERRMSG_COUNTERTYPE "Counter type error"
#define ERRMSG_TUNER "Tuner error"
#define ERRMSG_EMERGENCYSTOP "Emergency stop"
#define ERRMSG_NOMEDIA "No media inserted"
@interface VISCA: Object
{
char deviceName[30]; // Name of device we are using
int fd; // device
int when;
unsigned char outMessage[128];
unsigned char inMessage[128];
unsigned char completionMessage[128];
unsigned short int socket;
unsigned short int device;
unsigned short int errorCode;
int headerSize;
int inMessageCount;
int completionMessageCount;
id delegate;
}
// Opening and closing the driver
- setPort: (char *) portName;
- open;
- close;
- readStatus;
- interpretStatus;
- setAddressFrom: (int) frm to: (int) to;
- setAddressBroadcastFrom: (int) frm;
- setWhenNow;
- setWhenClock: (struct ct_hmst *) value;
- setWhenCounter: (union counterType *) value
counterType: (int) type
before: (BOOL) b;
- setDelegate: d;
- (int) v_address;
- (int) md_interfaceInquiry: (int) type;
- (int) md_power: (int) stat;
- (int) md_modeControl_1: (int) smode;
- (int) md_modeControl_2: (int) smode;
- (int) md_subControl: (int) smode;
- (int) md_search: (int) type counter: (union counterType *) ct;
- (int) md_cameraZoom: (int) zoomMode;
- (int) md_cameraFocus: (int) focusMode;
- (int) md_powerInquiry;
- (int) md_modeInquiry;
- (int) md_channelInquiry;
- (int) md_editControlInquiry;
- (int) md_mediaInquiry;
- (int) md_inputSelectInquiry;
- (int) md_configureInquiry;
- (int) md_positionInquiry;
- (int) sendMessage: (unsigned char *) m size: (int) hs;
- (int) copyCompletionMessage: (unsigned char *) buf;
- (unsigned short int) errorCode;
- (unsigned short int) socket;
- (unsigned short int) device;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.