Page 1 of 1

Porting CAPI Structure Problem

Posted: Thu Jun 09, 2005 7:30 pm
by Tranquil
Hi All!

I'm on it to port the CAPI2032.dll to a userlib for PB to receive messages of incoming calls and to create a little CIT system for my applications.

In fact it works but I'm having a little bit of touble by porting the structures to PB.

That is what the capi reference says to the definition of types:

Code: Select all

• byte 8bit value, coded as one octet
• word 16bit value, coded as two contiguous octets, least significant first
• dword 32bit value, coded as two contiguous words, least significant first
• qword 64bit value, coded as two contiguous dwords, least significant first
• struct coded as an array of octets, the first octet containing the length of the subsequent array.
If the first octet has the value 255 (0xFF), this is an escape code: the following
word is then interpreted as containing the length of the following data. An empty
struct is coded as a single octet with value 0.
I tries to convert the LISTEN_REQ Structure that is defined that way:

Controller dword
Info mask dword Bit field, coding as follows:
[0]: Cause
[1]: Date/time
[2]: Display
[3]: User-user information
[4]: Call progression
[5]: Facility
[6]: Charging
[7]: Called party number
[8]: Channel information
[9]: Early B3 connect
[10]: Redirecting/redirection information
[11]: reserved
[12]: Sending Complete
[13 to 31]: reserved
CIP Mask dword explained below
CIP Mask 2 dword reserved for additional services
Calling party number struct Calling party number
Calling party subaddress struct Calling party subaddress


What the hell do their mean with struct!? I dont know how to define it within a PB structure. Someone can help?

Thanks!

Mike

Posted: Fri Jun 10, 2005 1:23 am
by blueznl
you cannot put it in a structure, as fields are dynamic, ie. they describe the length of the upcoming data

this is a very common format in telecomms land... applications / hardware checks data, tries to process what it recognizes and passes on what it doesn't... as data length is passed before the data itself, it can be passed on with less effort

struct won't help here...

Posted: Fri Jun 10, 2005 10:53 am
by Tranquil
That is exactly that what I thought. Okay, then there is no other way to Peek the needed datas from memory. Thats for quick answer!

Mike

Posted: Tue Jul 05, 2005 8:37 pm
by Max.
Tranquil wrote:That is exactly that what I thought. Okay, then there is no other way to Peek the needed datas from memory. Thats for quick answer.
Did you make progress on this? Would come handy now!

Posted: Mon Jul 11, 2005 8:56 pm
by blueznl
i'll be working on this as well later on, first gotta complete the move (changed house, brrrr, no fun :-( )