X2 Standard  Version 1.24
How to Write a TheSkyX Driver

The X2Camera example source code provides a good pattern to follow to create a TheSkyX camera driver.

The following steps are specific for the creation of a camera driver, but the same steps are involved in making any X2 driver.

  1. Obtain TheSkyX version 10.1.9 or later.
  2. Tell TheSkyX A) how to display your camera to the user for selection and B) the name of the file that is your plug in binary by making your own company specific list of camera hardware.
    1. Make a copy of "cameralist.txt" distributed by TheSkyX and name it "cameralist My Company.txt" where 'My Company' is your company name. The files goes in the same folder as cameralist.txt.
    2. Edit "cameralist My Company.txt" remove all lines except one and by following the existing format, enter your specific camera information and the name of your plug in binary is "My Company Plug In File Name", for example:
      1. "2|My Company|My Company Hardware Model|Comment| |My Company Plug In File Name|x2 developer string||||"
      2. See the header of the file "hardwarelist.txt" distributed by TheSkyX for more details on this file format.
  3. Compile the X2Camera sample unmodified, and place the binary into the TheSkyX/Resources/Common/PlugIns/CameraPlugIns folder. Start TheSkyX, go to Telescope, Setup and in the Imaging System Setup tree select Cameras, select the X2Camera and choose Connect. The X2 plug in dll CCEstablishLink will be called.
  4. Implement the X2Camera with device dependent io calls. See the X2Camera source for more details on function calls. Use conditional compilation for OS specific io calls or branch in main.cpp with two entirely different X2Camera implementations depending upon OS.

To avoid a myriad of support issues, please statically link all external libraries used by the X2 plug in, such as libusb.

TheSky64 - TheSky Windows 64 Bit X2 Drivers

In early 2021, TheSky on Windows became available as 64 bit. The following section applies to Windows only, when creating a 64 bit x2 driver. All other supported operating systems are/were already 64 bit, and do not have the consideration of creating/distributing 32 and or 64 bit drivers. A 64 bit x2 driver is identical to the above procedure, except for the following differences:

  1. When compiling, build the binary for 64 bit.
  2. The hardware list file must be differentiated with a "64". Following the above example, "cameralist64 My Company.txt" (note the "64").
  3. The binary must be placed int the "TheSkyX/Resources/Common/PlugIns64/CameraPlugIns" folder (note the "64").

In short, a 64 bit X2 driver is built for 64 bit, has a 64 bit specific hardwarelist.txt file, and is placed in a 64-bit specific folder. This way 32-bit drivers and 64-bit drivers are completely independent of one another. This convention also means a 64-bit X2 driver binary can have the same name as a 32-bit build, but for clarity, we encourge 64-bit drivers, especially those that distribute both 32 and 64, to have a different name for 64 bit (append "64" to the binary name before the extenstion suffix, like "x2camera64.dll"). A standard TheSky installation on Windows has several good examples of 64 bit X2 drivers that can be examined and followed.

X2 Examples
(C) Software Bisque, Inc. All rights reserved.