diff --git a/src/Computer/10V.jl b/src/Computer/10V.jl index 3da2a8b23a71b62585f1a739ec1097c65cdd8d18..facf505a721cd0c709a6f884afd233b362c0c680 100644 --- a/src/Computer/10V.jl +++ b/src/Computer/10V.jl @@ -1,4 +1,4 @@ -export AnalogInput10V +export AnalogInput10V, AnalogOutput10V mutable struct AnalogInput10V <: AbstractDevice i::Int32 diff --git a/src/Computer/BeagleBoneStream.jl b/src/Computer/BeagleBoneStream.jl index 24bd09f726307459a84be8c2c68bd0224fe47977..ee9253d020075872e47ff79dc10d190209b6f571 100644 --- a/src/Computer/BeagleBoneStream.jl +++ b/src/Computer/BeagleBoneStream.jl @@ -30,19 +30,19 @@ end function send(bbstream::BeagleBoneStream) ncmds = length(bbstream.sendbuffer) - serialize(bbstream.stream, (true, ncmds, bbstream.sendbuffer)) + serialize(bbstream.stream, (true, Int32(ncmds), bbstream.sendbuffer...)) empty!(bbstream.sendbuffer) return end function read(comedistream::BeagleBoneStream) ncmds = length(bbstream.readbuffer) - serialize(bbstream.stream, (false, ncmds, bbstream.sendbuffer)) + serialize(bbstream.stream, (false, Int32(ncmds), bbstream.readbuffer...)) #TODO wait for answer vals = nothing - empty!(bbstream.sendbuffer) + empty!(bbstream.readbuffer) return vals end -# +# # function send(stream::BeagleBoneStream) # cmds = Tuple[] # for dev in stream.devices @@ -82,14 +82,13 @@ end function send(bbstream::BeagleBoneStream, cmd) allcmds = (true, Int32(1), cmd) println("Sending single command: $allcmds") - serialize(stream, allcmds) + serialize(bbstream.stream, allcmds) return end function read(bbstream::BeagleBoneStream, cmd) - cmd, stream = safe_getreadcommand(dev) allcmds = (false, Int32(1), cmd) println("Sending single command: $allcmds") - serialize(stream, allcmds) + serialize(bbstream.stream, allcmds) #TODO get, wait for and return response return end diff --git a/src/Computer/Computer.jl b/src/Computer/Computer.jl index c494e99b016eaac2603041b99fc5bb80a86f7c3e..19e6ab5c6c85f634f35355db6c701c018ec1b13e 100644 --- a/src/Computer/Computer.jl +++ b/src/Computer/Computer.jl @@ -34,3 +34,4 @@ include("BeagleBoneStream.jl") #Include the device definitions include("SysLED.jl") +include("10V.jl") diff --git a/src/Computer/LabStream.jl b/src/Computer/LabStream.jl index 3856de744ef78ce63717393f7936d4f4fdf108ad..9f8738d8b4479778f8b37b03a569eecb221ca2a2 100644 --- a/src/Computer/LabStream.jl +++ b/src/Computer/LabStream.jl @@ -1,3 +1,5 @@ +export LabStream + abstract type LabStream end function close(stream::LabStream) diff --git a/src/Computer/SysLED.jl b/src/Computer/SysLED.jl index 2d0837a492fdf0dee4c238d96d7035801f9d7970..855858f232c4a8c4396e02801471bc664540cff1 100644 --- a/src/Computer/SysLED.jl +++ b/src/Computer/SysLED.jl @@ -3,7 +3,7 @@ export SysLED mutable struct SysLED <: AbstractDevice i::Int32 stream::LabStream - SysLED(i::Int32) = new(i, false, false) + SysLED(i::Int32) = new(i) end SysLED(i::Int64) = SysLED(convert(Int32, i))