Ok, I'm working on an app in C# that will send a variable to ARC via TCP/IP telnet style. The ARC side work with a script I can send data to it manually via telnet. Now I need for my app to send the data.
I took the example out of the latest SDK, Tutorial 30 in C# SDK Client.
The main code is as follows:
- CodeCode:
private void Form1_Load(object sender, EventArgs e) {
ezB_Connect1.Port = "127.0.0.1:6666";
trackBar1.Value = EZ_B.Servo.SERVO_MIN;
trackBar1.Minimum = 0;
trackBar1.Maximum = EZ_B.Servo.SERVO_MAX;
}
private void trackBar1_Scroll(object sender, EventArgs e) {
ezB_Connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.D0, trackBar1.Value);
}
The TrackBar is a track bar for servo control - I'm not interested in that. But I do like the connection string. And I like the command that is sent, but I need to figure out how to redo it to just send a variable or string
- CodeCode:
// This is what I'm going for in my C# code
private void btn_Open_Telnet_Click(object sender, EventArgs e)
{
ezB_Connect1.Port = "192.168.0.100:6666";
}
private void btn_sendname_Click(object sender, EventArgs e)
{
ezB_Connect1.EZB.ToString(EZ_B.TCPServer ,names);
}
I click on the first button to make a connection. I click on the second button to send the data, but it's not formatted corrected. I do of course have the EZ-B.dll in the debug folder and the correct references.
If I were to the string manually to ARC with Telnet I uses this: $FaceName = "DJ Sures" - this replicates as if the variable "names" in my C# app held a string value of "DJ Sures" and was sent to ARC to fill the varable of $FaceName.
I just want to send my names string in my C# to EZ-Builder.
Asked
— Edited
Basically though, you need to establish a socket to the ezb telnet port (23 by default) and then just send text across the port
Alan
IT WORKS! CHa-CHING! Thank you DJ. I was just using the wrong sample.
Alan