[slinkelist] Porlem trying to control a Sony CDP-CX450

Ian Cole iancole@earthlink.net
Sun, 10 Dec 2000 20:40:42 -0500


Each device file must be loaded separately - you are concatenating them
together and only calling AddDevice once...

Try this:

 sendname = "cd player recv"
 devfile = App.Path + "\cdslr.cde"
 Open devfile For Binary As #1
 devtext = Input(LOF(1), 1)
 Close (1)
  x = Slinkx.AddDeviceText(sendname, devtext, devID, slinkenum, portnum)


 sendname = "cd player send"
 devfile = App.Path + "\cdsls.cde"
 Open devfile For Binary As #1
 devtext = Input(LOF(1), 1)
 Close (1)
 x = Slinkx.AddDeviceText(sendname, devtext, devID, slinkenum, portnum)


You could also simply by doing this:
(Note, I switched to the AddDevice command)

 sendname = "cd player recv"
 devfile = App.Path + "\cdslr.cde"
 x = Slinkx.AddDevice(sendname, devfile, devID, slinkenum, portnum)

 sendname = "cd player send"
 devfile = App.Path + "\cdsls.cde"
 x = Slinkx.AddDevice(sendname, devfile, devID, slinkenum, portnum)


Ian

----- Original Message -----
From: Kevin O'Brien <kobrien@neonsys.com>
To: <slinkelist@nirvis.com>
Sent: Sunday, December 10, 2000 7:20 PM
Subject: [slinkelist] Porlem trying to control a Sony CDP-CX450


>
>
>
>
> Kevin O'Brien@NEON
> 12/10/2000 06:20 PM
>
> I am a rookie to using the Slink-e activeX control, so I apologise if what
> I am asking is very basic.  I wrote a simple VB program using the sample
TV
> (VB). I changed it to use the files CDSLS.CDE and CDSLR.CDE. The program
> receives events from the cd player. However, when I try to issue commands,
> the commands appear to be accepted but not acted upon.  ANyone know what I
> am doing wrong. It must be my code, since CDJ works fine.
>
> Thank you.
>
> (See attached file: cdsls.cde)(See attached file: cdslr.cde)(See attached
> file: Form1.frm)(See attached file: Project1.vbp)(See attached file:
> Project1.vbw)
>
>
> Dim sendname As String
>
> Private Sub Command1_Click()
>     result = Slinkx.Send(sendname, Text1.Text)
> End Sub
>
> Private Sub Form_Load()
>     Call InitDevice
> End Sub
>
> Private Sub Slinkx_SlinkeDeviceEvent(Device As String, Message As String)
>     Label1.Caption = Device
>     Label2.Caption = Message
>
>
> End Sub
> Private Sub InitDevice()
> Dim devID As Long
> Dim slinkenum As Long
> Dim portnum As Long
> Dim devfile As String
> Dim devtext As String
>
>
> If (Slinkx.NumSlinkes < 1) Then
>     MsgBox ("The server as found no Slink-es. This application cannot
> run.")
>     End
> End If
>
>
> devID = 1
> slinkenum = 1
> Rem map to all 8 ir ports
> portnum = &HFFF
>
> sendname = "cd player"
> Rem instead of loading a device file like this:
> Rem devfile = App.Path + "\tv.cde"
> Rem x = Slinkx.AddDevice(sendname, devfile, devID, slinkenum, portnum)
>
> Rem you can also provide the file contents as text like this:
> Rem you must append any include files manually as the server won't try to
> parse
> Rem any include files when you send text
> devfile = App.Path + "\cdslr.cde"
> Open devfile For Binary As #1
> devtext = Input(LOF(1), 1)
> Close (1)
> devfile = App.Path + "\cdsls.cde"
> Open devfile For Binary As #1
> devtext = devtext + Input(LOF(1), 1)
> Close (1)
> x = Slinkx.AddDeviceText(sendname, devtext, devID, slinkenum, portnum)
> Rem this is advantageous for DCOM slink-e servers since you don't know if
> they will
> Rem have your device files or not
>
>
>
> Rem show unmatched data
> Slinkx.ReportNoMatch = 1
>
>
> Rem demonstrate the use of low-level commands
> Rem this also causes lowlevel events to come back
>
> Rem instead of loading a device file like this:
> Rem devfile = App.Path + "\lowlevel.cde"
> Rem x = Slinkx.AddDevice("lowlevel", devfile, devID, slinkenum, 0)
>
> Rem you can also provide the file contents as text like this:
> Rem x = Slinkx.AddDeviceText("lowlevel", "type=lowlevel", devID,
slinkenum,
>  0)
> Rem this is advantageous for DCOM slink-e servers since you don't know if
> they will
> Rem have your device files or not
>
> Rem x = Slinkx.SendEx("lowlevel:baud[38400] lowlevel:irmml[11]
> lowlevel:irto[100000.0] lowlevel:irts[100.0] ")
> Rem x = Slinkx.Send("lowlevel", "parread[]")
> Rem x = Slinkx.SendEx("lowlevel:irrxporten[15] lowlevel:irrxportpol[31]")
>
> End Sub
>