-
Notifications
You must be signed in to change notification settings - Fork 8
/
exports.go
executable file
·26 lines (23 loc) · 1.07 KB
/
exports.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) 2014 Joseph D Poirier
// Distributable under the terms of The simplified BSD License
// that can be found in the LICENSE file.
// Package visa wraps National Instruments VISA (Virtual Instrument Software
// Architecture) driver. The driver allows a client application to communicate
// with most instrumentation buses including GPIB, USB, Serial, and Ethernet.
// The Virtual Instrument Software Architecture (VISA) is a standard for
// configuring, programming, and troubleshooting instrumentation systems
// comprising GPIB, VXI, PXI, serial (RS232/RS485), Ethernet/LXI, and/or USB
// interfaces.
//
// The package is low level and, for the most part, is one-to-one with the
// exported C functions it wraps. Clients would typically build an instrument
// specific driver around the package but it can also be used directly.
package visa
/*
#include "visa.h"
*/
import "C"
//export go_cb
func go_cb(instr C.ViSession, etype C.ViEventType, eventContext C.ViEvent, userHandle C.ViAddr) {
(*(PUserCallback(userHandle)))(Object(instr), uint32(etype), uint32(eventContext))
}