{"id":6027,"date":"2023-03-17T10:25:25","date_gmt":"2023-03-17T02:25:25","guid":{"rendered":"https:\/\/www.tosunai.com\/?p=6027"},"modified":"2024-04-23T15:29:42","modified_gmt":"2024-04-23T07:29:42","slug":"tsmaster-toolbox-ide-series-1-toolbox-design-and-development","status":"publish","type":"post","link":"https:\/\/www.tosunai.com\/tsmaster-toolbox-ide-series-1-toolbox-design-and-development\/","title":{"rendered":"\u65b0\u529f\u80fd\u53d1\u5e03 | TSMaster\u5de5\u5177\u7bb1\u96c6\u6210\u5f00\u53d1\u73af\u5883\u7cfb\u52171-\u5de5\u5177\u7bb1\u8bbe\u8ba1\u5f00\u53d1"},"content":{"rendered":"\t\t
\u4eca\u5929\u7ed9\u5927\u5bb6\u4ecb\u7ecdTSMaster\u65b0\u529f\u80fd\u2014\u5de5\u5177\u7bb1\u8bbe\u8ba1\u5f00\u53d1\u3002\u6709\u4e86\u8fd9\u4e2a\u6a21\u5757\uff0c\u4efb\u4f55\u4eba\u90fd\u80fd\u591f\u7528Python\u6765\u8bbe\u8ba1\u4e13\u4e1a\u7684TSMaster\u7528\u6237\u754c\u9762\u5e76\u96c6\u6210\u5230\u81ea\u5df1\u7684\u5de5\u7a0b\u4e2d\u3002<\/p>
\u5728\u6b64\uff0c\u9700\u8981\u5927\u5bb6\u66f4\u65b0TSMaster\u8f6f\u4ef6\u81f3\u6700\u65b0\u7248\u672c\u3002\u6700\u65b0\u7248\u672c\u4e0b\u8f7d\u94fe\u63a5\u53ef\u4ee5\u76f4\u63a5\u5728\u516c\u4f17\u53f7\u83dc\u5355\u680f\u56de\u590d\u201cTSMaster\u201d\uff0c\u5373\u53ef\u83b7\u53d6\u3002<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t \u6253\u5f00TSMaster\uff0c\u8fdb\u5165\u540e\u5207\u6362\u5230\u5e94\u7528\uff0c\u70b9\u51fb\u5de5\u5177\u7bb1\u8bbe\u8ba1\u5f00\u53d1\u73af\u5883\u7684\u56fe\u6807\uff0c\u4f1a\u51fa\u73b0\u5f00\u53d1\u73af\u5883\u7684\u754c\u9762\u3002\u540c\u65f6\u4f1a\u6709\u4e00\u4e2a\u65b0\u56fe\u6807\uff0c\u800cTSMaster\u5de5\u5177\u7bb1\u51fa\u73b0\u5728\u8be5\u56fe\u6807\u7684\u53f3\u4fa7\u3002\u8fd9\u4e2a\u56fe\u6807\u7528\u6765\u94fe\u63a5\u7528\u6237\u8bbe\u8ba1\u751f\u6210\u7684\u754c\u9762\u3002\u8f6c\u53d1\u5230\u5f00\u53d1\u73af\u5883\u754c\u9762\uff0c\u53ef\u4ee5\u770b\u5230\u6709\u4e24\u4e2a\u73b0\u6210\u7684\u5de5\u5177\u7bb1\uff0c\u4e00\u4e2a\u662fCAN\u62a5\u6587\u7684\u53d1\u9001\u7a97\u53e3\uff0c\u53e6\u4e00\u4e2a\u662f\u5de5\u5177\u7bb1\u8bbe\u8ba1\u6307\u5357\u3002<\/p><\/section>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t \u7136\u540e\u70b9\u51fb\u5bf9\u5e94\u5de5\u5177\u7bb1\u6700\u53f3\u4fa7\u7684\u8fd0\u884c\u6309\u94ae\uff0c\u7a97\u53e3\u5c31\u4f1a\u663e\u793a\u5728TSMaster\u5de5\u5177\u7bb1\u7684\u94fe\u63a5\u4e0b\u9762\uff0c\u6211\u4eec\u5bf9\u8fd9\u4e2a\u7a97\u53e3\u8fdb\u884c\u62d6\u52a8\u548c\u7f29\u653e\u3002\u5982\u679c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u5173\u95ed\uff0c\u9ed8\u8ba4\u64cd\u4f5c\u662f\u9690\u85cf\uff0c\u5982\u679c\u60f3\u8981\u6062\u590d\u8fd9\u4e2a\u7a97\u53e3\u53ef\u4ee5\u901a\u8fc7\u4e0b\u62c9\u627e\u56de\uff0c\u5982\u679c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u5220\u9664\u6309\u94ae\uff0c\u5219\u53ef\u4ee5\u6c38\u4e45\u7684\u5220\u9664\u8be5\u7a97\u53e3\u3002\u8fd9\u6837\u7684\u7a97\u53e3\u6bcf\u70b9\u51fb\u4e00\u6b21\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\uff0c\u6bcf\u4e2a\u7a97\u53e3\u90fd\u6709\u72ec\u7acb\u7684\u914d\u7f6e\u3002<\/p><\/section>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t \u6211\u4eec\u53ef\u4ee5\u5c1d\u8bd5\u4fee\u6539\u4e00\u4e0b\u8fd9\u4e2a\u914d\u7f6e\uff0c\u6bd4\u5982\u5c060x123\u6539\u62100x321\uff0c\u540c\u65f6\u6211\u4eec\u5c06\u7a97\u53e3\u7a0d\u5fae\u6392\u5e03\u4e00\u4e0b\uff0c\u65b0\u5efa\u4e00\u4e2a\u9875\u9762\uff0c\u5c06\u5176\u4e2d\u7684\u4e00\u4e2a\u5230\u4e24\u4e2a\u7a97\u53e3\u62c9\u51fa\u6765\uff0c\u4fdd\u5b58\u5de5\u7a0b\uff0c\u5173\u95edTSMaster\uff0c\u518d\u6253\u5f00TSMaster\uff0c\u9009\u62e9\u4e0a\u4e00\u6b21\u7684\u5de5\u7a0b\uff0c\u6253\u5f00\u4e4b\u540e\u5c31\u53ef\u4ee5\u770b\u5230\u5de5\u5177\u7bb1\u7684\u7a97\u53e3\uff0c\u5e03\u5c40\u4f9d\u7136\u662f\u4e0a\u4e00\u6b21\u5173\u95ed\u4e4b\u524d\u7684\u72b6\u6001\u3002\u4f8b\u5982\u5de6\u8fb9\u8fd9\u4e2a\u7a97\u53e3\u7684ID\u662f0x321\u662f\u6211\u4eec\u6539\u8fc7\u7684\uff0c\u53f3\u8fb9\u8fd9\u4e2a\u7a97\u53e3\u662f\u9ed8\u8ba4\u76840x123\uff0c\u8fd9\u5c31\u662f\u5de5\u5177\u7bb1\u7684\u6301\u4e45\u5316\u529f\u80fd\u3002<\/p><\/section>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t \u5728\u5f00\u53d1\u73af\u5883\u4e2d\uff0c\u9009\u62e9\u4e00\u4e2a\u5de5\u5177\u7bb1\uff0c\u53cc\u51fb\u5bf9\u5e94\u7684\u884c\uff0c\u5c31\u53ef\u4ee5\u6765\u5230\u4ee3\u7801\u7f16\u8f91\u7684\u7a97\u53e3\uff0c\u8be5\u5de5\u5177\u7bb1\u7684\u6240\u6709\u7684\u53ef\u89c6\u7684\u5143\u7d20\u548c\u80cc\u540e\u8fd0\u884c\u7684\u6240\u6709\u903b\u8f91\uff0c\u90fd\u5728\u8fd9\u4e00\u4efdPython\u4ee3\u7801\u91cc\u9762\u3002\u5982\u679c\u60f3\u7528\u7cfb\u7edf\u5173\u8054\u7684Python\u6587\u4ef6\u7f16\u8f91\u5668\u6765\u6253\u5f00\u8fd9\u4e2aPython\u6587\u4ef6\uff0c\u53ea\u9700\u8981\u70b9\u51fb\u5de5\u5177\u680f\u4e0a\u7684\u7f16\u8f91\u6309\u94ae\u3002<\/p><\/section>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t \u4f8b\u5982\uff0c\u672c\u673a\u4e0a\u662f\u7528Visual Studio Code\u6765\u5173\u8054Python\u6587\u4ef6\uff0c\u90a3\u4e48\u6253\u5f00\u7684\u5c31\u662fVisual Studio Code\uff0c\u521d\u6b21\u6253\u5f00\u4e4b\u540e\u662f\u9700\u8981\u5b89\u88c5Python\u7684\u652f\u6301\u5305\u3002\u5728VS code\u91cc\u9762\uff0c\u53ef\u4ee5\u5728\u8fd9\u91cc\u70b9\u51fb\u641c\u7d22Python\uff0c\u4f1a\u770b\u5230\u5fae\u8f6f\u53d1\u5e03\u7684Python\u652f\u6301\u5305\uff0c\u70b9\u51fb\u5b89\u88c5\u3002\u5b89\u88c5\u4ee5\u540e\u5c31\u53ef\u4ee5\u5f88\u8f7b\u677e\u7684\u4fee\u6539\u548c\u7ba1\u7406\u4ee3\u7801\u3002<\/p><\/section>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t \u5b89\u88c5\u5b8c\u6210\u4ee5\u540e\u5173\u95ed\u6269\u5c55\u7684\u754c\u9762\uff0c\u8f6c\u5230\u6211\u4eec\u73b0\u5728\u7684Python\u7684\u73af\u5883\u4e2d\uff0c\u9ed8\u8ba4\u7684Python\u73af\u5883\u4f1a\u9009\u53d6\u7535\u8111\u4e0a\u5df2\u7ecf\u88c5\u8fc7\u7684Python\u8def\u5f84\u3002\u8fd9\u4e2a\u8def\u5f84\u53ef\u80fd\u5e76\u4e0d\u5305\u542b\u6211\u4eec\u7684TSMaster\u7684\u5f15\u64ce\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u5207\u6362Python\u73af\u5883\u3002\u5982\u679c\u6ca1\u6709TSMaster\u7684package\uff0c\u8bed\u6cd5\u63d0\u793a\u5c31\u4f1a\u51fa\u73b0\u5f88\u591a\u9519\u8bef\uff0c\u90a3\u4e48\u6211\u4eec\u5c31\u9700\u8981\u5207\u6362\u5230\u9ed8\u8ba4\u7684Python\u7248\u672c\u4e3aTSMaster\u5b89\u88c5\u76ee\u5f55\u4e0b\u7684Python\uff0c\u5f53\u524d\u7684Python\u73af\u5883\u5df2\u7ecf\u5177\u5907\u8bed\u6cd5\u63d0\u793a\u7684\u529f\u80fd\u3002<\/p><\/section>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t \u6309Ctrl+k+0\uff0c\u628a\u4ee3\u7801\u6298\u53e0\uff0c\u6211\u4eec\u5927\u81f4\u770b\u4e00\u4e0b\u4ee3\u7801\uff0c\u8be5\u6587\u4ef6\u53ea\u6709\u4e09\u90e8\u5206\u5185\u5bb9\uff0c\u7b2c\u4e00\u4e2a\u662f\u5bfc\u5165-import TSMaster\uff0c\u662fTSMaster\u652f\u6301\u5305\u4e2d\u7684\u7c7b\u578b\u4fe1\u606f\uff1b\u7b2c\u4e8c\u4e2a\u662f\u5b9a\u4e49\u7a97\u4f53\u7c7b\uff0c\u5b83\u7ee7\u627f\u4e8eTSMaster\u5185\u90e8\u7684TSForm\uff1b\u7b2c\u4e09\u4e2a\u662fmain\u51fd\u6570\uff0c\u7528\u4e8e\u521b\u5efa\u548c\u542f\u52a8\u8131\u79bbTSMaster\u7684\u72ec\u7acb\u7684\u7a0b\u5e8f\u3002\u63a5\u4e0b\u6765\u6211\u4eec\u91cd\u70b9\u4ecb\u7ecd\u4e00\u4e0b\u7b2c\u4e8c\u90e8\u5206\u7a97\u4f53\u7c7b\u4ee3\u7801\u3002<\/p><\/section> \u4e3b\u8981\u5206\u4e24\u5757\u5185\u5bb9\uff0c\u7b2c\u4e00\u5757\u662finit\u51fd\u6570\uff0c\u7b2c\u4e8c\u5757\u662f\u7528\u6237\u5b9a\u4e49\u7684\u5404\u79cd\u5404\u6837\u7684\u51fd\u6570\u3002\u6211\u4eec\u628ainit\u51fd\u6570\u5c55\u5f00\uff0c\u4f1a\u53d1\u73b0\u5185\u90e8\u6709\u5927\u91cf\u7684\u754c\u9762\u76f8\u5173\u7684\u4ee3\u7801\u3002\u4f8b\u5982\uff0cDLC\u7684Label\u6846\uff0c\u8f6c\u5230TSMaster\u4e2d\uff0c\u518d\u627e\u5230VS code\u5bf9\u5e94\u7684\u4ee3\u7801\u521b\u5efa\u4ee3\u7801\uff0c\u5b83\u8bbe\u5b9a\u4e86\u8fd9\u4e2aLabel\u6846\u7684\u4f4d\u7f6e\u5c31\u662fLeft Top Width Height\u5c5e\u6027\u4ee5\u53ca\u5b83\u7684caption\u5c5e\u6027\uff0c\u8fd9\u4e9b\u4ee3\u7801\u7528\u6237\u53ef\u4ee5\u624b\u5199\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7TSMaster\u63d0\u4f9b\u7684\u7a97\u4f53\u8bbe\u8ba1\u5de5\u5177\u6765\u81ea\u52a8\u751f\u6210\u3002<\/p> \u6211\u4eec\u5c06\u6eda\u52a8\u6761\u4e0b\u62c9\uff0c\u6765\u5230init\u51fd\u6570\u7684\u4e0b\u534a\u90e8\u5206\uff0c\u5c31\u662f\u5728Auto Generated Python Code\u4e0b\u65b9\uff0c\u662f\u7528\u6237\u521d\u59cb\u5316\u4ee3\u7801\u5b58\u653e\u7684\u5730\u65b9\u3002\u6211\u4eec\u53ef\u4ee5\u5728\u4e0a\u9762\u7a7a\u95f4\u521b\u5efa\u548c\u8bbe\u7f6e\uff0c\u8fdb\u4e00\u6b65\u8bbe\u5b9a\u7a7a\u95f4\u7684\u884c\u4e3a\u3002\u4f8b\u5982\u8fd9\u884c\uff0c247\u884c\u521b\u5efa\u5de5\u5177\u680f\u7684\u6309\u94ae\u7528\u4e8e\u8fde\u63a5application\uff0c\u8fd9\u4e2a\u6309\u94ae\u521b\u5efa\u4e4b\u540e\uff0c\u6211\u4eec\u518d\u5c06\u5b83\u7684OnClick\u4e8b\u4ef6\u5173\u8054\u5230\u6211\u4eec\u672c\u5730\u7684\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\u53ebOnConnectClick\uff0c\u7136\u540e\u8df3\u8f6c\u5230\u8fd9\u4e2a\u51fd\u6570\u5c55\u5f00\uff0c\u5b83\u7684\u6267\u884c\u903b\u8f91\u5c31\u662f\uff0c\u9996\u5148\u4ee3\u7528TSMaster\u7684API\uff0c\u4e5f\u5c31\u662f\u6211\u4eec\u5c0f\u7a0b\u5e8f\u719f\u77e5\u7684app.connect\u6765\u8fde\u63a5application\uff0c\u5982\u679c\u8fde\u63a5\u6210\u529f\uff0c\u90a3\u5c31\u662f\u8fd4\u56de\u503c\u4e3a0\u3002<\/p><\/section>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t \u6211\u4eec\u53ef\u4ee5\u56de\u5230TSMaster\u8f6f\u4ef6\u4e2d\u6765\u9a8c\u8bc1\u4e00\u4e0b\uff0c\u627e\u4e00\u4e2a\u7a97\u53e3\uff0c\u5355\u51fb\u5de5\u5177\u680f\u4e0a\u7684\u8fde\u63a5\u6309\u94ae\uff0c\u4f1a\u770b\u5230\u8fde\u63a5\u6210\u529f\u7684\u63d0\u793a\u3002\u6240\u6709\u7684toolbox\u7684\u7a97\u4f53\u7684\u8fde\u63a5\u6309\u94ae\u90fd\u53d8\u6210\u4e86\u7070\u8272\u7684\u72b6\u6001\uff0c\u540c\u65f6\u65ad\u5f00\u8fde\u63a5\u7684\u6309\u94ae\u5448\u73b0\u6fc0\u6d3b\u72b6\u6001\uff0c\u8fd9\u5c31\u662fTSMaster\u4e8b\u4ef6\u56de\u8c03\u51fd\u6570\u8d77\u7684\u4f5c\u7528\u3002<\/p><\/section>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t \u56de\u5230\u4ee3\u7801\uff0c\u627e\u4e00\u4e0bOnMeasurementStart\u51fd\u6570\uff0c\u8fd9\u4e2a\u51fd\u6570\u8c03\u7528\u4e86\u4e00\u4e2a\u5b50\u51fd\u6570\u6765\u8bbe\u7f6e\u6309\u94ae\u7684\u72b6\u6001\uff0c\u6309\u4f4fCtrl\u8fdb\u5165\u8fd9\u4e2a\u51fd\u6570\uff0c\u5c55\u5f00\u770b\u4e00\u4e0b\uff0c\u90a3\u4e48\u8fd9\u4e2a\u51fd\u6570\u7684\u903b\u8f91\u5c31\u662f\uff0c\u5982\u679c\u8fde\u63a5\u6210\u529f\uff0c\u5219\u8fde\u63a5\u6309\u94ae\u53d8\u7070\uff0c\u65ad\u5f00\u6309\u94ae\u6fc0\u6d3b\uff0c\u540c\u65f6\uff0c\u5728\u7a97\u4f53\u7684\u72b6\u6001\u680f\u6253\u5370\u5e94\u7528\u7a0b\u5e8f\u5df2\u8fde\u63a5\u3002\u5426\u5219\u8bf4\u660e\u8fde\u63a5\u5df2\u65ad\u5f00\u3002\u6240\u4ee5\u6bcf\u5f53\u6211\u4eec\u70b9\u51fb\u8fde\u63a5\u7684\u65f6\u5019\uff0c\u4f1a\u663e\u793aMeasurement started\uff0c\u70b9\u51fb\u65ad\u5f00\u7684\u65f6\u5019\u4f1a\u663e\u793aMeasurement stopped\u3002<\/p> \u81f3\u4e8e\u70b9\u51fb\u56de\u8c03\u51fd\u6570\u7684\u613f\u610f\uff0c\u56e0\u4e3a\u5728\u7a97\u4f53\u4e0a\u6709\u4e00\u4e2aMeasurement start\u56de\u8c03\u51fd\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u5bf9\u5b83\u8fdb\u884c\u8d4b\u503c\uff0c\u5c31\u662f\u8fd9\u884c\u53ebself.OnMeasurementStarted Event\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u5b83\u8d4b\u503c\u4e3a\u6211\u4eec\u5185\u90e8\u7684OnMeasurementStart\u8fd9\u4e2a\u56de\u8c03\u51fd\u6570\u3002\u8fd9\u6837\uff0c\u6bcf\u5f53TSMaster\u6210\u529f\u542f\u52a8\u8fde\u63a5\uff0c\u5c31\u53ef\u4ee5\u5728\u4efb\u4f55\u5730\u65b9\u542f\u52a8\u8fde\u63a5\u3002<\/p><\/section><\/section> \u6211\u4eec\u70b9\u51fbTSMaster\u542f\u52a8\u8fde\u63a5\uff0c\u53ef\u4ee5\u770b\u5230\u5de5\u5177\u680f\u4e0a\u7684\u6309\u94ae\u7684\u72b6\u6001\u90fd\u540c\u6b65\u53d1\u751f\u4e86\u53d8\u5316\uff0c\u4e4b\u524d\u770b\u5230\u7684Raw_CAN_Transmit\u8fd9\u4e2a\u7a97\u53e3\u662f\u4e00\u4e2a\u5b8c\u6574\u7684demo\uff0c\u5b83\u5b9e\u73b0\u4e86\u4e00\u4e2a\u539f\u59cb\u7684CAN\u62a5\u6587\u7684\u53d1\u9001\u903b\u8f91\uff0c\u5c31\u662f\u70b9\u51fb\u6309\u94ae\u53d1\u9001\uff0c\u6216\u8005\u662f\u5b9a\u65f6\u5668\u53d1\u9001\uff0c\u6216\u8005\u662f\u6536\u5230\u7279\u5b9a\u7684\u62a5\u6587\u4e4b\u540e\u89e6\u53d1\u53d1\u9001\u3002TSMaster\u5de5\u5177\u7bb1\u96c6\u6210\u5f00\u53d1\u73af\u5883\u7cfb\u5217\u540e\u7eed\u8fd8\u4f1a\u66f4\u65b0\u65b0\u529f\u80fd\uff0c\u656c\u8bf7\u671f\u5f85…<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\u4e00\u3001\u5de5\u5177\u7bb1\u7684\u6301\u4e45\u5316\u529f\u80fd<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
The persistence function of the toolkit<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\u4e8c\u3001Python\u7684\u8bed\u6cd5\u63d0\u793a\u529f\u80fd<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
Python syntax prompt<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
\u4e09\u3001\u7a97\u4f53\u7c7b\u4ee3\u7801<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
Form class code<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t