This post is a bit of a blast from the past but I think most of the pieces are here. In your first message of the post, you are showing the HOME message over IP Visca. In the example code I posted, I show the shot recall message with the serial version of the protocol (which we would send over IP to one of the PIVOT 20 cameras). You may notice they look similar after the FF FF FF FF part - this is because the first part of your message is just the IP header.
The header consists of:
2 bytes of "payload type" data (0x10, 0x00) to indicate you are sending a Command message
2 bytes of "payload length" data (0x00, 0x05) to indicate you have a payload of 5 bytes (the 81 ... FF part)
4 bytes of "sequence number" data (you just used 0xFF 0xFF 0xFF 0xFF for those)
The Message Builder I posted above can just have the necessary bytes added to the start of the message to send the "IP Visca" message instead of the serial version.
The only other thing to look out for is that your sequence numbers should start at 0 and increment on each message you send. To make sure you are starting at zero, you would send a sequence number reset message (message type 0x02 0x00) with a payload of 0x01 (the sequence number in the header will be ignored for this message)
Hope this helps!
James
Original Message:
Sent: 08-14-2021 11:37
From: Aleksander Stalsberg
Subject: Send VISCA commands with DashBoard
Hi again James! Been a while, and dont know if you're roaming these forums anymore.
I did sort out the recall thingy from the Old ROSS DashBoard for PIVOT Cams, however, I'm now, again, looking into the VISCA control, and if nothing else, at least be able to recall the shots stored on the camera from a second DashBoard.
So if you have any VISCA examples for me, that'd be great.
Kinda rusty on DashBoard here now after this pandemic...
------------------------------
Aleksander Stalsberg
Lillehammer Icehockey Club
Original Message:
Sent: 04-07-2019 19:07
From: James Peltzer
Subject: Send VISCA commands with DashBoard
I will try to get an example of the IP Visca for PIVOT SE sometime soon. I have an example of doing the simpler serial Visca protocol for shot recalls - you may find it useful to pattern-match to it:
function sendShotMessage(ip, port, chain, shotNumber, message)
{
var messageBuilder = ogscript.createMessageBuilder();
messageBuilder.writeByte(0x80 + chain);
messageBuilder.writeByte(0x01);//memory command = 01 04 3F
messageBuilder.writeByte(0x04);//see above
messageBuilder.writeByte(0x3F);//see above
messageBuilder.writeByte(message); //store/recall/delete
messageBuilder.writeByte(shotNumber);
messageBuilder.writeByte(0xFF); //end of message
rosstalk.sendBytes(ip, port, messageBuilder.toByteArray(), null);
}
function recallShot(ip, port, chain, shotNumber)
{
sendShotMessage(ip, port, chain, shotNumber, 2);
}
function storeShot(ip, port, chain, shotNumber)
{
sendShotMessage(ip, port, chain, shotNumber, 1);
}
function deleteShot(ip, port, chain, shotNumber)
{
sendShotMessage(ip, port, chain, shotNumber, 0);
}
#DashBoard