*.tko file inside duet modules
tombadger
Member
Hi,
I have looked into / decompiled several duet modules and each of them contains Netlinx *.tko file.
What is the role of this file ?
I have looked into / decompiled several duet modules and each of them contains Netlinx *.tko file.
What is the role of this file ?
Comments
-
Judging from your question I'm guessing you've not done any Netlinx programming or worked with the hardware. The Netlinx .tko is compiled code that runs on a Netlinx master. It's the code running at run time which is generated by Netlinx Studio and uploaded by the programmer. "Currently" we do not have access to truly native Java as a main programming environment. It has been rumoured that at some point we will but until then you still need to have at least some Netlinx code which declares a Duet Module and a virtual device to attach to it.
Decompiling is frwoned upon, just so you know. -
ericmedley wrote: »Judging from your question I'm guessing you've not done any Netlinx programming or worked with the hardware. The Netlinx .tko is compiled code that runs on a Netlinx master. It's the code running at run time which is generated by Netlinx Studio and uploaded by the programmer. "Currently" we do not have access to truly native Java as a main programming environment. It has been rumoured that at some point we will but until then you still need to have at least some Netlinx code which declares a Duet Module and a virtual device to attach to it.
Decompiling is frwoned upon, just so you know.
I'm Netlinx programmer and I know what it *.tko file, but was surprised to find it within duet modules.
So you are saying those *.tko files just contains DEFINE_DEVICE and DEFINE_MODULE sections ?
Opening *.jar files is supported either in Eclipse or IDEA.
Since code is not scrambled or obfuscated, it's nice to see how everything is working under the hood.
BTW, NetLinxPracticalExamEmulator.jar is fun to look in
-
I'm Netlinx programmer and I know what it *.tko file, but was surprised to find it within duet modules.
So you are saying those *.tko files just contains DEFINE_DEVICE and DEFINE_MODULE sections ?
Opening *.jar files is supported either in Eclipse or IDEA.
Since code is not scrambled or obfuscated, it's nice to see how everything is working under the hood.
BTW, NetLinxPracticalExamEmulator.jar is fun to look in
The TKO file inside a duet module is the NetLinx stub code for loading the Duet Module. The Runtime engine extracts it from the .jar file and runs that code.
The NetLinx stub code does not really change much, just the propeties array.MODULE_NAME='TestDuetModule_dr1_0_0' (DEV dvDuetDevice, DEV dvPhysicalDevice) (*{{PS_SOURCE_INFO(PROGRAM STATS) *) (***********************************************************) (* ORPHAN_FILE_PLATFORM: 1 *) (***********************************************************) (*}}PS_SOURCE_INFO *) (***********************************************************) (***********************************************************) (* VARIABLE DEFINITIONS GO BELOW *) (***********************************************************) DEFINE_VARIABLE // Setup Duet Module properties CHAR DUET_PROPERTIES[9][47] = { 'Physical-Device', 'Duet-Device', 'Duet-Module=TestDuetModule_dr1_0_0', 'Bundle-Version=1.0.0', 'Device-Category=other', 'Device-Make=Test', 'Device-Model=DuetModule', 'Device-SDKClass=com.amx.duet.devicesdk.Utility', 'Device-Revision=1.0.0' } (***********************************************************) (* STARTUP CODE GOES BELOW *) (***********************************************************) DEFINE_START // Load up device numbers as strings DUET_PROPERTIES[1] = "'Physical-Device=',FORMAT('%d:',dvPhysicalDevice.NUMBER),FORMAT('%d:',dvPhysicalDevice.PORT),FORMAT('%d',dvPhysicalDevice.SYSTEM)"; DUET_PROPERTIES[2] = "'Duet-Device=',FORMAT('%d:',dvDuetDevice.NUMBER),FORMAT('%d:',dvDuetDevice.PORT),FORMAT('%d',dvDuetDevice.SYSTEM)"; // Load Duet Module LOAD_DUET_MODULE(DUET_PROPERTIES) (***********************************************************) (* END OF PROGRAM *) (* DO NOT PUT ANY CODE BELOW THIS COMMENT *) (***********************************************************) -
The TKO file inside a duet module is the NetLinx stub code for loading the Duet Module. The Runtime engine extracts it from the .jar file and runs that code.
The NetLinx stub code does not really change much, just the propeties array.
Thank you for explanation. Could you send me blank utility duet module compiled and packed to *.jar ?
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums