Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

Application Interface
[PLMXML Import/Export]

Modules

Data Structures

AppInterface Related

Request Object related

MasterRecord related

Collaboration Context related

Type related

Defines

Typedefs

Enumerations

Functions


Define Documentation

#define AI_id_size_c   WSO_desc_size_c

Definition at line 52 of file appinterface.h.

#define AI_max_app_ref_string   240

String max size

Definition at line 59 of file appinterface.h.

#define AI_msg_size_c   WSO_desc_size_c

Definition at line 53 of file appinterface.h.

#define AI_request_no_dependancy   "AI_request_no_dependancy"

Preference

Definition at line 56 of file appinterface.h.

#define AppInterface_class_name_c   "AppInterface"

Definition at line 34 of file appinterface.h.

#define AppInterface_private_appgrp_type_name_c   "PrivateAppGrp"

Definition at line 46 of file appinterface.h.

#define AppInterface_private_structure_type_name_c   "PrivateContext"

Definition at line 45 of file appinterface.h.

#define AppInterface_vis_structure_type_name_c   "VisStructureContext"

Definition at line 47 of file appinterface.h.

#define AppInterfaceType_class_name_c   "AppInterfaceType"

Definition at line 44 of file appinterface.h.

#define AppInterfaceType_idc_type_name_c   "IntermediateDataCapture"

Request Object type

Definition at line 62 of file appinterface.h.

#define MasterRecord_class_name_c   "MasterRecord"

Definition at line 35 of file appinterface.h.

#define RecordObject_class_name_c   "RecordObject"

Definition at line 37 of file appinterface.h.

#define RequestObject_class_name_c   "RequestObject"

Definition at line 36 of file appinterface.h.

#define TC_link_ic_relation_name   "IMAN_eco_link"

Definition at line 50 of file appinterface.h.


Typedef Documentation


Enumeration Type Documentation

Request Object scope

Enumerator:
Request_scope_whole 
Request_scope_partial 
Request_scope_any 

Definition at line 93 of file appinterface.h.

Request Object state

Enumerator:
Request_state_new 
Request_state_processing 
Request_state_pending 
Request_state_communicating 
Request_state_completed 
Request_state_rejected 
Request_state_any 

Definition at line 81 of file appinterface.h.

Request Object status

Enumerator:
Request_status_normal 
Request_status_warning 
Request_status_severe 
Request_status_abort 
Request_status_any 

Definition at line 71 of file appinterface.h.

Enumerator:
Request_type_publish 
Request_type_sync 
Request_type_any 

Definition at line 63 of file appinterface.h.

Update type

Enumerator:
Request_update_full 
Request_update_delta 
Request_update_any 

Definition at line 101 of file appinterface.h.


Function Documentation

AI_API int AI_add_base_ref ( tag_t  ai,
tag_t  ref 
)

Parameters:
ai  (I)
ref  (I)

AI_API int AI_add_base_refs ( tag_t  ai,
int  num,
tag_t refs,
int *  persistNum,
tag_t **  persistObj 
)

Parameters:
ai  (I)
num  (I)
refs  (I)
persistNum  (O)
persistObj  (OF)

AI_API int AI_add_record ( tag_t  ai,
const char *  objId,
const char *  masterId,
date_t  date,
tag_t record 
)

Add or modify a record of an AI.

Parameters:
ai  (I)
objId  (I) Object UID to record
masterId  (I) Master UID (could be just the objID)
date  (I) Last processed date
record  (O) The record of this object

AI_API int AI_ask_app_id ( tag_t  ai,
char  id[AI_id_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use AI_ask_app_id2
For context
Parameters:
ai  (I)
id  (O)

AI_API int AI_ask_app_id2 ( tag_t  ai,
char **  id 
)

For context

Parameters:
ai  (I)
id  (OF)

AI_API int AI_ask_base_refs ( tag_t  ai,
int *  num,
tag_t **  refs 
)

Parameters:
ai  (I)
num  (O)
refs  (OF) num

AI_API int AI_ask_master_file ( tag_t  ai,
tag_t mf 
)

For Master XML file

Parameters:
ai  (I)
mf  (O)

AI_API int AI_ask_master_record ( tag_t  ai,
tag_t ma 
)

Parameters:
ai  (I)
ma  (O)

AI_API int AI_ask_next_request ( tag_t  ai,
tag_t  cur_req,
Request_type_t  type,
Request_state_t  state,
tag_t req 
)

Ask the next available requestObject from the AI, given the request type.

Parameters:
ai  (I)
cur_req  (I) Current requestobject
type  (I) Type of request (sync/publish)
state  (I)
req  (O) The next request object

AI_API int AI_ask_project_id ( tag_t  ai,
char  id[AI_id_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use AI_ask_project_id2 For project id
Parameters:
ai  (I)
id  (O)

AI_API int AI_ask_project_id2 ( tag_t  ai,
char **  id 
)

For project id

Parameters:
ai  (I)
id  (OF)

AI_API int AI_ask_record ( tag_t  ai,
const char *  objId,
tag_t record 
)

Parameters:
ai  (I)
objId  (I)
record  (O)

AI_API int AI_ask_request_objects ( tag_t  ai,
Request_type_t  type,
Request_state_t  state,
int *  num,
tag_t **  req 
)

Ask the requestObject from the AI, given the request type and/or state.

Parameters:
ai  (I) Owning AI
type  (I) Type of request (sync/publish)
state  (I) State of the request
num  (O) Number of requestobject found
req  (OF) num Tag list of requestobject

AI_API int AI_ask_site_id ( tag_t  ai,
char  id[AI_id_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use AI_ask_site_id2
For Site id
Parameters:
ai  (I)
id  (O)

AI_API int AI_ask_site_id2 ( tag_t  ai,
char **  id 
)

For Site id

Parameters:
ai  (I)
id  (OF)

AI_API int AI_ask_transfermode ( tag_t  ai,
PIE_direction_t  type,
tag_t tm 
)

Parameters:
ai  (I)
type  (I)
tm  (O)

AI_API int AI_can_add_request ( tag_t  ai,
Request_type_t  type,
logical ok 
)

Ask whether we can add new request: right now the logical is:

  1. Can not add new sync if pending Publish request
  2. Can not add publish if pending sync
Parameters:
ai  (I) Owning AI
type  (I) Type of request (sync/publish)
ok  (O) Whether ok to add or not

AI_API int AI_create_instance ( const char *  type,
const char *  name,
const char *  desc,
tag_t ai 
)

Create the AppInterface instance.

Parameters:
type  (I)
name  (I)
desc  (I)
ai  (O) Tag of AppInterface instance

AI_API int AI_create_request ( tag_t  ai,
const char *  name,
const char *  desc,
Request_type_t  reqType,
tag_t req 
)

Create a RequestObject with the specific type. Tasks will be performed:

  1. Create RequestObject instance
  2. Assign RequestObject to this AI
Parameters:
ai  (I) Owning AI
name  (I) Name
desc  (I) Description
reqType  (I) Type of request (sync/publish)
req  (O) Requestobject created

AI_API int AI_export_objects ( tag_t  ai,
int  num,
tag_t objects,
logical  partial 
)

Export selected object through this AI. It will:

  1. Store the objects in AI;
  2. Create requestObject (sync)
  3. Generate PLMXML file and store in requestobject
Parameters:
ai  (I) This AI
num  (I) Number of objects
objects  (I) Selcted objects
partial  (I) Export as partial request

AI_API int AI_export_objects_incremental ( tag_t  ai,
int  num,
tag_t objects,
logical  partial 
)

Export selected object through this AI with Incremental Update. It will:

  1. Store the objects in AI;
  2. Create requestObject (sync)
  3. Generate Incremental PLMXML file and store in requestobject
Parameters:
ai  (I) This AI
num  (I) Number of objects
objects  (I) Selcted objects
partial  (I) Export as partial request

AI_API int AI_find ( AI_search_criteria_t seach,
int *  num,
tag_t **  ais 
)

Given the search criteria, find all the AIs in the database

Parameters:
seach  (I) Search criteria for AI
num  (O) Number of AI found
ais  (OF) num Tag list of AI

AI_API int AI_init_module (  ) 

AI_API int AI_init_search ( AI_search_criteria_t seach  ) 

Parameters:
seach  (I)

AI_API int AI_is_object_modified ( tag_t  ai,
const char *  objId,
date_t  modDate,
logical modified 
)

Check the MasterRecord to see whether an Object is modified since last export. If this object is not recorded in MasterRecord, it is considered modified

Parameters:
ai  (I)
objId  (I) Object UID
modDate  (I) modDate
modified  (O) Modified

AI_API int AI_remove_record ( tag_t  ai,
const char *  objId 
)

Parameters:
ai  (I)
objId  (I)

AI_API int AI_remove_request_object ( tag_t  ai,
tag_t  req 
)

Parameters:
ai  (I)
req  (I)

AI_API int AI_request_add_file_map ( tag_t  req,
const char *  fileRef,
const char *  fileId 
)

Parameters:
req  (I)
fileRef  (I)
fileId  (I)

AI_API int AI_request_ask_owning_ai ( tag_t  req,
tag_t owner 
)

Parameters:
req  (I)
owner  (O)

AI_API int AI_request_ask_process_by ( tag_t  req,
tag_t user 
)

Parameters:
req  (I)
user  (O)

AI_API int AI_request_ask_process_on ( tag_t  req,
date_t date 
)

Parameters:
req  (I)
date  (O)

AI_API int AI_request_ask_scope ( tag_t  req,
int *  scope 
)

Ask for the scope, which is Whole/Partial

Parameters:
req  (I)
scope  (O)

AI_API int AI_request_ask_state ( tag_t  req,
int *  stat 
)

Parameters:
req  (I)
stat  (O)

AI_API int AI_request_ask_state_msg ( tag_t  req,
char  stat_msg[AI_msg_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use AI_request_ask_state_msg2
Parameters:
req  (I)
stat_msg  (O)

AI_API int AI_request_ask_state_msg2 ( tag_t  req,
char **  stat_msg 
)

Parameters:
req  (I)
stat_msg  (OF)

AI_API int AI_request_ask_status ( tag_t  req,
int *  stat 
)

Parameters:
req  (I)
stat  (O)

AI_API int AI_request_ask_status_msg ( tag_t  req,
char  stat_msg[AI_msg_size_c+1] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use AI_request_ask_status_msg2
Parameters:
req  (I)
stat_msg  (O)

AI_API int AI_request_ask_status_msg2 ( tag_t  req,
char **  stat_msg 
)

Parameters:
req  (I)
stat_msg  (OF)

AI_API int AI_request_ask_structure_file ( tag_t  req,
Request_update_t  type,
tag_t file 
)

Parameters:
req  (I)
type  (I)
file  (O)

AI_API int AI_request_ask_type ( tag_t  req,
int *  type 
)

Parameters:
req  (I)
type  (O)

AI_API int AI_request_ask_update_type ( tag_t  req,
int *  update 
)

Ask for update type, which is Full/Delta

Parameters:
req  (I)
update  (O)

AI_API int AI_request_can_process ( tag_t  req,
logical ok 
)

Ask whether we can process this request

Parameters:
req  (I) Request
ok  (O) Whether ok or not

AI_API int AI_request_import_file ( tag_t  req,
const char *  fName,
const char *  fRefId,
int  fileType,
const char *  appName,
const char *  siteId,
const char *  version,
tag_t fileTag 
)

Import the associated files (such as dataset file) to TC. If passed in ApplicationRef, it will be stored as PLMAppUID.

Parameters:
req  (I)
fName  (I) Full file path
fRefId  (I) File reference id, which can be either PLMXML element ID, or Application UID
fileType  (I) File type
appName  (I) Application name (optional)
siteId  (I) Application site id (optional)
version  (I) Version (optional)
fileTag  (O) File tag after import

AI_API int AI_request_process ( tag_t  req,
tag_t  eco 
)

Process request:

  1. Sync request: Generate XML file and save it to database.
  2. Publish request: import using ECO.
Parameters:
req  (I) Request object tag
eco  (I) ECO object tag for incremental. It will be used for Publish request only

AI_API int AI_request_process_partial ( tag_t  req,
int  num_obj,
tag_t objs 
)

Export selected objects only

Parameters:
req  (I)
num_obj  (I)
objs  (I)

AI_API int AI_request_set_scope ( tag_t  req,
Request_scope_t  scope 
)

Parameters:
req  (I)
scope  (I)

AI_API int AI_request_set_state ( tag_t  req,
Request_state_t  stat 
)

Parameters:
req  (I)
stat  (I)

AI_API int AI_request_set_state_msg ( tag_t  req,
const char *  stat_msg 
)

Parameters:
req  (I)
stat_msg  (I)

AI_API int AI_request_set_status ( tag_t  req,
Request_status_t  stat 
)

Parameters:
req  (I)
stat  (I)

AI_API int AI_request_set_status_msg ( tag_t  req,
const char *  stat_msg 
)

Parameters:
req  (I)
stat_msg  (I)

AI_API int AI_request_set_structure_file ( tag_t  req,
Request_update_t  type,
tag_t  file 
)

Parameters:
req  (I)
type  (I)
file  (I)

AI_API int AI_request_set_update_type ( tag_t  req,
Request_update_t  update 
)

Parameters:
req  (I)
update  (I)

AI_API int AI_save_records ( tag_t  ai  ) 

Save all the records to Database. Need to call this after MasterRecord is modified.

Parameters:
ai  (I)

AI_API int AI_set_base_refs ( tag_t  ai,
int  num,
tag_t refs 
)

Parameters:
ai  (I)
num  (I)
refs  (I)

AI_API int AI_set_master_file ( tag_t  ai,
tag_t  mf 
)

Parameters:
ai  (I)
mf  (I)

AI_API int AI_set_master_record ( tag_t  ai,
tag_t  ma 
)

Parameters:
ai  (I)
ma  (I)

AI_API int AI_set_project_id ( tag_t  ai,
const char *  id 
)

Parameters:
ai  (I)
id  (I)

AI_API int AI_set_site ( tag_t  ai,
tag_t  site 
)

Parameters:
ai  (I)
site  (I)

AI_API int AI_set_transfermode ( tag_t  ai,
PIE_direction_t  type,
tag_t  tm 
)

Parameters:
ai  (I)
type  (I)
tm  (I)