If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
working with client / servers
3 posts
• Page 1 of 1
working with client / servers
Hello,
I am working on setting up a 2 port client / server interface between two computers. I have one FSM file on one computer, named "network_server_side", and one FSM file on another computer named "network_client_side". I got both connections to work, using ports 490 and 500 (I'm sure others would have worked fine), but I am trying to figure out the best way to accomplish something.
Two ports is fine for two pieces of data, or even opening more ports would get more data, however that is inefficient, especially considering I want to have maybe 20 or 30 channels worth. What I would like to do is a multiplexing scheme. One channel would be an index, and the other channel would be the data. I would then like to use the tick 25 or 100 primitive to step through the channels (lets say 10) that would allow me to have an input side and output side on each end of the connection. What would be the best method of accomplishing this? Would I use an index and then step through it or an array to do the same? There are a lot of ways to do this in Flowstone, and I was wondering what the best way is.
My goal here is for a nice pipeline between a main PC and a 2nd PC (like the Zotac HTPC I'm working on). This way I can tie in I/O, motors, etc, between the 2 flowstone apps, with a flowstone app as a GUI and supervisory controller, and 2nd flowstone app as a local i/o controller. This would most likely end up as a laptop for the Main PC, and the HTPC being mobile in a robot.
What would be really cool (this is a DSP Robotics Question btw) would be to have the "Bus Create" and "Bus Extract" primitives to work transparently over the server / client interface. I'm sure that code might be tricky, but it would possibly be perfect for what I'm trying to accomplish. You basically would get a bus over a network connection. Hmmm. a new primitive anyone? Just thinking.
Any opinions and examples would be welcome.
I am working on setting up a 2 port client / server interface between two computers. I have one FSM file on one computer, named "network_server_side", and one FSM file on another computer named "network_client_side". I got both connections to work, using ports 490 and 500 (I'm sure others would have worked fine), but I am trying to figure out the best way to accomplish something.
Two ports is fine for two pieces of data, or even opening more ports would get more data, however that is inefficient, especially considering I want to have maybe 20 or 30 channels worth. What I would like to do is a multiplexing scheme. One channel would be an index, and the other channel would be the data. I would then like to use the tick 25 or 100 primitive to step through the channels (lets say 10) that would allow me to have an input side and output side on each end of the connection. What would be the best method of accomplishing this? Would I use an index and then step through it or an array to do the same? There are a lot of ways to do this in Flowstone, and I was wondering what the best way is.
My goal here is for a nice pipeline between a main PC and a 2nd PC (like the Zotac HTPC I'm working on). This way I can tie in I/O, motors, etc, between the 2 flowstone apps, with a flowstone app as a GUI and supervisory controller, and 2nd flowstone app as a local i/o controller. This would most likely end up as a laptop for the Main PC, and the HTPC being mobile in a robot.
What would be really cool (this is a DSP Robotics Question btw) would be to have the "Bus Create" and "Bus Extract" primitives to work transparently over the server / client interface. I'm sure that code might be tricky, but it would possibly be perfect for what I'm trying to accomplish. You basically would get a bus over a network connection. Hmmm. a new primitive anyone? Just thinking.
Any opinions and examples would be welcome.
- Attachments
-
- network_server_side.fsm
- (9.03 KiB) Downloaded 1284 times
-
- network_client_side.fsm
- (14.84 KiB) Downloaded 1292 times
- fixstuff555
- Posts: 151
- Joined: Thu Oct 21, 2010 3:24 pm
Re: working with client / servers
I think the easiest way is just to define your own protocol, this is what I do for the same task.
Since the data is a string you can have what ever you want:
"#01, MyData source 1"
"#99, MyData source 99"
Then just use the String Split or Sting to Sting Array to extract the data and the source etc.
Here's an example:
Since the data is a string you can have what ever you want:
"#01, MyData source 1"
"#99, MyData source 99"
Then just use the String Split or Sting to Sting Array to extract the data and the source etc.
Here's an example:
- Attachments
-
- Encode Decode.fsm
- Encode-Decode
- (1.4 KiB) Downloaded 1306 times
- Embedded
- Posts: 143
- Joined: Sat Oct 30, 2010 1:42 pm
Re: working with client / servers
Yeah, that's probably much simpler. I thought there might be some other method I was overlooking, but I like that idea probably best. Thanks.
- fixstuff555
- Posts: 151
- Joined: Thu Oct 21, 2010 3:24 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 94 guests