Author Topic: Status of IM mode  (Read 50935 times)

Offline Ammeh

  • Queen of the Internets
  • Bot Destroyer
  • ***
  • Posts: 169
    • View Profile
Re: Status of IM mode
« Reply #15 on: June 05, 2013, 03:01:13 PM »
Oh man, I was hoping you'd handle the DB side of things, I wouldn't touch VB with a barge pole :P

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Status of IM mode
« Reply #16 on: June 05, 2013, 03:07:58 PM »
There is no guarantee that vb6 pipes will play nicely with .net, but I'll see what I can do.

Offline Shasta

  • Administrator
  • Bot Destroyer
  • *****
  • Posts: 231
    • View Profile
Re: Status of IM mode
« Reply #17 on: June 06, 2013, 06:22:09 AM »
Hey Shasta,

May I look at the PHP script(s) if you don't mind?
Just out of curiosity.
Yeah sure, I need to clean them up a touch first though. I also should probably figure out some place to put them in source control, be it in the DB2 repo or a new one.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Status of IM mode
« Reply #18 on: June 06, 2013, 11:20:14 AM »
Ammeh I think I got it.
Attached here is my server side.

The client side which is the source code for DB (Darwinbots2\trunk\Darwinbots2) uses the same custom control with pipe name set to "Calc Server Pipe"

The exact call from DB is:

Code: [Select]
    Dim Request() As Byte
    Dim Response() As Byte
    Request = "{ ""Population"":""" & CStr(TotalRobotsDisplayed) & """, ""CyclesPerSecond"":""" & CStr(SimOpts.CycSec) & ","" ""Size"":""" & CStr(SimOpts.FieldHeight * SimOpts.FieldWidth) & """, ""MutationRate"":""" & CStr(SimOpts.MutCurrMult) & """ }"
    ReDim Response(0)
    PipeRPC1.PipeCall Request, Response

p.s.

Sorry Ammeh, I know you hate vb6 but you may have to look trough the server side to figure out how vb6 pipes work  :(

edit: If you want me to attach a DB2 build (.exe) I can do that as well...
« Last Edit: June 06, 2013, 12:43:41 PM by Botsareus »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Status of IM mode
« Reply #19 on: June 11, 2013, 12:54:06 PM »
Looks like Shasta and Ammeh disappeared on me. Does anyone know what is going on w/ this?

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Status of IM mode
« Reply #20 on: June 13, 2013, 06:14:56 PM »
You should be able to run 'local IM' shipped with the installer.

Offline Ammeh

  • Queen of the Internets
  • Bot Destroyer
  • ***
  • Posts: 169
    • View Profile
Re: Status of IM mode
« Reply #21 on: June 14, 2013, 07:03:32 PM »
Sorry, life has gotten pretty hectic atm. Any spare time I've had has been taken up recovering from exhaustion D:

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Status of IM mode
« Reply #22 on: June 16, 2013, 01:53:48 PM »
Can't blame you, I may be facing the same situation, found a job.

Offline rwill128

  • Bot Builder
  • **
  • Posts: 67
    • View Profile
Re: Status of IM mode
« Reply #23 on: June 18, 2013, 11:10:15 PM »
Congrats! What are you working on?

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Status of IM mode
« Reply #24 on: June 20, 2013, 06:56:10 PM »
TY :)

I am a data analyst.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Status of IM mode
« Reply #25 on: July 04, 2013, 12:55:26 PM »
well this is exiting, apparently my pipe server side of DBIM got completely messed up after I ran a cleanup on SVN.

Ammeh, here is basically a working version that should tell you everything you may need:

Code: [Select]
...
Begin Server.PipeRPC pipeCalculate
      Left            =   2280
      Top             =   1080
      _ExtentX        =   847
      _ExtentY        =   847
      PipeName        =   "Calc Server Pipe"
   End
...
Option Explicit

Private Sub Form_Load()
    pipeCalculate.Listen
End Sub

Private Sub Form_Unload(Cancel As Integer)
    pipeCalculate.ClosePipe
End Sub

Private Sub pipeCalculate_Called(ByVal Pipe As Long, Request() As Byte, Response() As Byte)
Text1 = Text1 & CStr(Request) & vbCrLf
Response = "0"
End Sub



edit:

Funny, as soon as I created a fresh copy from the SVN my problem magically disappeared.
« Last Edit: July 04, 2013, 01:27:13 PM by Botsareus »

Offline Ammeh

  • Queen of the Internets
  • Bot Destroyer
  • ***
  • Posts: 169
    • View Profile
Re: Status of IM mode
« Reply #26 on: July 07, 2013, 03:17:37 PM »
Are we still using the input/output folder method? Also, can has a copy of the DB2 exe with the pipes stuff in it?
« Last Edit: July 07, 2013, 03:54:16 PM by Ammeh »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Status of IM mode
« Reply #27 on: July 07, 2013, 06:01:57 PM »
I already include the pipe stuff since version 2.45.03C.

Here is a copy jic.

If you need to codes for all this stuff go to SVN and grab em. You will be interested in the DB2 and Pipe Server folders.

Here also is a build of the pipe server side.

edit:

Quote
Are we still using the input/output folder method?

Yes, and the data is being passed by command line to DarwinbotsIM.exe

Code: [Select]
     s = App.path & "\DarwinbotsIM.exe" _
     & " -in " & iq _
     & " -out " & oq _
     & " -name " & IntOpts.IName _
     & " -pid " & Str(GetCurrentProcessId())
     IntOpts.pid = shell(s, vbNormalFocus)
« Last Edit: July 07, 2013, 06:41:45 PM by Botsareus »

Offline Ammeh

  • Queen of the Internets
  • Bot Destroyer
  • ***
  • Posts: 169
    • View Profile
Re: Status of IM mode
« Reply #28 on: July 11, 2013, 05:49:35 AM »
Could you remove the spaces from the pipe name? I think it's causing a glitch in the pipe handler in Delphi.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Status of IM mode
« Reply #29 on: July 21, 2013, 03:41:11 PM »
Sorry for the late reply, I have no stable source for Internet right now.

I uploaded the requested source code changes to the repository.