Formatting HTTP Send_String
gcolosino
Posts: 3
Hi All.
I have no experience strings for HTTP devices and am looking for a little help putting together the send_string for a Matrox HDX. All I need to do is start and stop the encoder but it doesn't respond to my first attempts.
According to the API the command is:
http://<username>:<password>@<ipAddress>/Monarch/syncconnect/sdk.aspx?command=<command>.
With my variables it is:
http://admin:admin@192.168.3.200/Monarch?synconnect?sdk.aspx?command=StarttBothEnco ders.
What I am sendind is:
SEND_STRING dvMatrox,"'GET /Monarch/syncconnect/sdk.aspx?command=StartBothEncoders HTTP/1.1',$0D,$0A,'Host: 192.168.0.200:80',$0D,$0A,'Authorization: Basic YWRtaW4:YWRtaW4',$0D,$0A,'Connection: keep-alive',$0D,$0A,$0D,$0A"
Any help would be appreciated.
I have no experience strings for HTTP devices and am looking for a little help putting together the send_string for a Matrox HDX. All I need to do is start and stop the encoder but it doesn't respond to my first attempts.
According to the API the command is:
http://<username>:<password>@<ipAddress>/Monarch/syncconnect/sdk.aspx?command=<command>.
With my variables it is:
http://admin:admin@192.168.3.200/Monarch?synconnect?sdk.aspx?command=StarttBothEnco ders.
What I am sendind is:
SEND_STRING dvMatrox,"'GET /Monarch/syncconnect/sdk.aspx?command=StartBothEncoders HTTP/1.1',$0D,$0A,'Host: 192.168.0.200:80',$0D,$0A,'Authorization: Basic YWRtaW4:YWRtaW4',$0D,$0A,'Connection: keep-alive',$0D,$0A,$0D,$0A"
Any help would be appreciated.
0
Comments
{
SWITCH (x)
{
Case 1: //Start
{
IP_CLIENT_OPEN(dvMatrox.PORT,'192.168.0.200',nIPPort,1)
SEND_STRING dvMatrox,"'GET /Monarch/syncconnect/sdk.aspx?command=StartBothEncoders HTTP/1.1',$0D,$0A,'Host: 192.168.0.200:80',$0D,$0A,'Authorization: Basic YWRtaW4:YWRtaW4',$0D,$0A,'Connection: keep-alive',$0D,$0A,$0D,$0A"
IP_CLIENT_CLOSE(dvMatrox.PORT)
}
Case 2: //Stop
{
IP_CLIENT_OPEN(dvMatrox.PORT,'192.168.0.200',nIPPort,1)
SEND_STRING dvMatrox,"'GET /Monarch/syncconnect/sdk.aspx?command=StopBothEncoders HTTP/1.1',$0D,$0A,'Host: 192.168.0.200:80',$0D,$0A,'Authorization: Basic YWRtaW4:YWRtaW4',$0D,$0A,'Connection: keep-alive',$0D,$0A,$0D,$0A"
IP_CLIENT_CLOSE(dvMatrox.PORT)
}
}
nIPPort is 80