Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TINIm400 timed read/write and thread management

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi,
I'm creating this thread in order to get some details about the applications i'm currently coding.

I have to create a system based on TINI module which acqauires datas from a satellite sensor, gets it y serial comm, to the TINI, which sends it over Ethernet to a computer.
At the moment, I can read by RS232, send over Ethernet. So overally it works fine. However I still have to follow some requirements :
-I have to read and send every seconds.
-Any datas that has not changed since the previous one must not be sent.
-Managing threads.

here is the code : (note that this code is converted into a .tini file, and uploaded on the board which is ran by a embedded JVM)



I commented the code as much as I can unfortunatly it's in french.

I meet the following problems , I don't see how to time this operation, I thought it was thanks to the setEnableReceiveTimeOut function but it doesn't seem so.

Therefor I already posted it on the I/O sections and I had a few ideas given thanks to a member, I'll try it today to see how it performs.

I have to give a clear defintion of my thread management, is the volatile attribute I used for this running variable correct? Do you think it is the most improved way ( the way it's coded ) to manage my read&send operations?



Le thanks

regards
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please UseOneThreadPerQuestion. We'll continue at https://coderanch.com/t/538950/Streams/java/TINIm-module-timed-reading.
 
    Bookmark Topic Watch Topic
  • New Topic