| function name | return | connection kind | connection change | on header | call count | description |------------------------------ |-------------|----------------|-----------------|--------------|--------------|-------------- | map_source_func | char * | nothing | NO | ON | 0 | | map_process_info | MT_PROCESS_INFO * | nothing | NO | OFF | 0 | | checkScreenValue | int | nothing | NO | OFF | 0 | | **about line** 0100 | | | | | | | log_write | void | nothing | NO | ON | 9 | ログをsyslogに書き出し | is_same_error | int | nothing | NO | ON | 0 | 今のエラーが直前のエラーと同じかどうか判定 | checkScreenValue | int | nothing | NO | OFF | 0 | 値の変化の判断(NULLの時は初期化) | beforeProcessFinish | int | nothing | NO | OFF | 1 | プロセスを正常に終了させる関数 | initMapProcessInfo | void | nothing | NO | OFF | 5 | | **about line** 0200 | | | | | | | getMapProcessSignalFlg | int | nothing | NO | OFF | 1 | Get the Map Process Signal Flg object | setStopMapProcessThFlg | int | nothing | NO | OFF | 1 | Set the Stop Map Process Th Flg object | setStartMapProcessThFlg | int | nothing | NO | OFF | 1 | Set the Start Map Process Th Flg object | getMapProcessThFlg | int | nothing | NO | OFF | 1 | Get the Map Process Th Flg object | getMapProcessStatusFlg | int | nothing | NO | OFF | 0 | Get the Map Process Status Flg object | signalcheckAbort | void | nothing | NO | ON | 4 | signal Flg をチェックし問題があるならabortをする | **about line** 0300 | | | | | | | getprocessName | char * | nothing | NO | ON | 0 | プロセス名を返す | **about line** 0400 | | | | | | | getUserAndProcessName | int | nothing | NO | ON | 1 | プロセス名を返す | mytool_runtime_error | void | nothing | NO | ON | 1 | エラーにプロセス名を付けて出力 | get_cob_call_params_MT | int | nothing | NO | ON | 0 | Get the cob call params MT object libconのcob_call_paramsを取得 | **about line** 0500 | | | | | | | set_cob_call_params_MT | int | nothing | NO | ON | 0 | Set the cob call params MT object libconのcob_call_paramsをセット | StrToLowerCpy | char * | nothing | NO | ON | 0 | 文字列を大文字に | setCommonFunctionName | void | nothing | NO | ON | 5 | Set the Common Function Name object 関数名を共有変数にセット(共通関数の実体) | **about line** 0600 | | | | | | | unsetCommonFunctionName | void | nothing | NO | ON | 2 | | mytoolgetErrorId | int | nothing | NO | ON | 1 | エラーID出力 | sigInt | void | nothing | NO | OFF | 0 | recieve INTERRUPT signal | sigSegv | void | nothing | NO | OFF | 0 | recieve SegmentationFalet signal | sigAbrt | void | nothing | NO | OFF | 0 | recieve Abort signal | **about line** 0700 | | | | | | | sigUsr1 | void | nothing | NO | OFF | 0 | recieve USER1 signal | sigUsr2 | void | nothing | NO | OFF | 0 | recieve USER2 signal | MT_setKeyName | void | nothing | NO | OFF | 2 | 第一引数にkeyの文字列をセット | **about line** 0800 | | | | | | | MT_set_recordlock | int | nothing | NO | ON | 1 | キュー(Queue)の先頭から見て処理済みが入っていない最初のものをロックにする | add_queue_for_record_lock | void | nothing | NO | OFF | 2 | ロックを登録するためのキューに値をセット | **about line** 0900 | | | | | | | is_used_sem | int | nothing | NO | OFF | 0 | semaphoreが使用中かをチェック | memc_server_add | int | nothing | NO | OFF | 1 | memcached に接続を追加 | **about line** 1000 | | | | | | | MT_memc_alloc | int | nothing | NO | OFF | 1 | memcachedにKEY-VALUEを登録 (KEYはテーブル名とレコード番号,VALUEはpid) | MT_get_lock | int | nothing | NO | ON | 0 | レコードロック用の共有メモリとそのロックを取得 | MT_memc_free | int | nothing | NO | ON | 0 | 対象のkeyNameのデータを削除 | **about line** 1100 | | | | | | | outThread | void * | nothing | NO | OFF | 0 | 定期的にDBアクセスをする | **about line** 1200 | | | | | | | MT_Initialize | int | nothing | NO | ON | 0 | その他の処理の初期化 | MT_Finalize | int | nothing | NO | ON | 0 | | **about line** 1300 | | | | | | | getConfFilename | char * | nothing | NO | ON | 0 | Get the Conf Filename object 設定ファイルのパスを取得 | setExecuteInfoPgname | char * | nothing | NO | ON | 2 | Set the Execute Info Pgname object | setExecuteInfoUid | int | nothing | NO | ON | 1 | Set the Execute Info Uid object | setExecuteInfoPid | int | nothing | NO | ON | 0 | Set the Execute Info Pid object | getExecuteInfoPgname | char * | nothing | NO | ON | 0 | Get the Execute Info Pgname object | **about line** 1400 | | | | | | | getExecuteInfoUid | int | nothing | NO | ON | 0 | Get the Execute Info Uid object | getExecuteInfoPid | int | nothing | NO | ON | 3 | Get the Execute Info Pid object | M_UID | int | nothing | NO | ON | 1 | ユニークID生成 | time_check_microtime | void | nothing | NO | ON | 0 | 時間計測用のログ出力関数 | local_server_time | char * | nothing | NO | ON | 6 | 現在時間をフォーマット(YY/MM/dd hh:mm:ss.mmmmmm)で返す | reset_errno_on_MT | void | nothing | NO | ON | 3 | error.hのerrnoを0リセットする関数 --------- ## function #### char *map_source_func = NULL; - #### MT_PROCESS_INFO *map_process_info = NULL; - #### int checkScreenValue(SD_SCREEN_PARAM *chrCache, cob_field *cobTarg); - ### about 0100 #### void log_write(int priority, const char *const message) - ログをsyslogに書き出し * @author koyama * @param priority * @param message #### int is_same_error(struct pre_error_info *errObj, int error_no, int line_number) - 今のエラーが直前のエラーと同じかどうか判定 * @author koyama * @param errObj ライブラリごとの直前のエラーを格納しておく * @param error_no 渡されるエラーNo * @param line_number 関数を呼び出した行数を渡してもらう * @return int 前のエラーと同じなら1,前と違うなら0 * @date 20220128 * @author koyama #### int checkScreenValue(SD_SCREEN_PARAM *chrCache,cob_field *cobTarg){ - 値の変化の判断(NULLの時は初期化) * @author koyama * @param chrCache * @param cobTarg * @return int #### int beforeProcessFinish(MT_PROCESS_INFO *procInfo) - プロセスを正常に終了させる関数 * @param procInfo 終了時にログ等を書き出す情報を格納(map_process_info) * @return int とりあえず成否を返しておく (成功なら0) #### void initMapProcessInfo() - * @author koyama ### about 0200 #### int getMapProcessSignalFlg() - Get the Map Process Signal Flg object * @author koyama * @return int Signal Flg #### int setStopMapProcessThFlg() - Set the Stop Map Process Th Flg object * @return int th_stop Flg * @author n.koyama * @date 20230201 #### int setStartMapProcessThFlg() - Set the Start Map Process Th Flg object * @author koyama * @return int th_stop Flg #### int getMapProcessThFlg() - Get the Map Process Th Flg object * @author koyama * @return int th_stop Flg #### int getMapProcessStatusFlg() - Get the Map Process Status Flg object * @author koyama * @return int Status Flg #### void signalcheckAbort() - signal Flg をチェックし問題があるならabortをする * @author koyama ### about 0300 #### char *getprocessName(char *setName,int size){ - プロセス名を返す * @details 現在時間をフォーマット(YY/MM/dd hh:mm:ss)で返す * @details プログラムの実行情報オブジェクトに値を格納するか? upd koyama 20221006 * @param setName プロセス名を返す文字列ポインタ in:size プロセス名を返す文字列の長さ * @param size 名前の入るサイズ * @return char* * @author koyama ### about 0400 #### int getUserAndProcessName(char *setName,char *setUser) - プロセス名を返す * @details 現在時間をフォーマット(YY/MM/dd hh:mm:ss)で返す * @param (setName) プロセス名を返す文字列ポインタ * @param (setUser) ユーザ名を返す文字列ポインタ ::::こちらの関数は文字列をオーバする場合を無視 * @author koyama #### void mytool_runtime_error(const char *sfile, const char *fmt, ...) - エラーにプロセス名を付けて出力 * @author koyama * @param sfile * @param fmt 出力フォーマット...フォーマットに対応する変数 * @param ... #### int get_cob_call_params_MT(){ - Get the cob call params MT object libconのcob_call_paramsを取得 * @author koyama * @return int ### about 0500 #### int set_cob_call_params_MT(int input_value) - Set the cob call params MT object libconのcob_call_paramsをセット * @author koyama * @return struct cob_module* * @author koyama * @param input_value * @return int #### char *StrToLowerCpy(char *s,char *p){ - 文字列を大文字に * @author koyama * @date 20140530 * @param s 文字列配列じゃないとだめ * @param p pをsにコピーしながら小文字に変換 * @return char* #### void setCommonFunctionName(char *tempStack,char *setStrFunc,char *format,...){ - Set the Common Function Name object 関数名を共有変数にセット(共通関数の実体) * @author koyama * @param tempStack * @param setStrFunc * @param format 出力フォーマット,...フォーマットに対応する変数 * @param ... ### about 0600 #### void unsetCommonFunctionName(char *tempStack,char *setStrFunc){ - * @param tempStack * @param setStrFunc #### int mytoolgetErrorId(int libId,int funcId,int seqId){ - エラーID出力 * @author koyama * @param libId ライブラリ番号 * @param funcId 関数番号 * @param seqId 関数内での出力番号 * @return int #### void sigInt(int args, siginfo_t *info, void *ctx) - recieve INTERRUPT signal * @author koyama * @param args * @param info * @param ctx #### void sigSegv(int args, siginfo_t *info, void *ctx) - recieve SegmentationFalet signal * @author koyama * @param args * @param info * @param ctx #### void sigAbrt(int args, siginfo_t *info, void *ctx) - recieve Abort signal * @author koyama * @param args * @param info * @param ctx ### about 0700 #### void sigUsr1(int args, siginfo_t *info, void *ctx) - recieve USER1 signal * @author koyama * @param args * @param info * @param ctx #### void sigUsr2(int args, siginfo_t *info, void *ctx) - recieve USER2 signal * @author koyama * @param args * @param info * @param ctx #### void MT_setKeyName(char *setKey, char *tableName, long long int id ) - 第一引数にkeyの文字列をセット * @param setKey セットする対象の文字列ポインタ * @param tableName テーブル名相当 * @param id 行番号相当 ### about 0800 #### int MT_set_recordlock() - キュー(Queue)の先頭から見て処理済みが入っていない最初のものをロックにする * @details ロックの処理、処理済みの削除を行う * @author koyama * @date 20211125 #### void add_queue_for_record_lock(char *path_name, unsigned long long row_num, int seg_id, CHANGE_RECORD_LOCK_STATUS chStatus) - ロックを登録するためのキューに値をセット * @author koyama * @param (path_name) テーブル名の情報のもとになるパス名 * @param (row_num) 行番号(実態のID) * @date 20211124 ### about 0900 #### int is_used_sem(unsigned short *all_val) - semaphoreが使用中かをチェック * @author koyama * @date 20211019 * @param all_val * @return int #### int memc_server_add(struct memcached_st *memc, char *host, int port) - memcached に接続を追加 * @param memc 共通オブジェクト(コネクションオブジェクト?) * @param host 接続先 * @param port 接続先ポート * @return int * @author koyama * @date 2022-11-21 ### about 1000 #### int MT_memc_alloc(struct memcached_st *memc,char *file_path, unsigned long long id, int *ismine, int *lock_state) - memcachedにKEY-VALUEを登録 (KEYはテーブル名とレコード番号,VALUEはpid) * @param memc * @param file_path * @param id * @param ismine * @param lock_state ロックがされていたかを返す変数 * @return int 成功か失敗 => 失敗なら1 * @author koyama * @date 2022-11-21 #### int MT_get_lock(char *tableName, unsigned long long id, int *ismine, int *lock_state) - レコードロック用の共有メモリとそのロックを取得 * @author koyama * @date 20210929 * @param tableName * @param id * @param ismine * @param lock_state * @return int #### int MT_memc_free(unsigned long long id, char *tableName) - 対象のkeyNameのデータを削除 * @param id * @param tableName * @return int ### about 1100 #### void *outThread(void *args) - 定期的にDBアクセスをする * @author koyama * @param args * @return void* ### about 1200 #### int MT_Initialize() - その他の処理の初期化 * @author koyama * @return int #### int MT_Finalize() - * @author koyama * @return int ### about 1300 #### char *getConfFilename(char *strConfPath) - Get the Conf Filename object 設定ファイルのパスを取得 * @author koyama * @date 20150828 * @param strConfPath * @return char* #### char *setExecuteInfoPgname(char *setString) - Set the Execute Info Pgname object * @return struct pgExecuteInfo 初期化したグローバルオブジェクトのポインタ * @param setString グローバル変数のExecuteInfoにセットするpgname * @return char* グローバル変数のExecuteInfoにセットされたpgnameのポインタ #### int setExecuteInfoUid(int setuid) - Set the Execute Info Uid object * @param setuid グローバル変数のExecuteInfoにセットするuid * @return int グローバル変数のExecuteInfoにセットされたuid #### int setExecuteInfoPid(int setPid) - Set the Execute Info Pid object * @param setPid グローバル変数のExecuteInfoにセットするpid * @return int グローバル変数のExecuteInfoにセットされたpid #### char * getExecuteInfoPgname() - Get the Execute Info Pgname object * @author koyama * @return char * グローバル変数のExecuteInfoにセットされたpgnameのポインタ ### about 1400 #### int getExecuteInfoUid() - Get the Execute Info Uid object * @author koyama * @return int グローバル変数のExecuteInfoにセットされたuid #### int getExecuteInfoPid() - Get the Execute Info Pid object * @author koyama * @return int グローバル変数のExecuteInfoにセットされたpid #### int M_UID() - ユニークID生成 * @author koyama * @return int #### void time_check_microtime(const char *function_name, int line_num, const char *comment) - 時間計測用のログ出力関数 * @date 20190227 * @param function_name * @param line_num * @param comment #### char *local_server_time(char *retStr) - 現在時間をフォーマット(YY/MM/dd hh:mm:ss.mmmmmm)で返す * @author koyama * @date 20190822 * @param retStr 返す対象文字列のポインタ * @return char* #### void reset_errno_on_MT() - error.hのerrnoを0リセットする関数 * @author koyama # end