Adhoc


Data Structures

struct  remotePsp

Enumerations

enum  remotePspState {
  OSL_ADHOC_DISCONNECTED = 0, OSL_ADHOC_JOINED, OSL_ADHOC_SELECTED, OSL_ADHOC_REJECTED,
  OSL_ADHOC_CANCELED, OSL_ADHOC_ACCEPTED, OSL_ADHOC_ESTABLISHED
}

Functions

int oslAdhocInit (char *productID)
int oslAdhocGetState ()
u8 * oslAdhocGetMacAddress ()
int oslAdhocGetRemotePspCount ()
struct remotePsposlAdhocGetPspByMacAddress (const u8 aMacAddress[6])
struct remotePsposlAdhocGetPspByIndex (int index)
int oslAdhocRequestConnection (struct remotePsp *aPsp, int timeOut, int(*requestConnectionCB)(int aPspState))
int oslAdhocSendData (struct remotePsp *pPsp, void *data, int lenData)
int oslAdhocReceiveData (struct remotePsp *pPsp, void *data, int maxLen)
struct remotePsposlAdhocGetConnectionRequest ()
void oslAdhocRejectConnection (struct remotePsp *aPsp)
void oslAdhocAcceptConnection (struct remotePsp *aPsp)
void oslAdhocTerm ()

Detailed Description

Functions for adhoc.

Enumeration Type Documentation

Connection states

Enumerator:
OSL_ADHOC_DISCONNECTED  PSP Disconnected
OSL_ADHOC_JOINED  PSP Joined
OSL_ADHOC_SELECTED  A PSP selected me
OSL_ADHOC_REJECTED  Connection rejected
OSL_ADHOC_CANCELED  Connection canceled
OSL_ADHOC_ACCEPTED  Connection accepted
OSL_ADHOC_ESTABLISHED  Connection established


Function Documentation

int oslAdhocInit ( char *  productID  ) 

Initialize the adhoc, returns 0 on succes ( < 0 on error)

int oslAdhocGetState (  ) 

Returns the current connection state ( remotePspState )

u8* oslAdhocGetMacAddress (  ) 

Returns the current mac address

int oslAdhocGetRemotePspCount (  ) 

Returns the number of remotes psp

struct remotePsp* oslAdhocGetPspByMacAddress ( const u8  aMacAddress[6]  )  [read]

Returns the remote psp with the given mac address

struct remotePsp* oslAdhocGetPspByIndex ( int  index  )  [read]

Returns the remote psp with the given index

int oslAdhocRequestConnection ( struct remotePsp aPsp,
int  timeOut,
int(*)(int aPspState)  requestConnectionCB 
)

Request a connction to a remote psp

int oslAdhocSendData ( struct remotePsp pPsp,
void *  data,
int  lenData 
)

Sends data to a remote psp

int oslAdhocReceiveData ( struct remotePsp pPsp,
void *  data,
int  maxLen 
)

Receives data from a remote psp. Returns the length of the data received (if == 0 no data received)

struct remotePsp* oslAdhocGetConnectionRequest (  )  [read]

Retuns one psp that is requesting a connection

void oslAdhocRejectConnection ( struct remotePsp aPsp  ) 

Rejects a connection request from a psp

void oslAdhocAcceptConnection ( struct remotePsp aPsp  ) 

Acepts a connection request from a psp

void oslAdhocTerm (  ) 

Terminates the adhoc


Generated on Wed Feb 24 10:25:35 2010 by  doxygen 1.5.9