pads:gaia-apis
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
pads:gaia-apis [2010/11/10 13:15] – gdangelo | pads:gaia-apis [2010/11/10 13:18] – gdangelo | ||
---|---|---|---|
Line 168: | Line 168: | ||
==== Migration ==== | ==== Migration ==== | ||
+ | |||
+ | |||
+ | === GAIA_Migrate() | ||
+ | <code java> | ||
+ | void GAIA_Migrate (int id, String data, int size); | ||
+ | </ | ||
+ | |||
+ | **Parameters**: | ||
+ | * int **id**: Identifier of the migrating SE; | ||
+ | * String **data**: A string containing the internal state of the SE; | ||
+ | * int **size**: String size; | ||
+ | |||
+ | |||
+ | **Description**: | ||
+ | |||
+ | It is used by a local LP to migrate a SE to a remote LP. The local LP is **not** free to define what SEs should be migrated. During the simulation execution, the migration mechanism defines what SEs have to be migrated and informs the LP using a " | ||
+ | |||
+ | **Notes**: | ||
+ | |||
+ | * The " | ||
+ | |||
+ | * The GAIA_Migrate() is implemented using a " | ||
+ | |||
+ | **Return value:** | ||
+ | |||
+ | //none// | ||
+ | |||
+ | |||
+ | === GAIA_ByteMigrate() | ||
+ | <code java> | ||
+ | void GAIA_ByteMigrate (int id, byte[] data, int size); | ||
+ | </ | ||
+ | |||
+ | **Parameters**: | ||
+ | * int **id**: Identifier of the migrating SE; | ||
+ | * byte[] **data**: A byte-array containing the internal state of the SE; | ||
+ | * int **size**: String size; | ||
+ | |||
+ | |||
+ | **Description**: | ||
+ | |||
+ | It is used by a local LP to migrate a SE to a remote LP. The local LP is **not** free to define what SEs should be migrated. During the simulation execution, the migration mechanism defines what SEs have to be migrated and informs the LP using a " | ||
+ | |||
+ | **Notes**: | ||
+ | |||
+ | * The " | ||
+ | |||
+ | * The GAIA_ByteMigrate() is implemented using a “EXEC_MIGR” message. Therefore, the LP that receives a message of this type is receiving a migrating Simulated Entity. | ||
+ | |||
+ | * This API has the exactly the same semantic of GAIA_Migrate(). For performance reasons, in this case the SE state is contained in an array instead of a String. | ||
+ | |||
+ | **Return value:** | ||
+ | |||
+ | //none// | ||
+ | |||
=== GAIA_SetCountDown() | === GAIA_SetCountDown() | ||
Line 340: | Line 395: | ||
- | ==== | + | ==== |
- | <code java> | + | |
- | void GAIA_Migrate (int id, String data, int size); | + | |
- | </ | + | |
- | + | ||
- | **Parameters**: | + | |
- | * int **id**: Identifier of the migrating SE; | + | |
- | * String **data**: A string containing the internal state of the SE; | + | |
- | * int **size**: String size; | + | |
- | + | ||
- | + | ||
- | **Description**: | + | |
- | + | ||
- | It is used by a local LP to migrate a SE to a remote LP. The local LP is **not** free to define what SEs should be migrated. During the simulation execution, the migration mechanism defines what SEs have to be migrated and informs the LP using a " | + | |
- | + | ||
- | **Notes**: | + | |
- | + | ||
- | * The " | + | |
- | + | ||
- | * The GAIA_Migrate() is implemented using a " | + | |
- | + | ||
- | **Return value:** | + | |
- | //none// | + | === GAIA_Send() |
- | + | ||
- | + | ||
- | ==== GAIA_ByteMigrate() | + | |
- | <code java> | + | |
- | void GAIA_ByteMigrate (int id, byte[] data, int size); | + | |
- | </ | + | |
- | + | ||
- | **Parameters**: | + | |
- | * int **id**: Identifier of the migrating SE; | + | |
- | * byte[] **data**: A byte-array containing the internal state of the SE; | + | |
- | * int **size**: String size; | + | |
- | + | ||
- | + | ||
- | **Description**: | + | |
- | + | ||
- | It is used by a local LP to migrate a SE to a remote LP. The local LP is **not** free to define what SEs should be migrated. During the simulation execution, the migration mechanism defines what SEs have to be migrated and informs the LP using a " | + | |
- | + | ||
- | **Notes**: | + | |
- | + | ||
- | * The " | + | |
- | + | ||
- | * The GAIA_ByteMigrate() is implemented using a “EXEC_MIGR” message. Therefore, the LP that receives a message of this type is receiving a migrating Simulated Entity. | + | |
- | + | ||
- | * This API has the exactly the same semantic of GAIA_Migrate(). For performance reasons, in this case the SE state is contained in an array instead of a String. | + | |
- | + | ||
- | **Return value:** | + | |
- | + | ||
- | //none// | + | |
- | + | ||
- | + | ||
- | ==== GAIA_Send() | + | |
<code java> | <code java> | ||
void GAIA_Send (int obj_src, int obj_dest, double Ts, String Msg, int Size); | void GAIA_Send (int obj_src, int obj_dest, double Ts, String Msg, int Size); | ||
Line 420: | Line 423: | ||
- | ==== GAIA_ByteSend() | + | === GAIA_ByteSend() |
<code java> | <code java> | ||
void GAIA_ByteSend (int obj_src, int obj_dest, double Ts, byte[] Msg, int Size); | void GAIA_ByteSend (int obj_src, int obj_dest, double Ts, byte[] Msg, int Size); | ||
Line 449: | Line 452: | ||
- | ==== GAIA_Broadcast() | + | === GAIA_Broadcast() |
<code java> | <code java> | ||
void GAIA_Broadcast (int obj_src, double Ts, String Msg, int Size); | void GAIA_Broadcast (int obj_src, double Ts, String Msg, int Size); | ||
Line 476: | Line 479: | ||
- | ==== GAIA_ByteBroadcast() | + | === GAIA_ByteBroadcast() |
<code java> | <code java> | ||
void GAIA_ByteBroadcast (int obj_src, double Ts, byte[] Msg, int Size); | void GAIA_ByteBroadcast (int obj_src, double Ts, byte[] Msg, int Size); | ||
Line 506: | Line 509: | ||
- | ==== GAIA_Receive() | + | === GAIA_Receive() |
<code java> | <code java> | ||
String | String | ||
Line 535: | Line 538: | ||
- | ==== GAIA_ByteReceive() | + | === GAIA_ByteReceive() |
<code java> | <code java> | ||
byte[] | byte[] | ||
Line 564: | Line 567: | ||
Returns the message (byte-array). | Returns the message (byte-array). | ||
- | ==== GAIA_GetStatistics() | + | |
+ | ==== Statistics ==== | ||
+ | |||
+ | |||
+ | === GAIA_GetStatistics() | ||
<code java> | <code java> | ||
void GAIA_GetStatistics(); | void GAIA_GetStatistics(); |
pads/gaia-apis.txt · Last modified: 2017/12/20 07:48 by gdangelo