FORUMS: list search recent posts

videohub writing software python

COW Forums : Blackmagic Design

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
maurice jansen
videohub writing software python
on Jul 23, 2012 at 9:45:01 pm

hi there all

i'm trying to write a app in python to build
a simple totalrecall program for our BM router.
since it will be used for 3 shows every week with different
router setup's.

i'm just starting programing in python and run into trouble.
lack of knowledge i guess ;-)

i have it already running the dirty way with the terminal command

nc 192.168.42.50 9990 < textfile.txt
textfile.txt contains all route's in the format described in the manual.
this works but not all our operators are good in commandline foo ;-)

of coarse i can do it with a applescript too but want to make it in python
crossplatform

in python
reading the setup on connecting to the router
works ok.
re sending this to the router works also.

but rereading the router when route's have changed
is going wrong all the time due to polution in the
input buffer are there any python guru's here that can help me out.


see code below


import socket
import struct, time
import os
from Tkinter import *
import tkMessageBox

HOST = "192.168.42.50"
PORT = 9990
#make socket and connect to BM router
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
#fill variables with all router settings
header = s.recv(4096)
setup = s.recv(4096)
labelsin = s.recv(4096)
labelsuit = s.recv(4096)
locked = s.recv(4096)
routes = s.recv(4096)

def leesuit():
#read routes out of the BM router
#garbage = s.recv(4096)
global routes
s.send("VIDEO OUTPUT ROUTING:nrnr")
#command to get routes again from the router
routes = s.recv(4096)
return

def schrijfnaar():
#send routes to the BM router
#global routes
s.send(routes)
#garbage = s.recv(4096)
print routes
return

gui =Tk()
gui.title("blackmagic total recall test")
gui.geometry('400x600+200+200')
button1 = Button(gui, text="Read From MTX" , width=20,command=leesuit)
button1.pack(padx=15,pady=15)
button2 = Button(gui, text="Send to MTX" , width=20,command=schrijfnaar)
button2.pack(padx=15,pady=15)
gui.mainloop()

thanks in front if you can help

sorry for the indention errors

kind regards
maurice

People saying they don't make mistake's often make nothing at all!


Return to posts index

Daniel Moore
Re: videohub writing software python
on Jul 25, 2012 at 12:18:00 am

Hi Maurice,

Your best bet for software development support with Blackmagic products is to
contact Blackmagic Developer Support at developer@blackmagicdesign.com .
They should be able to help you out.

cheers

Daniel


Return to posts index

marco tommasoni
Re: videohub writing software python
on Apr 5, 2014 at 6:30:11 am

Hi!

hello, I know this is an old topic, but did you solve the problem?

And how?

Thankyou,
Marco


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]