From c4811dd1b73b37b0916803097237acd31f1df98b Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Tue, 7 Jan 2020 15:50:56 -0600 Subject: Refactored accessory cards classes with inheritence, fixed Makefile clean, moved some helper functions to header utility --- src/AccessoryCards/Mfser.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/AccessoryCards/Mfser.cpp (limited to 'src/AccessoryCards/Mfser.cpp') diff --git a/src/AccessoryCards/Mfser.cpp b/src/AccessoryCards/Mfser.cpp new file mode 100644 index 0000000..ac6bb26 --- /dev/null +++ b/src/AccessoryCards/Mfser.cpp @@ -0,0 +1,29 @@ +/********************************************************************** +* COPYRIGHT 2020 MULTI-TECH SYSTEMS, INC. +* +* ALL RIGHTS RESERVED BY AND FOR THE EXCLUSIVE BENEFIT OF +* MULTI-TECH SYSTEMS, INC. +* +* MULTI-TECH SYSTEMS, INC. - CONFIDENTIAL AND PROPRIETARY +* INFORMATION AND/OR TRADE SECRET. +* +* NOTICE: ALL CODE, PROGRAM, INFORMATION, SCRIPT, INSTRUCTION, +* DATA, AND COMMENT HEREIN IS AND SHALL REMAIN THE CONFIDENTIAL +* INFORMATION AND PROPERTY OF MULTI-TECH SYSTEMS, INC. +* USE AND DISCLOSURE THEREOF, EXCEPT AS STRICTLY AUTHORIZED IN A +* WRITTEN AGREEMENT SIGNED BY MULTI-TECH SYSTEMS, INC. IS PROHIBITED. +* +***********************************************************************/ + +#include "Device.h" + +Device::Mfser::Mfser(Device& d, const std::string port) : AccessoryCard(d) { + capabilityList["rs232"] = true; + capabilityList["rs422"] = true; + capabilityList["rs485"] = true; + capabilityList["serial"] = true; + if (!fileExists("/dev/ext_serial") && port.size() > 0) { + std::string temp; + MTS::System::cmd(std::string("ln -s /dev/ttyAP") + port.back() + " /dev/ext_serial", temp); + } +} \ No newline at end of file -- cgit v1.2.3