Hi,

 

I’m including this in HECnet because it might be of general interest.

I have been creating the odd object here and there on a test router, using the mirror.py application class as a starting example, for listening to and talking to VMS processes that have opened up a task connection to them.

I can do something like:

 

$ open/read/write fio node::”=TIMESTAMP”

$ write fio “UTC”

$ read fio ts

$ close fio

$ show sym fio

 

The object waits for a message – the timezone required – and then returns  with a message containing the VMS time string in the form dd-mmm-yyyy:hh:mm:ss.cc

It all work very well.

 

The dispatch method in the pydecnet application class code sends an accept when it gets a connect and then sends a message containing the timestamp when it receives a data message containing the timezone required.

A simpler version of this, in which the timestamp in UTC is sent immediately without waiting for a timezone string, would not work. I was trying to execute a conn.send_data(…) immediately after a conn.accept() and getting a ‘WrongState’ exception there and then. What am I missing?

 

Regards

 

Keith