bool InitializeFlowInterface(Controller *me)
{
	RegistrationData regData;

	GetConfigData(&regData);

	if (InitialiseLibFlowMessaging((const char *)regData.url, (const char *)regData.key,(const char *)regData.secret))
	{
		if (RegisterDevice(regData.deviceType,
						regData.deviceMACAddress,
						regData.deviceSerialNumber,
						DEVICE_SOFTWARE_VERSION,
						regData.deviceName,
						regData.devRegKey))
		{
			if (GetUserId(me->userId))
			{
				GetDeviceId(SENSOR_DEVICE_TYPE, me->userId, &me->sensorConfig.sensorId);
				GetDeviceId(ACTUATOR_DEVICE_TYPE, me->userId, &me->actuatorConfig.actuatorId);
				printf("Flow Interface initialized successfully\n");
				return true;
			}
		}
	}

	printf("Flow Interface initialization failed\n");
	return false;
}
Exemple #2
0
/**
 *  List all supported hardware devices 
 */
MODULE_API void InitializeModuleData()
{
 #ifdef _DEBUG_
 RegisterDevice(g_TestControl, MM::GenericDevice, "Okolab Test Control");
 #endif
 RegisterDevice(g_OCSControl, MM::GenericDevice, "Okolab OKO Control Server");
 RegisterDevice(g_CO2BLControl, MM::GenericDevice, "Okolab CO2 Unit-BL");
 RegisterDevice(g_O2BLControl, MM::GenericDevice, "Okolab O2 Unit-BL");
 RegisterDevice(g_H201BLControl, MM::GenericDevice, "Okolab H201 T Unit-BL");
 RegisterDevice(g_CO2O2BLControl, MM::GenericDevice, "Okolab CO2-O2 Unit-BL [0-10;1-18]");
 RegisterDevice(g_CO2O2BL13Control, MM::GenericDevice, "Okolab CO2-O2 Unit-BL [0-20;1-95]");
 RegisterDevice(g_H301BLControl, MM::GenericDevice, "Okolab H301 T Unit-BL");
 RegisterDevice(g_HmdControl, MM::GenericDevice, "Okolab H301-HM-ACTIVE");
 SockSetup();
}
Exemple #3
0
	THREAD(TimeSyncThread, arg)
	{
		
		puts("\ntime started\n");
		RegisterDevice();
		puts("shit registered\n");
		for (;;) {
			RetrieveTime();
			PrintTime();
			NutSleep(10000);
		}
	}
MODULE_API void InitializeModuleData()
{
	RegisterDevice(g_StageDeviceName, MM::StageDevice, "Z positioning");
	RegisterDevice(g_XYStageDeviceName, MM::XYStageDevice, "XY positioning");
}
Exemple #5
0
MODULE_API void InitializeModuleData()
{
   RegisterDevice( sc_pszCameraDeviceName, MM::CameraDevice, "Stanford Photonics cameras" );
}
Exemple #6
0
/*---------------------------------------------------------------------------
 Initialize module data. It publishes the Mightex Sirius SLC series names to Manager.
---------------------------------------------------------------------------*/
MODULE_API void InitializeModuleData()
{
	RegisterDevice(g_DeviceSiriusSLCUSBName, MM::ShutterDevice, "Mightex Sirius SLC LED Driver(USB)");
//	RegisterDevice(g_DeviceSiriusSLCRS232Name, MM::ShutterDevice, "Mightex Sirius SLC LED Driver(RS-232)");
}
///////////////////////////////////////////////////////////////////////////////
// Exported MMDevice API
///////////////////////////////////////////////////////////////////////////////
MODULE_API void InitializeModuleData()
{
   RegisterDevice(g_DeviceNameArduinoNeoPixelHub, MM::HubDevice, "Hub (required)");
   RegisterDevice(g_DeviceNameArduinoNeoPixelShutter, MM::ShutterDevice, "Shutter");
}
Exemple #8
0
///////////////////////////////////////////////////////////////////////////////
// Exported MMDevice API
///////////////////////////////////////////////////////////////////////////////
MODULE_API void InitializeModuleData()
{
   RegisterDevice(g_RappScannerName, MM::GalvoDevice, "Rapp UGA-40 Scanner");
}
Exemple #9
0
MODULE_API void InitializeModuleData()
{
   RegisterDevice( g_StageName, MM::XYStageDevice, "LStepOld XY Stage" );
}
Exemple #10
0
/**
 * List all supported hardware devices here
 */
MODULE_API void InitializeModuleData()
{
    RegisterDevice(g_CameraName, MM::CameraDevice, "Motic Camera Adapter");
}
Exemple #11
0
PUBLIC( char *, RegisterRoutines )( void )
{
   myTypeID = RegisterDevice( "capture", "Video capture device.", CreateVideoCapture );
	return DekVersion;
}
Exemple #12
0
///////////////////////////////////////////////////////////////////////////////
// Exported MMDevice API
///////////////////////////////////////////////////////////////////////////////
MODULE_API void InitializeModuleData()
{
   RegisterDevice(g_FocalPointDeviceName, MM::AutoFocusDevice, "FocalPoint");
}
MODULE_API void InitializeModuleData()
{
   RegisterDevice(g_CameraDeviceName, MM::CameraDevice, "Canon SLR");
}
PLUGIN_EXPORT void ExecuteBang(void* data, LPCWSTR args)
{
	std::wstring wholeBang = args;

	size_t pos = wholeBang.find(' ');
	if (pos != -1)
	{
		std::wstring bang = wholeBang.substr(0, pos);
		wholeBang.erase(0, pos + 1);

		if (_wcsicmp(bang.c_str(), L"SetOutputIndex") == 0)
		{
			// Parse parameters
			int index = 0;
			if (1 == swscanf_s(wholeBang.c_str(), L"%d", &index))
			{
				if (endpointIDs.size() <= 0)
				{
					RmLog(LOG_WARNING, L"Win7AudioPlugin.dll: No device found");
					return;
				}
				// set to endpoint [index-1]
				if (index <= 0) index = 1;
				else if (index > (int)endpointIDs.size()) index = (int)endpointIDs.size();
				RegisterDevice(endpointIDs[index - 1].c_str());
			}
			else
			{
				RmLog(LOG_WARNING, L"Win7AudioPlugin.dll: Incorrect number of arguments for bang");
			}
		}
		else if (_wcsicmp(bang.c_str(), L"SetVolume") == 0)
		{
			// Parse parameters
			int volume = 0;
			if (1 == swscanf_s(wholeBang.c_str(), L"%d", &volume))
			{
				if (!SetWin7Volume(volume < 0 ? 0 : (volume > 100 ? 100 : (UINT)volume)))
				{
					RmLog(LOG_ERROR, L"Win7AudioPlugin.dll: Error setting volume");
				}
			}
			else
			{
				RmLog(LOG_WARNING, L"Win7AudioPlugin.dll: Incorrect number of arguments for bang");
			}
		}
		else if (_wcsicmp(bang.c_str(), L"ChangeVolume") == 0)
		{
			// Parse parameters
			int offset = 0;
			if (1 == swscanf_s(wholeBang.c_str(), L"%d", &offset) && offset)
			{
				if (!SetWin7Volume(0, offset))
				{
					RmLog(LOG_ERROR, L"Win7AudioPlugin.dll: Error changing volume");
				}
			}
			else
			{
				RmLog(LOG_WARNING, L"Win7AudioPlugin.dll: Incorrect number of arguments for bang");
			}
		}
		else
		{
			RmLog(LOG_WARNING, L"Win7AudioPlugin.dll: Unknown bang");
		}

	}
	else if (_wcsicmp(wholeBang.c_str(), L"ToggleNext") == 0)
	{
		//RmLog(LOG_NOTICE, L"Win7AudioPlugin.dll: Next device.");
		const UINT i = GetIndex();
		if (i) RegisterDevice(endpointIDs[(i == endpointIDs.size()) ? 0 : i].c_str());
		else RmLog(LOG_ERROR, L"Win7AudioPlugin.dll: Update error");
	}
	else if (_wcsicmp(wholeBang.c_str(), L"TogglePrevious") == 0)
	{
		const UINT i = GetIndex();
		if (i) RegisterDevice(endpointIDs[(i == 1) ? endpointIDs.size() - 1 : i - 2].c_str());
		else RmLog(LOG_ERROR, L"Win7AudioPlugin.dll: Update error");
	}
	else if (_wcsicmp(wholeBang.c_str(), L"ToggleMute") == 0)
	{
		GetWin7AudioState(TOGGLE_MUTE);
	}
	else if (_wcsicmp(wholeBang.c_str(), L"Mute") == 0)
	{
		if (!is_mute)
		{
			GetWin7AudioState(TOGGLE_MUTE);
		}
	}
	else if (_wcsicmp(wholeBang.c_str(), L"Unmute") == 0)
	{
		if (is_mute)
		{
			GetWin7AudioState(TOGGLE_MUTE);
		}
	}
	else
	{
		RmLog(LOG_WARNING, L"Win7AudioPlugin.dll: Unknown bang");
	}
}
Exemple #15
0
MODULE_API void InitializeModuleData()
{
   RegisterDevice(g_DeviceName_Hub, MM::HubDevice, "VT-iSIM system");
}
////////////////////////////////
// Exported MMDevice API
////////////////////////////////
MODULE_API void InitializeModuleData()
{
   RegisterDevice(g_DeviceNameLMM5Hub, MM::GenericDevice, "LMM5 Hub");
   RegisterDevice(g_DeviceNameLMM5Shutter, MM::ShutterDevice, "LMM5 Shutter");
}
Exemple #17
0
PUBLIC( TEXTCHAR *, RegisterRoutines )( void )
{                           
   myTypeID = RegisterDevice( WIDE("command"), WIDE("Performs command processing burst, history..."), Open );
   return DekVersion;
}
void AddAvailableDeviceName(const char* name, const char* descr)
{
   RegisterDevice(name, MM::UnknownType, descr);
}
Exemple #19
0
///////////////////////////////////////////////////////////////////////////////
// Exported MMDevice API
///////////////////////////////////////////////////////////////////////////////
MODULE_API void InitializeModuleData()
{
   RegisterDevice(g_ZStageDeviceName, MM::StageDevice, "Z Stage");
   RegisterDevice(g_XYStageDeviceName, MM::XYStageDevice, "XY Stage");
}
Exemple #20
0
///////////////////////////////////////////////////////////////////////////////
// Exported MMDevice API
///////////////////////////////////////////////////////////////////////////////
MODULE_API void InitializeModuleData()
{
	RegisterDevice(g_ControllerName, MM::ShutterDevice, "pE300 LED illuminator");
}
Exemple #21
0
PUBLIC( TEXTCHAR *, RegisterRoutines )( void )
{                           
   myTypeID = RegisterDevice( WIDE("gather"), WIDE("Gathers lines command collection w/history..."), Open );
   return DekVersion;
}
Exemple #22
0
//Required Micro-Manager API Functions&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
MODULE_API void InitializeModuleData()
{
   RegisterDevice(DEVICE_NAME, MM::ShutterDevice, "VLTStradus");
}
Exemple #23
0
///////////////////////////////////////////////////////////////////////////////
// Exported MMDevice API
///////////////////////////////////////////////////////////////////////////////
MODULE_API void InitializeModuleData()
{
   RegisterDevice(g_GenericSLMName, MM::SLMDevice, "Spatial Light Modulator controlled through computer graphics output");
}