#ifndef _VIEW_INTERFACE_H__ #define _VIEW_INTERFACE_H__ typedef enum{ RESULT_SUCCESS, ERROR_PROC_ID_NO_FOUND, ERROR_EDGE_ID_NO_FOUND, ERROR_MEM_MALLOC, ERROR_NON_VALID_TOPO, ERROR_PARAM, ERROR_CONTENT_SIZE, ERROR_TYPE_NOT_MATCH, ERROR_DSP_BUFFER_OUT, ERROR_MODULE_TYPE_OUT, }error_code_t; typedef enum{ SITE_FILE = 0x1, //siteÀàÐͶÔÓ¦µÄ¶¥µãÄÚÈÝÊÇDesignÀàÐÍ DESIGN_FILE }DOCUMENT_TYPE; typedef struct{ int x, y; }IPoint_t; typedef struct{ IPoint_t l, r; }ILine_t; typedef struct{ ILine_t line; unsigned short edge_id; unsigned int source_port; unsigned int dest_port; }IEdge_t; typedef struct{ IPoint_t point; unsigned short vertex_id; unsigned short vertex_type; unsigned char chip_index; unsigned char in_port_num; unsigned char out_port_num; }IVertex_t; typedef struct { unsigned int topo_id; unsigned short topo_type; char pad[2]; unsigned short vertex_num; unsigned short edges_num; }ITopo_t; #define MAX_ADJ_EDGES_NUM 16 #define MAX_VERTEX_ERROR_NUM 16 typedef struct{ short vertex_id; short error_num; int error_port[MAX_VERTEX_ERROR_NUM]; }error_ports_t, *perror_ports_t; #ifdef _FRAMEWORK_DLL #define FW_API _declspec(dllexport) #else #define FW_API #endif //for pc FW_API void* open_document(void* bin, int bin_size); FW_API void* new_document(ITopo_t* pt); FW_API int save_document(void* pdocument, void* bin); FW_API error_code_t close_document(void* pdocument); FW_API int tell_document_length(void* pdocument); FW_API error_code_t add_vertex(void* pdocument, const IVertex_t *pv); FW_API error_code_t add_edge(void* pdocument, const IEdge_t * pe); FW_API error_code_t get_document_info(void* pdocument, ITopo_t* pt); FW_API error_code_t get_vertex(void* pdocument, int index, IVertex_t* pv); FW_API error_code_t get_edge(void* pdocument, int index, IEdge_t* pe); FW_API void* get_vertex_content(void* pdocument, unsigned short vertex_id); FW_API error_code_t set_vertex_content(void* pdocument, unsigned short vertex_id, void* pcontent, int size); FW_API error_code_t document_assign_physical_channel_id(void* pdocument); FW_API int check_document(void* pdocument, perror_ports_t perror, int perror_ports_size); FW_API error_code_t set_document_addition(void* pdocument,void* paddition, unsigned short size); FW_API void* get_document_addition(void* pdocument, unsigned short * size); #endif