ITK Function Reference

(V10000.1.0.60_20160308.00)
mrocore.h
Go to the documentation of this file.
1 /*==============================================================================
2  Copyright (c) 2008 Siemens PLM Software
3  Unpublished - All Rights Reserved
4  ==============================================================================*/
5 
13 #ifndef MROCORE_H
14 #define MROCORE_H
15 
16 #include <unidefs.h>
17 #include <mrocore/libmrocore_exports.h>
18 
19 #define MRO_srlnum_max_len 128
20 #define MRO_form_name_len 128
21 #define MRO_physical_quantity_one 1.0
22 
23 #define MEMFREE( ptr) { \
24  MEM_free( ptr); \
25  ptr = NULL; \
26  }
27 
28 #define FREE_CREATEINPUT( ptr) { \
29  Teamcenter::BusinessObjectRegistry::instance().deleteInputObject( ptr); \
30  ptr = NULL; \
31  }
32 #ifdef __cplusplus
33  extern "C"{
34 #endif
35 
48 extern MROCORE_API int MROCORE_init_module();
49 
53 typedef struct MROCORE_API PhysicalPartParams
54 {
55  char* partNumber;
56  char* description;
57  char* serialNumber;
58  char* lotNumber;
60  char* usageName;
72 
76 typedef struct MROCORE_API GenerateStructureParams
77 {
78  char* partNumber;
79  char* serialNumber;
80  char* lotNumber;
89 
93 typedef struct MROCORE_API DuplicatePhysStructParams
94 {
95  char* serialNumber;
96  char* lotNumber;
98  char* locationName;
107 
111 typedef struct MROCORE_API InstallPartParams
112 {
113  char* usageName;
116 
120 typedef struct MROCORE_API MROCORE_characteristics_data_s
121 {
123  double value;
126 
127 
131 typedef struct MROCORE_API MROCORE_utilization_data_s
132 {
133  char* description;
135  char* capturedBy;
138 
139 
143 typedef struct MROCORE_API MROCORE_timesince_values_s
144 {
145  double value;
149 
150 /*============================================================================*/
151 /* Start - Deprecated Functions */
152 /*============================================================================*/
153 
164 extern MROCORE_API int MROCORE_get_all_open_usage(
165  tag_t parentPhysPart,
166  tag_t physicalPartRevision,
167  logical allUsages,
168  char*** usageType,
169  char*** openUsages,
170  int* count,
171  tag_t** childBOMLine
172  );
173 
182 extern MROCORE_API int MROCORE_update_relation_part_used_is(
183  tag_t physRev,
184  tag_t itemRev,
185  tag_t relation,
186  logical validData,
187  logical reset
188  );
189 
190 /*============================================================================*/
191 /* End - Deprecated Functions */
192 /*============================================================================*/
193 
197 extern MROCORE_API int MROCORE_set_relation_install_date(
198  tag_t relation,
199  date_t date
200  );
201 
205 extern MROCORE_API int MROCORE_ask_relation_install_date(
206  tag_t relation,
207  char** date_string
208  );
209 
213 extern MROCORE_API int MROCORE_set_physpartrev_serial_number(
214  tag_t physRev,
215  char* serialNumber
216  );
217 
221 extern MROCORE_API int MROCORE_set_physpart_uid(
222  tag_t physPart,
223  char* physicalUID
224  );
225 
229 extern MROCORE_API int MROCORE_set_physpartrev_mfg_id(
230  tag_t physRev,
231  char* mfgId
232  );
233 
237 extern MROCORE_API int MROCORE_set_physpart_mfg_date(
238  tag_t physPart,
239  date_t date_string
240  );
241 
245 extern MROCORE_API int MROCORE_set_relation_part_used_is(
246  tag_t relation,
247  char* partUsedIs
248  );
249 
253 extern MROCORE_API int MROCORE_ask_relation_part_used_is(
254  tag_t relation,
255  char** partUsedIs
256  );
257 
261 extern MROCORE_API int MROCORE_create_window(
262  tag_t* window
263  );
264 
268 extern MROCORE_API int MROCORE_set_window_top_line(
269  tag_t window,
270  tag_t item,
271  tag_t itemRev,
272  tag_t bomView,
273  tag_t* top_bom_line
274  );
275 
279 extern MROCORE_API int MROCORE_setup_deviation(
280  tag_t inParentPhysicalPart,
281  tag_t childPhysicalPart,
282  tag_t selDocument,
283  tag_t* allowedDeviation
284  );
285 
289 extern MROCORE_API int MROCORE_update_relation_part_used_is2(
290  tag_t physRev,
291  tag_t itemRev
292  );
293 
297 extern MROCORE_API int MROCORE_name_occurrence(
298  tag_t neutralBOMLine,
299  char* selectedPattern
300  );
301 
305 extern MROCORE_API int MROCORE_rebase_physical_part(
306  tag_t physicalBOMLine,
307  tag_t neutralBOMLine,
308  date_t rebaseDate,
309  const char* structureContext
310  );
311 
315 extern MROCORE_API int MROCORE_display_utilization(
316  tag_t physPart,
317  date_t tillDate,
318  int *utilizationCount,
319  tag_t** utilizationList
320  );
321 
325 extern MROCORE_API int MROCORE_record_utilization(
326  tag_t physBOMLine,
327  tag_t logBook,
328  MROCORE_utilization_data_s in_param,
329  MROCORE_characteristics_data_s *charValueParams,
330  int count,
331  tag_t* logEntry
332  );
333 
337 extern MROCORE_API int MROCORE_calculate_time_between(
338  tag_t item,
339  tag_t charDef,
340  date_t fromDate,
341  date_t toDate,
342  double *value,
343  date_t *dateValue
344  );
345 
349 extern MROCORE_API int MROCORE_calculate_time_between2(
350  tag_t item,
351  tag_t charDef,
352  date_t fromDate,
353  date_t toDate,
355  );
359 extern MROCORE_API int MROCORE_get_first_physical_element_revision(
360  tag_t physPart,
361  tag_t* PhysPartRev
362  );
363 
367 extern MROCORE_API int MROCORE_get_latest_physical_element_revision(
368  tag_t physPart,
369  tag_t* PhysPartRev
370  );
371 
372 
376 extern MROCORE_API int MROCORE_get_related_part_logistics_form(
377  tag_t neutralItem,
378  tag_t* partLogisticsForm
379  );
380 
384 extern MROCORE_API int MROCORE_rename_physical_part(
385  tag_t physBOMLine ,
386  tag_t physPartRev ,
387  char* newPartNumber,
388  char* newSerialNumber,
389  date_t renameDate,
390  tag_t* newPhysPartRev
391  );
392 
396 extern MROCORE_API int MROCORE_rename_physical_part_2(
397  tag_t physPartRev ,
398  char* newPartNumber,
399  char* newSerialNumber,
400  date_t renameDate,
401  tag_t* newPhysPartRev
402  );
403 
407 extern MROCORE_API int MROCORE_duplicate_phys_structure(
408  tag_t inLine,
409  DuplicatePhysStructParams* inParam,
410  tag_t* newPhysPartRev
411  );
412 
416 extern MROCORE_API int MROCORE_convert_expression_to_prefix_form(
417  char * expression,
418  char ** prefixForm,
419  int * keywordCount,
420  char *** keywords
421  );
422 
436 extern MROCORE_API int MROCORE_assign_lot(
437  tag_t physical_bom_line,
438  tag_t physical_part_revision,
439  tag_t lot,
440  int quantity
441  );
442 
452 extern MROCORE_API int MROCORE_reconstruct_bomline (
453  const char * recipe,
454  tag_t* bom_line
455  );
456 
466 extern MROCORE_API int MROCORE_get_all_lots_for_design_part(
467  tag_t neutral_item_tag,
468  int* size,
469  tag_t** lots_for_part
470 );
471 
481 extern MROCORE_API int MROCORE_find_lots(
482  tag_t neutral_item_tag,
483  const char* lot_number,
484  const char* mfg_id,
485  int * lot_count,
486  tag_t** lots_for_part
487 );
488 
492 #ifdef __cplusplus
493  }
494 #endif
495 
496 #include <mrocore/libmrocore_undef.h>
497 
498 #endif