Removed old interfaces and replaced them with the new ones.

Signed-off-by: Serban Waltter <serban.waltter@rinftech.com>
This commit is contained in:
Serban Waltter 2018-09-27 17:33:40 +03:00
parent fae1da6c6f
commit 5f9bebad14
139 changed files with 396 additions and 832 deletions

View File

@ -4,9 +4,9 @@ file (GLOB example_src_list RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cxx")
# - Handle special cases here -------------------------------------------------- # - Handle special cases here --------------------------------------------------
# Test temperature interface for 2 sensor libraries # Test temperature interface for 2 sensor libraries
add_example(iTemperature_sample.cxx TARGETS new_interfaces lm35 abp) add_example(iTemperature_sample.cxx TARGETS interfaces lm35 abp)
# Test light interface for 3 sensor libraries # Test light interface for 3 sensor libraries
add_example(iLight_sample.cxx TARGETS new_interfaces apds9002 bh1750 max44009) add_example(iLight_sample.cxx TARGETS interfaces apds9002 bh1750 max44009)
# - Create an executable for all other src files in this directory ------------- # - Create an executable for all other src files in this directory -------------
foreach (_example_src ${example_src_list}) foreach (_example_src ${example_src_list})

View File

@ -27,7 +27,6 @@
#include <stddef.h> #include <stddef.h>
#include "ads1015.hpp" #include "ads1015.hpp"
#include "iADC.hpp"
#include "mraa/gpio.hpp" #include "mraa/gpio.hpp"
#include "upm_utilities.h" #include "upm_utilities.h"
@ -39,24 +38,21 @@ int
main() main()
{ {
/* Create an instance of the ADS1015 sensor */ /* Create an instance of the ADS1015 sensor */
upm::ADS1015 sensor(EDISON_I2C_BUS); upm::ADS1015 adc(EDISON_I2C_BUS);
mraa::Gpio gpio(EDISON_GPIO_SI7005_CS); mraa::Gpio gpio(EDISON_GPIO_SI7005_CS);
gpio.dir(mraa::DIR_OUT_HIGH); gpio.dir(mraa::DIR_OUT_HIGH);
/* Show usage from the IADC interface */ // if (adc == NULL) {
upm::IADC* adc = static_cast<upm::IADC*>(&sensor); // std::cout << "ADC not detected" << std::endl;
// return 1;
if (adc == NULL) { // }
std::cout << "ADC not detected" << std::endl; std::cout << "ADC " << adc.getModuleName() << " detected. ";
return 1; std::cout << adc.getNumInputs() << " inputs available" << std::endl;
}
std::cout << "ADC " << adc->getModuleName() << " detected. ";
std::cout << adc->getNumInputs() << " inputs available" << std::endl;
while (true) { while (true) {
for (unsigned int i = 0; i < adc->getNumInputs(); ++i) { for (unsigned int i = 0; i < adc.getNumInputs(); ++i) {
std::cout << "Input " << i; std::cout << "Input " << i;
try { try {
float voltage = adc->getVoltage(i); float voltage = adc.getVoltage(i);
std::cout << ": Voltage = " << voltage << "V" << std::endl; std::cout << ": Voltage = " << voltage << "V" << std::endl;
} catch (std::exception& e) { } catch (std::exception& e) {
std::cerr << e.what() << std::endl; std::cerr << e.what() << std::endl;

View File

@ -8,7 +8,7 @@
#define DS1808_GPIO_PWR 15 // Edison GP165 #define DS1808_GPIO_PWR 15 // Edison GP165
void void
printState(upm::ILightController& lightController) printState(upm::DS1808LC& lightController)
{ {
if (lightController.isPowered()) { if (lightController.isPowered()) {
std::cout << "Light is powered, brightness = " << lightController.getBrightness() std::cout << "Light is powered, brightness = " << lightController.getBrightness()

View File

@ -3,13 +3,12 @@
#include <string> #include <string>
#include "hlg150h.hpp" #include "hlg150h.hpp"
#include "iLightController.hpp"
#define HLG150H_GPIO_RELAY 21 #define HLG150H_GPIO_RELAY 21
#define HLG150H_GPIO_PWM 22 #define HLG150H_GPIO_PWM 22
void void
printState(upm::ILightController& lightController) printState(upm::HLG150H& lightController)
{ {
if (lightController.isPowered()) { if (lightController.isPowered()) {
std::cout << "Light is powered, brightness = " << lightController.getBrightness() std::cout << "Light is powered, brightness = " << lightController.getBrightness()

View File

@ -2,14 +2,13 @@
#include <stdlib.h> #include <stdlib.h>
#include <string> #include <string>
#include "iLightController.hpp"
#include "lp8860.hpp" #include "lp8860.hpp"
#define EDISON_I2C_BUS 1 // Edison I2C-1 #define EDISON_I2C_BUS 1 // Edison I2C-1
#define LP8860_GPIO_PWR 45 // Edison GP45 #define LP8860_GPIO_PWR 45 // Edison GP45
void void
printState(upm::ILightController& lightController) printState(upm::LP8860& lightController)
{ {
if (lightController.isPowered()) { if (lightController.isPowered()) {
std::cout << "Light is powered, brightness = " << lightController.getBrightness() std::cout << "Light is powered, brightness = " << lightController.getBrightness()

View File

@ -27,7 +27,6 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include "iCO2Sensor.hpp"
#include "mraa/common.h" #include "mraa/common.h"
#include "t6713.hpp" #include "t6713.hpp"
#include "upm_utilities.h" #include "upm_utilities.h"
@ -40,19 +39,16 @@ int
main() main()
{ {
/* Create an instance of the T6713 sensor */ /* Create an instance of the T6713 sensor */
upm::T6713 sensor(EDISON_I2C_BUS); upm::T6713 cO2Sensor(EDISON_I2C_BUS);
/* Show usage from the ICO2Sensor interface */ // if (cO2Sensor == NULL) {
upm::ICO2Sensor* cO2Sensor = static_cast<upm::ICO2Sensor*>(&sensor); // std::cout << "CO2 sensor not detected" << std::endl;
// return 1;
if (cO2Sensor == NULL) { // }
std::cout << "CO2 sensor not detected" << std::endl; std::cout << "CO2 sensor " << cO2Sensor.getModuleName() << " detected" << std::endl;
return 1;
}
std::cout << "CO2 sensor " << cO2Sensor->getModuleName() << " detected" << std::endl;
while (true) { while (true) {
try { try {
uint16_t value = cO2Sensor->getPpm(); uint16_t value = cO2Sensor.getPpm();
std::cout << "CO2 level = " << value << " ppm" << std::endl; std::cout << "CO2 level = " << value << " ppm" << std::endl;
} catch (std::exception& e) { } catch (std::exception& e) {
std::cerr << e.what() << std::endl; std::cerr << e.what() << std::endl;

View File

@ -24,7 +24,7 @@
*/ */
import upm_bmp280.*; import upm_bmp280.*;
import upm_new_interfaces.*; import upm_interfaces.*;
public class BME280_Interface_Example public class BME280_Interface_Example
{ {

View File

@ -64,81 +64,81 @@ function(add_example example_class_name dependency_list)
add_dependencies(${example_class_name} ${java_targets_list}) add_dependencies(${example_class_name} ${java_targets_list})
endfunction() endfunction()
add_example(A110X_Example "a110x;new_interfaces") add_example(A110X_Example "a110x;interfaces")
add_example(A110X_intr_Example "a110x;new_interfaces") add_example(A110X_intr_Example "a110x;interfaces")
add_example(Ad8232_Example ad8232) add_example(Ad8232_Example ad8232)
add_example(ADC121C021_Example adc121c021) add_example(ADC121C021_Example adc121c021)
add_example(Ads1015_Example "ads1x15;interfaces") add_example(Ads1015_Example "ads1x15")
add_example(Ads1115_Example ads1x15) add_example(Ads1115_Example ads1x15)
add_example(Adxl345_Example adxl345) add_example(Adxl345_Example adxl345)
add_example(AM2315_Example "am2315;new_interfaces") add_example(AM2315_Example "am2315;interfaces")
add_example(APA102_Example apa102) add_example(APA102_Example apa102)
add_example(Apds9002_Example "apds9002;new_interfaces") add_example(Apds9002_Example "apds9002;interfaces")
add_example(BH1750_Example "bh1750;new_interfaces") add_example(BH1750_Example "bh1750;interfaces")
add_example(BISS0001_Example "biss0001;new_interfaces") add_example(BISS0001_Example "biss0001;interfaces")
add_example(BMA250E_Example "bma250e;new_interfaces") add_example(BMA250E_Example "bma250e;interfaces")
add_example(BMC150_Example "bmx055;new_interfaces") add_example(BMC150_Example "bmx055;interfaces")
add_example(BME280_Example "bmp280;new_interfaces") add_example(BME280_Example "bmp280;interfaces")
add_example(BMG160_Example bmg160) add_example(BMG160_Example bmg160)
add_example(BMI055_Example "bmx055;new_interfaces") add_example(BMI055_Example "bmx055;interfaces")
add_example(BMI160_Example "bmi160;new_interfaces") add_example(BMI160_Example "bmi160;interfaces")
add_example(BMM150_Example bmm150) add_example(BMM150_Example bmm150)
add_example(BMP280_Example "bmp280;new_interfaces") add_example(BMP280_Example "bmp280;interfaces")
add_example(BMPX8X_Example "bmpx8x;new_interfaces") add_example(BMPX8X_Example "bmpx8x;interfaces")
add_example(BMX055_Example "bmx055;new_interfaces") add_example(BMX055_Example "bmx055;interfaces")
add_example(BNO055_Example bno055) add_example(BNO055_Example bno055)
add_example(Button_Example button) add_example(Button_Example "button;interfaces")
add_example(Button_intr_Example button) add_example(Button_intr_Example "button;interfaces")
add_example(Buzzer_Example buzzer) add_example(Buzzer_Example buzzer)
add_example(CJQ4435_Example cjq4435) add_example(CJQ4435_Example cjq4435)
add_example(Collision_Example "collision;new_interfaces") add_example(Collision_Example "collision;interfaces")
add_example(CWLSXXA_Example cwlsxxa) add_example(CWLSXXA_Example cwlsxxa)
add_example(DFREC_Example dfrec) add_example(DFREC_Example "dfrec;interfaces")
add_example(DFRORP_Example dfrorp) add_example(DFRORP_Example "dfrorp;interfaces")
add_example(DS1307_Example ds1307) add_example(DS1307_Example ds1307)
add_example(ECEZO_Example ecezo) add_example(ECEZO_Example "ecezo;interfaces")
add_example(ECS1030_Example ecs1030) add_example(ECS1030_Example ecs1030)
add_example(EHR_Example "ehr;new_interfaces") add_example(EHR_Example "ehr;interfaces")
add_example(Emg_Example emg) add_example(Emg_Example "emg;interfaces")
add_example(ENC03R_Example enc03r) add_example(ENC03R_Example enc03r)
add_example(ES08A_Example "servo;interfaces") add_example(ES08A_Example "servo")
add_example(FlexSensor_Example flex) add_example(FlexSensor_Example flex)
add_example(Gp2y0a_Example gp2y0a) add_example(Gp2y0a_Example "gp2y0a;interfaces")
add_example(GroveButton_Example grove) add_example(GroveButton_Example "grove;interfaces")
add_example(GroveButton_intr_Example grove) add_example(GroveButton_intr_Example "grove;interfaces")
add_example(GroveEHR_Example "groveehr;new_interfaces") add_example(GroveEHR_Example "groveehr;interfaces")
add_example(GroveEmg_Example groveemg) add_example(GroveEmg_Example "groveemg;interfaces")
add_example(GroveGsr_Example grovegsr) add_example(GroveGsr_Example "grovegsr;interfaces")
add_example(GroveLEDBar_Example my9221) add_example(GroveLEDBar_Example my9221)
add_example(GroveLED_Example grove) add_example(GroveLED_Example grove)
add_example(GroveLed_multi_Example grove) add_example(GroveLed_multi_Example grove)
add_example(GroveLight_Example "grove;new_interfaces") add_example(GroveLight_Example "grove;interfaces")
add_example(GroveLineFinder_Example grovelinefinder) add_example(GroveLineFinder_Example "grovelinefinder;interfaces")
add_example(GroveMD_Example grovemd) add_example(GroveMD_Example grovemd)
add_example(GroveMoisture_Example "grovemoisture;new_interfaces") add_example(GroveMoisture_Example "grovemoisture;interfaces")
add_example(GroveMQ3_Example gas) add_example(GroveMQ3_Example gas)
add_example(GroveMQ9_Example gas) add_example(GroveMQ9_Example gas)
add_example(GroveO2_Example groveo2) add_example(GroveO2_Example groveo2)
add_example(GroveQTouch_Example at42qt1070) add_example(GroveQTouch_Example at42qt1070)
add_example(GroveRelay_Example grove) add_example(GroveRelay_Example grove)
add_example(GroveRotary_Example grove) add_example(GroveRotary_Example "grove;interfaces")
add_example(GROVESCAM_Example grovescam) add_example(GROVESCAM_Example grovescam)
add_example(GroveSlide_Example grove) add_example(GroveSlide_Example grove)
add_example(GroveSpeaker_Example grovespeaker) add_example(GroveSpeaker_Example grovespeaker)
add_example(GroveTemp_Example "grove;new_interfaces") add_example(GroveTemp_Example "grove;interfaces")
add_example(GroveVDiv_Example grovevdiv) add_example(GroveVDiv_Example "grovevdiv;interfaces")
add_example(GroveWater_Example grovewater) add_example(GroveWater_Example grovewater)
add_example(GroveWFS_Example grovewfs) add_example(GroveWFS_Example grovewfs)
add_example(Gsr_Example gsr) add_example(Gsr_Example "gsr;interfaces")
add_example(GUVAS12D_Example guvas12d) add_example(GUVAS12D_Example guvas12d)
add_example(H3LIS331DL_Example "h3lis331dl;new_interfaces") add_example(H3LIS331DL_Example "h3lis331dl;interfaces")
add_example(HCSR04_Example "hcsr04;new_interfaces") add_example(HCSR04_Example "hcsr04;interfaces")
add_example(HKA5_Example hka5) add_example(HKA5_Example hka5)
add_example(HM11_Example hm11) add_example(HM11_Example hm11)
add_example(Hmc5883l_Example hmc5883l) add_example(Hmc5883l_Example hmc5883l)
add_example(HMTRP_Example hmtrp) add_example(HMTRP_Example hmtrp)
add_example(HP20x_Example "hp20x;new_interfaces") add_example(HP20x_Example "hp20x;interfaces")
add_example(HTU21D_Example "htu21d;new_interfaces") add_example(HTU21D_Example "htu21d;interfaces")
add_example(Itg3200_Example itg3200) add_example(Itg3200_Example itg3200)
add_example(Jhd1313m1_Example jhd1313m1) add_example(Jhd1313m1_Example jhd1313m1)
add_example(Jhd1313m1_lcd_Example jhd1313m1) add_example(Jhd1313m1_lcd_Example jhd1313m1)
@ -150,60 +150,60 @@ add_example(Lcm1602_parallel_Example lcm1602)
add_example(LDT0028_Example ldt0028) add_example(LDT0028_Example ldt0028)
add_example(LE910_Example uartat) add_example(LE910_Example uartat)
add_example(LED_Example led) add_example(LED_Example led)
add_example(Light_Example "light;new_interfaces") add_example(Light_Example "light;interfaces")
add_example(LineFinder_Example linefinder) add_example(LineFinder_Example "linefinder;interfaces")
add_example(LIS2DS12_Example "lis2ds12;new_interfaces") add_example(LIS2DS12_Example "lis2ds12;interfaces")
add_example(LoL_Example lol) add_example(LoL_Example lol)
add_example(LSM303AGR_Example "lsm303agr;new_interfaces") add_example(LSM303AGR_Example "lsm303agr;interfaces")
add_example(LSM303D_Example "lsm303d;new_interfaces") add_example(LSM303D_Example "lsm303d;interfaces")
add_example(LSM303DLH_Example lsm303dlh) add_example(LSM303DLH_Example lsm303dlh)
add_example(LSM6DS3H_Example "lsm6ds3h;new_interfaces") add_example(LSM6DS3H_Example "lsm6ds3h;interfaces")
add_example(LSM6DSL_Example "lsm6dsl;new_interfaces") add_example(LSM6DSL_Example "lsm6dsl;interfaces")
add_example(M24LR64E_Example m24lr64e) add_example(M24LR64E_Example m24lr64e)
add_example(MAX30100_Example max30100) add_example(MAX30100_Example max30100)
add_example(MAX31855_Example max31855) add_example(MAX31855_Example max31855)
add_example(MAX44000_Example max44000) add_example(MAX44000_Example "max44000;interfaces")
add_example(MAX5487_Example max5487) add_example(MAX5487_Example max5487)
add_example(MAXds3231m_Example maxds3231m) add_example(MAXds3231m_Example maxds3231m)
add_example(MB704X_Example "mb704x;new_interfaces") add_example(MB704X_Example "mb704x;interfaces")
add_example(MCP2515_Example mcp2515) add_example(MCP2515_Example mcp2515)
add_example(MCP2515_TXRX_Example mcp2515) add_example(MCP2515_TXRX_Example mcp2515)
add_example(MD_Example md) add_example(MD_Example md)
add_example(MHZ16_Example mhz16) add_example(MHZ16_Example mhz16)
add_example(Microphone_Example mic) add_example(Microphone_Example mic)
add_example(MMA7361_Example mma7361) add_example(MMA7361_Example mma7361)
add_example(MMA7455_Example "mma7455;new_interfaces") add_example(MMA7455_Example "mma7455;interfaces")
add_example(MMA7660_Example "mma7660;new_interfaces") add_example(MMA7660_Example "mma7660;interfaces")
add_example(Moisture_Example "moisture;new_interfaces") add_example(Moisture_Example "moisture;interfaces")
add_example(MPL3115A2_Example "mpl3115a2;new_interfaces") add_example(MPL3115A2_Example "mpl3115a2;interfaces")
add_example(MPR121_Example mpr121) add_example(MPR121_Example mpr121)
add_example(MPU9150_Example "mpu9150;new_interfaces") add_example(MPU9150_Example "mpu9150;interfaces")
add_example(MQ2_Example gas) add_example(MQ2_Example gas)
add_example(MQ303A_Example mq303a) add_example(MQ303A_Example mq303a)
add_example(MQ5_Example gas) add_example(MQ5_Example gas)
add_example(MS5803_Example "ms5803;new_interfaces") add_example(MS5803_Example "ms5803;interfaces")
add_example(NMEAGPS_Example nmea_gps) add_example(NMEAGPS_Example nmea_gps)
add_example(NMEAGPS_I2C_Example nmea_gps) add_example(NMEAGPS_I2C_Example nmea_gps)
add_example(NRF24L01_receiver_Example nrf24l01) add_example(NRF24L01_receiver_Example nrf24l01)
add_example(NRF24L01_transmitter_Example nrf24l01) add_example(NRF24L01_transmitter_Example nrf24l01)
add_example(NUNCHUCK_Example nunchuck) add_example(NUNCHUCK_Example nunchuck)
add_example(O2_Example o2) add_example(O2_Example o2)
add_example(OTP538U_Example otp538u) add_example(OTP538U_Example "otp538u;interfaces")
add_example(P9813_Example p9813) add_example(P9813_Example p9813)
add_example(PPD42NS_Example ppd42ns) add_example(PPD42NS_Example ppd42ns)
add_example(Pulsensor_Example pulsensor) add_example(Pulsensor_Example pulsensor)
add_example(Relay_Example relay) add_example(Relay_Example relay)
add_example(RFR359F_Example "rfr359f;new_interfaces") add_example(RFR359F_Example "rfr359f;interfaces")
add_example(RN2903_Example rn2903) add_example(RN2903_Example rn2903)
add_example(RN2903_P2P_RX_Example rn2903) add_example(RN2903_P2P_RX_Example rn2903)
add_example(RN2903_P2P_TX_Example rn2903) add_example(RN2903_P2P_TX_Example rn2903)
add_example(RotaryEncoder_Example rotaryencoder) add_example(RotaryEncoder_Example "rotaryencoder;interfaces")
add_example(Rotary_Example rotary) add_example(Rotary_Example "rotary;interfaces")
add_example(RPR220_Example rpr220) add_example(RPR220_Example rpr220)
add_example(RPR220_intr_Example rpr220) add_example(RPR220_intr_Example rpr220)
add_example(SCAM_Example scam) add_example(SCAM_Example scam)
add_example(SensorTemplate_Example sensortemplate) add_example(SensorTemplate_Example sensortemplate)
add_example(SHT1X_Example "sht1x;new_interfaces") add_example(SHT1X_Example "sht1x;interfaces")
add_example(Slide_Example slide) add_example(Slide_Example slide)
add_example(SM130_Example sm130) add_example(SM130_Example sm130)
add_example(Speaker_Example speaker) add_example(Speaker_Example speaker)
@ -211,18 +211,18 @@ add_example(SpeakerPWM_Example speaker)
add_example(SSD1308_oled_Example lcd) add_example(SSD1308_oled_Example lcd)
add_example(SSD1327_oled_Example lcd) add_example(SSD1327_oled_Example lcd)
add_example(ST7735_Example st7735) add_example(ST7735_Example st7735)
add_example(TEAMS_Example teams) add_example(TEAMS_Example "teams;interfaces")
add_example(Temperature_Example temperature) add_example(Temperature_Example "temperature;interfaces")
add_example(TEX00_Example tex00) add_example(TEX00_Example "tex00;interfaces")
add_example(Th02_Example "th02;new_interfaces") add_example(Th02_Example "th02;interfaces")
add_example(TM1637_Example tm1637) add_example(TM1637_Example tm1637)
add_example(TP401_Example gas) add_example(TP401_Example gas)
add_example(TSL2561_Example "tsl2561;new_interfaces") add_example(TSL2561_Example "tsl2561;interfaces")
add_example(TTP223_Example ttp223) add_example(TTP223_Example "ttp223;interfaces")
add_example(ULN200XA_Example uln200xa) add_example(ULN200XA_Example uln200xa)
add_example(VDiv_Example vdiv) add_example(VDiv_Example "vdiv;interfaces")
add_example(VEML6070_Example veml6070) add_example(VEML6070_Example veml6070)
add_example(Water_Example water) add_example(Water_Example "water;interfaces")
add_example(WaterLevelSensor_Example waterlevel) add_example(WaterLevelSensor_Example waterlevel)
add_example(WFS_Example wfs) add_example(WFS_Example wfs)
add_example(WT5001_Example wt5001) add_example(WT5001_Example wt5001)
@ -230,9 +230,9 @@ add_example(YG1006_Example yg1006)
add_example(ZFM20_Example zfm20) add_example(ZFM20_Example zfm20)
if(SWIG_VERSION VERSION_GREATER 3.0.8) if(SWIG_VERSION VERSION_GREATER 3.0.8)
add_example(BME280_Interface_Example "bmp280;new_interfaces") add_example(BME280_Interface_Example "bmp280;interfaces")
add_example(IMS_Example "ims;new_interfaces") add_example(IMS_Example "ims;interfaces")
add_example(RHUSB_Example "rhusb;new_interfaces") add_example(RHUSB_Example "rhusb;interfaces")
endif() endif()
if (OPENZWAVE_FOUND) if (OPENZWAVE_FOUND)

View File

@ -23,7 +23,7 @@
*/ */
import upm_sht1x.SHT1X; import upm_sht1x.SHT1X;
import upm_new_interfaces.*; import upm_interfaces.*;
public class SHT1X_Example public class SHT1X_Example
{ {

View File

@ -2,7 +2,7 @@
* Author: Serban Waltter <serban.waltter@rinftech.com> * Author: Serban Waltter <serban.waltter@rinftech.com>
*/ */
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -2,7 +2,7 @@
* Author: Serban Waltter <serban.waltter@rinftech.com> * Author: Serban Waltter <serban.waltter@rinftech.com>
*/ */
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -2,7 +2,7 @@
* Author: Serban Waltter <serban.waltter@rinftech.com> * Author: Serban Waltter <serban.waltter@rinftech.com>
*/ */
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -2,7 +2,7 @@
* Author: Serban Waltter <serban.waltter@rinftech.com> * Author: Serban Waltter <serban.waltter@rinftech.com>
*/ */
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -2,7 +2,7 @@
* Author: Serban Waltter <serban.waltter@rinftech.com> * Author: Serban Waltter <serban.waltter@rinftech.com>
*/ */
import upm_new_interfaces.*; import upm_interfaces.*;
import upm_moisture.*; import upm_moisture.*;
import upm_ims.*; import upm_ims.*;

View File

@ -7,7 +7,7 @@ import java.util.ArrayList;
import upm_bmp280.BMP280; import upm_bmp280.BMP280;
import upm_hp20x.HP20X; import upm_hp20x.HP20X;
import upm_ms5611.MS5611; import upm_ms5611.MS5611;
import upm_new_interfaces.*; import upm_interfaces.*;
/** /**
* iPressure_Example * iPressure_Example

View File

@ -1,4 +1,4 @@
set (libname "new_interfaces") set (libname "interfaces")
set (libdescription "CXX Interface Library") set (libdescription "CXX Interface Library")
set (module_src ${libname}.cxx) set (module_src ${libname}.cxx)

View File

@ -40,7 +40,7 @@ namespace upm
* Get acceleration values on X, Y and Z axis. * Get acceleration values on X, Y and Z axis.
* v[0] = X, v[1] = Y, v[2] = Z * v[0] = X, v[1] = Y, v[2] = Z
* *
* @return vector of 3 floats containing acceleration on each axis * @return vector of 3 floats containing acceleration on each axis in Gs
*/ */
virtual std::vector<float> getAcceleration() = 0; virtual std::vector<float> getAcceleration() = 0;
}; };

View File

@ -1,9 +1,14 @@
#include "iAcceleration.hpp"
#include "iAngle.hpp"
#include "iButton.hpp"
#include "iClock.hpp" #include "iClock.hpp"
#include "iCollision.hpp" #include "iCollision.hpp"
#include "iDistance.hpp" #include "iDistance.hpp"
#include "iDistanceInterrupter.hpp" #include "iDistanceInterrupter.hpp"
#include "iEC.hpp" #include "iEC.hpp"
#include "iElectromagnet.hpp"
#include "iEmg.hpp" #include "iEmg.hpp"
#include "iGps.hpp"
#include "iHallEffect.hpp" #include "iHallEffect.hpp"
#include "iHeartRate.hpp" #include "iHeartRate.hpp"
#include "iHumidity.hpp" #include "iHumidity.hpp"
@ -11,6 +16,10 @@
#include "iLineFinder.hpp" #include "iLineFinder.hpp"
#include "iMoisture.hpp" #include "iMoisture.hpp"
#include "iMotion.hpp" #include "iMotion.hpp"
#include "iOrp.hpp"
#include "iPH.hpp"
#include "iPressure.hpp" #include "iPressure.hpp"
#include "iProximity.hpp"
#include "iTemperature.hpp" #include "iTemperature.hpp"
#include "iAcceleration.hpp" #include "iVDiv.hpp"
#include "iWater.hpp"

View File

@ -1,7 +1,7 @@
#ifdef SWIGPYTHON #ifdef SWIGPYTHON
%module (package="upm") pyupm_new_interfaces %module (package="upm") pyupm_interfaces
#else #else
%module new_interfaces %module interfaces
#endif #endif
#ifdef SWIGJAVA #ifdef SWIGJAVA
@ -39,11 +39,17 @@ import java.lang.Float;
%template(floatVector) std::vector<float>; %template(floatVector) std::vector<float>;
%interface_impl (upm::iAcceleration);
%interface_impl (upm::iAngle);
%interface_impl (upm::iButton);
%interface_impl (upm::iClock); %interface_impl (upm::iClock);
%interface_impl (upm::iCollision); %interface_impl (upm::iCollision);
%interface_impl (upm::iDistance); %interface_impl (upm::iDistance);
%interface_impl (upm::iDistanceInterrupter); %interface_impl (upm::iDistanceInterrupter);
%interface_impl (upm::iEC); %interface_impl (upm::iEC);
%interface_impl (upm::iElectromagnet);
%interface_impl (upm::iEmg);
%interface_impl (upm::iGps);
%interface_impl (upm::iHallEffect); %interface_impl (upm::iHallEffect);
%interface_impl (upm::iHeartRate); %interface_impl (upm::iHeartRate);
%interface_impl (upm::iHumidity); %interface_impl (upm::iHumidity);
@ -51,17 +57,27 @@ import java.lang.Float;
%interface_impl (upm::iLineFinder); %interface_impl (upm::iLineFinder);
%interface_impl (upm::iMoisture); %interface_impl (upm::iMoisture);
%interface_impl (upm::iMotion); %interface_impl (upm::iMotion);
%interface_impl (upm::iOrp);
%interface_impl (upm::iPH);
%interface_impl (upm::iPressure); %interface_impl (upm::iPressure);
%interface_impl (upm::iProximity);
%interface_impl (upm::iTemperature); %interface_impl (upm::iTemperature);
%interface_impl (upm::iAcceleration); %interface_impl (upm::iVDiv);
%interface_impl (upm::iWater);
#endif #endif
%{ %{
#include "iAcceleration.hpp"
#include "iAngle.hpp"
#include "iButton.hpp"
#include "iClock.hpp" #include "iClock.hpp"
#include "iCollision.hpp" #include "iCollision.hpp"
#include "iDistance.hpp" #include "iDistance.hpp"
#include "iDistanceInterrupter.hpp" #include "iDistanceInterrupter.hpp"
#include "iEC.hpp" #include "iEC.hpp"
#include "iElectromagnet.hpp"
#include "iEmg.hpp"
#include "iGps.hpp"
#include "iHallEffect.hpp" #include "iHallEffect.hpp"
#include "iHeartRate.hpp" #include "iHeartRate.hpp"
#include "iHumidity.hpp" #include "iHumidity.hpp"
@ -69,16 +85,26 @@ import java.lang.Float;
#include "iLineFinder.hpp" #include "iLineFinder.hpp"
#include "iMoisture.hpp" #include "iMoisture.hpp"
#include "iMotion.hpp" #include "iMotion.hpp"
#include "iOrp.hpp"
#include "iPH.hpp"
#include "iPressure.hpp" #include "iPressure.hpp"
#include "iProximity.hpp"
#include "iTemperature.hpp" #include "iTemperature.hpp"
#include "iAcceleration.hpp" #include "iVDiv.hpp"
#include "iWater.hpp"
%} %}
%include "iAcceleration.hpp"
%include "iAngle.hpp"
%include "iButton.hpp"
%include "iClock.hpp" %include "iClock.hpp"
%include "iCollision.hpp" %include "iCollision.hpp"
%include "iDistance.hpp" %include "iDistance.hpp"
%include "iDistanceInterrupter.hpp" %include "iDistanceInterrupter.hpp"
%include "iEC.hpp" %include "iEC.hpp"
%include "iElectromagnet.hpp"
%include "iEmg.hpp"
%include "iGps.hpp"
%include "iHallEffect.hpp" %include "iHallEffect.hpp"
%include "iHeartRate.hpp" %include "iHeartRate.hpp"
%include "iHumidity.hpp" %include "iHumidity.hpp"
@ -86,9 +112,13 @@ import java.lang.Float;
%include "iLineFinder.hpp" %include "iLineFinder.hpp"
%include "iMoisture.hpp" %include "iMoisture.hpp"
%include "iMotion.hpp" %include "iMotion.hpp"
%include "iOrp.hpp"
%include "iPH.hpp"
%include "iPressure.hpp" %include "iPressure.hpp"
%include "iProximity.hpp"
%include "iTemperature.hpp" %include "iTemperature.hpp"
%include "iAcceleration.hpp" %include "iVDiv.hpp"
%include "iWater.hpp"
/* Java-specific SWIG syntax */ /* Java-specific SWIG syntax */
#ifdef SWIGJAVA #ifdef SWIGJAVA

View File

@ -25,7 +25,7 @@ cd ${ROOT_DIR} && make -j8 -Cbuild 2> ${BUILD_LOGS_DIR}/build-doc.log
cd ${BUILD_DIR} && find ../src/ -name "*.i" > upm.i.list && \ cd ${BUILD_DIR} && find ../src/ -name "*.i" > upm.i.list && \
../doxy/doxyport/doxyport upm.i.list \ ../doxy/doxyport/doxyport upm.i.list \
--cmake ./compile_commands.json \ --cmake ./compile_commands.json \
--source ../src/interfaces/,../src/bacnetmstp,src \ --source ../src/bacnetmstp,src \
--destination src/ \ --destination src/ \
--convert-protected-to-private \ --convert-protected-to-private \
--output upm-java-files.txt \ --output upm-java-files.txt \

View File

@ -255,23 +255,23 @@ function (_get_current_dot_i_file filePrefix varDotIFile)
string(REPLACE "#" "%" SWIG_PERCENT_INCLUDES "${SWIG_HASH_INCLUDES}") string(REPLACE "#" "%" SWIG_PERCENT_INCLUDES "${SWIG_HASH_INCLUDES}")
if(module_iface) if(module_iface)
# Set up Python bindings # Set up Python bindings
set(PYTHON_NEW_INTERFACES "#ifdef SWIGPYTHON\n") set(PYTHON_INTERFACES "#ifdef SWIGPYTHON\n")
string(APPEND PYTHON_NEW_INTERFACES "%module (package=\"pyupm_new_interfaces\") ${libname}\n") string(APPEND PYTHON_INTERFACES "%module (package=\"upm\") ${libname}\n")
string(APPEND PYTHON_NEW_INTERFACES "#endif") string(APPEND PYTHON_INTERFACES "#endif")
# Include interfaces # Include interfaces
set(IMPORT_NEW_INTERFACES "%import \"interfaces/new_interfaces.i\"") set(IMPORT_INTERFACES "%import \"interfaces/interfaces.i\"")
# Set up Java bindings # Set up Java bindings
string(APPEND JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\n") string(APPEND JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\n")
string(APPEND JAVA_TYPEMAPS "import upm_new_interfaces.*;\n%}") string(APPEND JAVA_TYPEMAPS "import upm_interfaces.*;\n%}")
if (CMAKE_VERSION VERSION_LESS "3.3" ) if (CMAKE_VERSION VERSION_LESS "3.3" )
list (FIND module_iface "iAcceleration.hpp" _index) list (FIND module_iface "iAcceleration.hpp" _index)
if (${_index} GREATER -1) if (${_index} GREATER -1)
set(JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\nimport upm_new_interfaces.*;\n\nimport java.util.AbstractList;\nimport java.lang.Float;\n%}\n") set(JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\nimport upm_interfaces.*;\n\nimport java.util.AbstractList;\nimport java.lang.Float;\n%}\n")
endif() endif()
else() else()
cmake_policy(SET CMP0057 NEW) cmake_policy(SET CMP0057 NEW)
if ("iAcceleration.hpp" IN_LIST module_iface) if ("iAcceleration.hpp" IN_LIST module_iface)
set(JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\nimport upm_new_interfaces.*;\n\nimport java.util.AbstractList;\nimport java.lang.Float;\n%}\n") set(JAVA_TYPEMAPS "%typemap(javaimports) SWIGTYPE %{\nimport upm_interfaces.*;\n\nimport java.util.AbstractList;\nimport java.lang.Float;\n%}\n")
endif() endif()
endif() endif()
endif() endif()
@ -329,7 +329,7 @@ macro(_upm_swig_python)
set (python_wrapper_target ${SWIG_MODULE_${python_wrapper_name}_REAL_NAME}) set (python_wrapper_target ${SWIG_MODULE_${python_wrapper_name}_REAL_NAME})
if(module_iface) if(module_iface)
add_dependencies(${python_wrapper_target} _pyupm_new_interfaces-python${PYTHON_VERSION_MAJOR}) add_dependencies(${python_wrapper_target} _pyupm_interfaces-python${PYTHON_VERSION_MAJOR})
endif() endif()
add_dependencies(${python_wrapper_target} ${libname}) add_dependencies(${python_wrapper_target} ${libname})
@ -464,7 +464,7 @@ function(upm_swig_node)
# Add interfaces if necessary # Add interfaces if necessary
if(module_iface) if(module_iface)
add_dependencies(jsupm_${libname} jsupm_new_interfaces) add_dependencies(jsupm_${libname} jsupm_interfaces)
endif() endif()
add_dependencies(jsupm_${libname} ${libname}) add_dependencies(jsupm_${libname} ${libname})
@ -556,15 +556,9 @@ function(upm_swig_java)
# If the C++ target depends on C++ interfaces, make the JAVA target # If the C++ target depends on C++ interfaces, make the JAVA target
# depend on the JAVA interfaces # depend on the JAVA interfaces
if ("${_c_cxx_dependency_list}" MATCHES interfaces)
add_dependencies(javaupm_${libname} javaupm_interfaces)
# If this target depends on interfaces, include the java interfaces
# target .jar file in the classpath, otherwise this variable will be empty
set (INTERFACES_JAR_FILE ${CMAKE_BINARY_DIR}/src/interfaces/upm_interfaces.jar)
endif ()
if(module_iface) if(module_iface)
add_dependencies(javaupm_${libname} javaupm_new_interfaces) add_dependencies(javaupm_${libname} javaupm_interfaces)
set (NEW_INTERFACES_JAR_FILE ${CMAKE_BINARY_DIR}/interfaces/upm_new_interfaces.jar) set (INTERFACES_JAR_FILE ${CMAKE_BINARY_DIR}/interfaces/upm_interfaces.jar)
endif() endif()
# For linker to report unresolved symbols. Note, there is currently no test # For linker to report unresolved symbols. Note, there is currently no test
# for linker flags (similar to compile files), so this is it for now. # for linker flags (similar to compile files), so this is it for now.
@ -616,7 +610,7 @@ function(upm_swig_java)
add_custom_command (TARGET javaupm_${libname} add_custom_command (TARGET javaupm_${libname}
POST_BUILD POST_BUILD
COMMAND cmake -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/upm_${libname} COMMAND cmake -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/upm_${libname}
COMMAND ${JAVAC} *.java -d ${CMAKE_CURRENT_BINARY_DIR} -cp ${INTERFACES_JAR_FILE}:${NEW_INTERFACES_JAR_FILE}:. COMMAND ${JAVAC} *.java -d ${CMAKE_CURRENT_BINARY_DIR} -cp ${INTERFACES_JAR_FILE}:.
COMMAND ${JAR} cf upm_${libname}.jar upm_${libname} COMMAND ${JAR} cf upm_${libname}.jar upm_${libname}
) )
@ -678,10 +672,8 @@ if (BUILDSWIGNODE)
# Utilities and interfaces # Utilities and interfaces
file (COPY ${CMAKE_SOURCE_DIR}/src/utilities DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/jsupm_${libname}) file (COPY ${CMAKE_SOURCE_DIR}/src/utilities DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/jsupm_${libname})
file (COPY ${CMAKE_SOURCE_DIR}/src/interfaces DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/jsupm_${libname})
set (upm_LIB_SRCS_GYP "'utilities/upm_utilities.c',\n${upm_LIB_SRCS_GYP}") set (upm_LIB_SRCS_GYP "'utilities/upm_utilities.c',\n${upm_LIB_SRCS_GYP}")
set (upm_LIB_INCLUDE_DIRS_GYP "'utilities',\n${upm_LIB_INCLUDE_DIRS_GYP}") set (upm_LIB_INCLUDE_DIRS_GYP "'utilities',\n${upm_LIB_INCLUDE_DIRS_GYP}")
set (upm_LIB_INCLUDE_DIRS_GYP "'interfaces',\n${upm_LIB_INCLUDE_DIRS_GYP}")
# Add readme, package.json for NPM and node-gyp config file # Add readme, package.json for NPM and node-gyp config file
configure_file (${PROJECT_SOURCE_DIR}/src/binding.gyp.in ${CMAKE_CURRENT_BINARY_DIR}/jsupm_${libname}/binding.gyp @ONLY) configure_file (${PROJECT_SOURCE_DIR}/src/binding.gyp.in ${CMAKE_CURRENT_BINARY_DIR}/jsupm_${libname}/binding.gyp @ONLY)
@ -978,12 +970,6 @@ if (NOT "${MODULE_LIST}" MATCHES ";utilities;")
set(MODULE_LIST "utilities;${MODULE_LIST}") set(MODULE_LIST "utilities;${MODULE_LIST}")
endif() endif()
# If the module list does NOT include the interfaces directory, prepend it since
# some sensor library targets depend on interfaces
if (NOT "${MODULE_LIST}" MATCHES ";interfaces;")
set(MODULE_LIST "interfaces;${MODULE_LIST}")
endif()
# Iterate over each directory in MODULE_LIST # Iterate over each directory in MODULE_LIST
foreach(subdir ${MODULE_LIST}) foreach(subdir ${MODULE_LIST})
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt)

View File

@ -2,14 +2,14 @@
%module (package="upm") a110x %module (package="upm") a110x
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
/* Macro for loading javaupm_a110x */ /* Macro for loading javaupm_a110x */

View File

@ -2,14 +2,14 @@
%module (package="upm") htu21d %module (package="upm") htu21d
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
JAVA_JNI_LOADLIBRARY(javaupm_abp) JAVA_JNI_LOADLIBRARY(javaupm_abp)

View File

@ -2,7 +2,7 @@ set (libname "ads1x15")
set (libdescription "Texas Instruments I2C ADC Library") set (libdescription "Texas Instruments I2C ADC Library")
set (module_src ${libname}.cxx ads1115.cxx ads1015.cxx) set (module_src ${libname}.cxx ads1115.cxx ads1015.cxx)
set (module_hpp ${libname}.hpp ads1115.hpp ads1015.hpp) set (module_hpp ${libname}.hpp ads1115.hpp ads1015.hpp)
upm_module_init(interfaces mraa) upm_module_init(mraa)
compiler_flag_supported(CXX is_supported -Wno-overloaded-virtual) compiler_flag_supported(CXX is_supported -Wno-overloaded-virtual)
if (is_supported) if (is_supported)
target_compile_options(${libname} PUBLIC -Wno-overloaded-virtual) target_compile_options(${libname} PUBLIC -Wno-overloaded-virtual)

View File

@ -26,7 +26,6 @@
#pragma once #pragma once
#include "ads1x15.hpp" #include "ads1x15.hpp"
#include "interfaces/iADC.hpp"
#define ADS1015_VREF 2.048 #define ADS1015_VREF 2.048
@ -85,7 +84,9 @@ namespace upm {
* @snippet ads1x15-ads1015.cxx Interesting * @snippet ads1x15-ads1015.cxx Interesting
* @snippet ads1x15-adc-sensor.cxx Interesting * @snippet ads1x15-adc-sensor.cxx Interesting
*/ */
class ADS1015 : public ADS1X15, public IADC { #define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
class ADS1015 : public ADS1X15 {
public: public:

View File

@ -2,27 +2,10 @@
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%import "../interfaces/javaupm_iADC.i"
%typemap(javaimports) SWIGTYPE %{import upm_interfaces.*;%}
JAVA_JNI_LOADLIBRARY(javaupm_ads1x15) JAVA_JNI_LOADLIBRARY(javaupm_ads1x15)
#endif #endif
/* END Java syntax */ /* END Java syntax */
/* BEGIN Javascript syntax ------------------------------------------------- */
#ifdef SWIGJAVASCRIPT
%include "iModuleStatus.hpp"
%include "iADC.hpp"
#endif
/* END Javascript syntax */
/* BEGIN Python syntax ----------------------------------------------------- */
#ifdef SWIGPYTHON
%include "iModuleStatus.hpp"
%include "iADC.hpp"
#endif
/* END Python syntax */
/* BEGIN Common SWIG syntax ------------------------------------------------- */ /* BEGIN Common SWIG syntax ------------------------------------------------- */
%{ %{
#include "ads1x15.hpp" #include "ads1x15.hpp"

View File

@ -2,7 +2,7 @@
%module (package="upm") adxl335 %module (package="upm") adxl335
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -10,7 +10,7 @@
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,7 +2,7 @@
%module (package="upm") adxl345 %module (package="upm") adxl345
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -36,7 +36,7 @@
} }
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,14 +2,14 @@
%module (package="upm") htu21d %module (package="upm") htu21d
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
JAVA_JNI_LOADLIBRARY(javaupm_bh1750) JAVA_JNI_LOADLIBRARY(javaupm_bh1750)

View File

@ -2,7 +2,7 @@
%module (package="upm") bma220 %module (package="upm") bma220
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -32,7 +32,7 @@
%ignore installISR(int, mraa::Edge, void *, void *); %ignore installISR(int, mraa::Edge, void *, void *);
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,7 +2,7 @@
%module (package="upm") bma250e %module (package="upm") bma250e
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -14,7 +14,7 @@
%ignore installISR (BMA250E_INTERRUPT_PINS_T, int, mraa::Edge , void *, void *); %ignore installISR (BMA250E_INTERRUPT_PINS_T, int, mraa::Edge , void *, void *);
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,7 +2,7 @@
%module (package="upm") bmi160 %module (package="upm") bmi160
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -29,7 +29,7 @@
%ignore getMagnetometer(float *, float *, float *); %ignore getMagnetometer(float *, float *, float *);
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -6,5 +6,5 @@ upm_mixed_module_init (NAME bmp280
CPP_SRC bmp280.cxx bme280.cxx CPP_SRC bmp280.cxx bme280.cxx
IFACE_HDR iHumidity.hpp iPressure.hpp iTemperature.hpp IFACE_HDR iHumidity.hpp iPressure.hpp iTemperature.hpp
CPP_WRAPS_C CPP_WRAPS_C
REQUIRES mraa interfaces utilities-c) REQUIRES mraa utilities-c)
target_link_libraries(${libnamec} m) target_link_libraries(${libnamec} m)

View File

@ -2,14 +2,14 @@
%module (package="upm") bmp280 %module (package="upm") bmp280
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
JAVA_JNI_LOADLIBRARY(javaupm_bmp280) JAVA_JNI_LOADLIBRARY(javaupm_bmp280)

View File

@ -7,5 +7,5 @@ upm_mixed_module_init (NAME bmpx8x
IFACE_HDR iPressure.hpp IFACE_HDR iPressure.hpp
FTI_SRC bmpx8x_fti.c FTI_SRC bmpx8x_fti.c
CPP_WRAPS_C CPP_WRAPS_C
REQUIRES mraa interfaces utilities-c) REQUIRES mraa utilities-c)
target_link_libraries(${libnamec} m) target_link_libraries(${libnamec} m)

View File

@ -2,14 +2,14 @@
%module (package="upm") htu21d %module (package="upm") htu21d
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
JAVA_JNI_LOADLIBRARY(javaupm_bmpx8x) JAVA_JNI_LOADLIBRARY(javaupm_bmpx8x)

View File

@ -2,7 +2,7 @@
%module (package="upm") bmx055 %module (package="upm") bmx055
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -17,7 +17,7 @@
%ignore getGyroscope(float *, float *, float *); %ignore getGyroscope(float *, float *, float *);
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -4,4 +4,5 @@ upm_mixed_module_init (NAME button
C_SRC button.c C_SRC button.c
CPP_HDR button.hpp CPP_HDR button.hpp
CPP_SRC button.cxx CPP_SRC button.cxx
IFACE_HDR iButton.hpp
REQUIRES mraa) REQUIRES mraa)

View File

@ -1,7 +1,16 @@
#ifdef SWIGPYTHON
%module (package="upm") button
#endif
%import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{
import upm_interfaces.*;
%}
%apply int {mraa::Edge} %apply int {mraa::Edge}
JAVA_ADD_INSTALLISR_EDGE(upm::Button) JAVA_ADD_INSTALLISR_EDGE(upm::Button)

View File

@ -5,5 +5,6 @@ upm_mixed_module_init (NAME collision
CPP_HDR collision.hpp CPP_HDR collision.hpp
CPP_SRC collision.cxx CPP_SRC collision.cxx
FTI_SRC collision_fti.c FTI_SRC collision_fti.c
IFACE_HDR iCollision.hpp
CPP_WRAPS_C CPP_WRAPS_C
REQUIRES mraa) REQUIRES mraa)

View File

@ -6,6 +6,7 @@ if (MRAA_OW_FOUND)
CPP_HDR dfrec.hpp CPP_HDR dfrec.hpp
CPP_SRC dfrec.cxx CPP_SRC dfrec.cxx
FTI_SRC dfrec_fti.c FTI_SRC dfrec_fti.c
IFACE_HDR iEC.hpp
CPP_WRAPS_C CPP_WRAPS_C
REQUIRES ds18b20 mraa utilities-c) REQUIRES ds18b20 mraa utilities-c)
# make sure the C library has the appropriate dependency on the UPM # make sure the C library has the appropriate dependency on the UPM

View File

@ -1,7 +1,17 @@
#ifdef SWIGPYTHON
%module (package="upm") dfrec
#endif
%import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{
import upm_interfaces.*;
%}
JAVA_JNI_LOADLIBRARY(javaupm_dfrec) JAVA_JNI_LOADLIBRARY(javaupm_dfrec)
#endif #endif
/* END Java syntax */ /* END Java syntax */

View File

@ -5,5 +5,6 @@ upm_mixed_module_init (NAME dfrorp
CPP_HDR dfrorp.hpp CPP_HDR dfrorp.hpp
CPP_SRC dfrorp.cxx CPP_SRC dfrorp.cxx
FTI_SRC dfrorp_fti.c FTI_SRC dfrorp_fti.c
IFACE_HDR iOrp.hpp
CPP_WRAPS_C CPP_WRAPS_C
REQUIRES mraa utilities-c) REQUIRES mraa utilities-c)

View File

@ -1,7 +1,17 @@
#ifdef SWIGPYTHON
%module (package="upm") dfrorp
#endif
%import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{
import upm_interfaces.*;
%}
JAVA_JNI_LOADLIBRARY(javaupm_dfrorp) JAVA_JNI_LOADLIBRARY(javaupm_dfrorp)
#endif #endif
/* END Java syntax */ /* END Java syntax */

View File

@ -5,5 +5,6 @@ upm_mixed_module_init (NAME dfrph
CPP_HDR dfrph.hpp CPP_HDR dfrph.hpp
CPP_SRC dfrph.cxx CPP_SRC dfrph.cxx
FTI_SRC dfrph_fti.c FTI_SRC dfrph_fti.c
IFACE_HDR iPH.hpp
CPP_WRAPS_C CPP_WRAPS_C
REQUIRES mraa) REQUIRES mraa)

View File

@ -2,4 +2,4 @@ set (libname "ds1808lc")
set (libdescription "Lighting Controller") set (libdescription "Lighting Controller")
set (module_src ${libname}.cxx mraa-utils.cxx) set (module_src ${libname}.cxx mraa-utils.cxx)
set (module_hpp ${libname}.hpp) set (module_hpp ${libname}.hpp)
upm_module_init(interfaces mraa) upm_module_init(mraa )

View File

@ -22,7 +22,6 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "iLightController.hpp"
#include "mraa/i2c.hpp" #include "mraa/i2c.hpp"
namespace upm namespace upm
@ -51,7 +50,9 @@ namespace upm
* *
* @snippet ds1808lc.cxx Interesting * @snippet ds1808lc.cxx Interesting
*/ */
class DS1808LC : public upm::ILightController #define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
class DS1808LC
{ {
public: public:
DS1808LC(int gpioPower, int i2cBus); DS1808LC(int gpioPower, int i2cBus);

View File

@ -4,8 +4,6 @@
#ifdef SWIGJAVA #ifdef SWIGJAVA
%include "arrays_java.i"; %include "arrays_java.i";
%include "../java_buffer.i" %include "../java_buffer.i"
%typemap(javaimports) SWIGTYPE %{import upm_interfaces.*;%}
%import "../interfaces/javaupm_iLightController.i"
JAVA_JNI_LOADLIBRARY(javaupm_ds1808lc) JAVA_JNI_LOADLIBRARY(javaupm_ds1808lc)
#endif #endif
@ -13,15 +11,11 @@ JAVA_JNI_LOADLIBRARY(javaupm_ds1808lc)
/* BEGIN Javascript syntax ------------------------------------------------- */ /* BEGIN Javascript syntax ------------------------------------------------- */
#ifdef SWIGJAVASCRIPT #ifdef SWIGJAVASCRIPT
%include "iModuleStatus.hpp"
%include "iLightController.hpp"
#endif #endif
/* END Javascript syntax */ /* END Javascript syntax */
/* BEGIN Python syntax ----------------------------------------------------- */ /* BEGIN Python syntax ----------------------------------------------------- */
#ifdef SWIGPYTHON #ifdef SWIGPYTHON
%include "iModuleStatus.hpp"
%include "iLightController.hpp"
#endif #endif
/* END Python syntax */ /* END Python syntax */

View File

@ -5,5 +5,6 @@ upm_mixed_module_init (NAME ecezo
CPP_HDR ecezo.hpp CPP_HDR ecezo.hpp
CPP_SRC ecezo.cxx CPP_SRC ecezo.cxx
FTI_SRC ecezo_fti.c FTI_SRC ecezo_fti.c
IFACE_HDR iEC.hpp
CPP_WRAPS_C CPP_WRAPS_C
REQUIRES mraa utilities-c) REQUIRES mraa utilities-c)

View File

@ -1,7 +1,17 @@
#ifdef SWIGPYTHON
%module (package="upm") ecezo
#endif
%import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{
import upm_interfaces.*;
%}
JAVA_JNI_LOADLIBRARY(javaupm_ecezo) JAVA_JNI_LOADLIBRARY(javaupm_ecezo)
#endif #endif
/* END Java syntax */ /* END Java syntax */

View File

@ -2,14 +2,14 @@
%module (package="upm") ehr %module (package="upm") ehr
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
%ignore beatISR; %ignore beatISR;

View File

@ -5,4 +5,5 @@ upm_mixed_module_init (NAME emg
CPP_HDR emg.hpp CPP_HDR emg.hpp
CPP_SRC emg.cxx CPP_SRC emg.cxx
FTI_SRC emg_fti.c FTI_SRC emg_fti.c
IFACE_HDR iEmg.hpp
REQUIRES mraa) REQUIRES mraa)

View File

@ -5,5 +5,6 @@ upm_mixed_module_init (NAME gp2y0a
CPP_HDR gp2y0a.hpp CPP_HDR gp2y0a.hpp
CPP_SRC gp2y0a.cxx CPP_SRC gp2y0a.cxx
FTI_SRC gp2y0a_fti.c FTI_SRC gp2y0a_fti.c
IFACE_HDR iProximity.hpp
CPP_WRAPS_C CPP_WRAPS_C
REQUIRES mraa) REQUIRES mraa)

View File

@ -2,14 +2,14 @@
%module (package="upm") htu21d %module (package="upm") htu21d
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
%apply int {mraa::Edge} %apply int {mraa::Edge}

View File

@ -2,4 +2,5 @@ set (libname "grovecollision")
set (libdescription "Collision Sensor") set (libdescription "Collision Sensor")
set (module_src ${libname}.cxx) set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp) set (module_hpp ${libname}.hpp)
set (module_iface iCollision.hpp)
upm_module_init(mraa) upm_module_init(mraa)

View File

@ -2,14 +2,14 @@
%module (package="upm") ehr %module (package="upm") ehr
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
%ignore beatISR; %ignore beatISR;

View File

@ -2,4 +2,5 @@ set (libname "groveemg")
set (libdescription "Electromyography (EMG) Sensor") set (libdescription "Electromyography (EMG) Sensor")
set (module_src ${libname}.cxx) set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp) set (module_hpp ${libname}.hpp)
set (module_iface iEmg.hpp)
upm_module_init(mraa) upm_module_init(mraa)

View File

@ -2,4 +2,5 @@ set (libname "grovegsr")
set (libdescription "Galvanic Skin Response (GSR) Sensor") set (libdescription "Galvanic Skin Response (GSR) Sensor")
set (module_src ${libname}.cxx) set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp) set (module_hpp ${libname}.hpp)
set (module_iface iEC.hpp)
upm_module_init(mraa) upm_module_init(mraa)

View File

@ -2,4 +2,5 @@ set (libname "grovelinefinder")
set (libdescription "Line Finder") set (libdescription "Line Finder")
set (module_src ${libname}.cxx) set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp) set (module_hpp ${libname}.hpp)
set (module_iface iLineFinder.hpp)
upm_module_init(mraa) upm_module_init(mraa)

View File

@ -2,4 +2,5 @@ set (libname "grovevdiv")
set (libdescription "Voltage Divider") set (libdescription "Voltage Divider")
set (module_src ${libname}.cxx) set (module_src ${libname}.cxx)
set (module_hpp ${libname}.hpp) set (module_hpp ${libname}.hpp)
set (module_iface iVDiv.hpp)
upm_module_init(mraa) upm_module_init(mraa)

View File

@ -5,4 +5,5 @@ upm_mixed_module_init (NAME gsr
CPP_HDR gsr.hpp CPP_HDR gsr.hpp
CPP_SRC gsr.cxx CPP_SRC gsr.cxx
FTI_SRC gsr_fti.c FTI_SRC gsr_fti.c
IFACE_HDR iEC.hpp
REQUIRES mraa) REQUIRES mraa)

View File

@ -2,7 +2,7 @@
%module (package="upm") h3lis331dl %module (package="upm") h3lis331dl
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -18,7 +18,7 @@
%ignore i2cContext; %ignore i2cContext;
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,14 +2,14 @@
%module (package="upm") hcsr04 %module (package="upm") hcsr04
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
JAVA_JNI_LOADLIBRARY(javaupm_hcsr04) JAVA_JNI_LOADLIBRARY(javaupm_hcsr04)

View File

@ -2,4 +2,4 @@ set (libname "hlg150h")
set (libdescription "150W Constant Voltage/current LED Driver") set (libdescription "150W Constant Voltage/current LED Driver")
set (module_src ${libname}.cxx mraa-utils.cxx) set (module_src ${libname}.cxx mraa-utils.cxx)
set (module_hpp ${libname}.hpp) set (module_hpp ${libname}.hpp)
upm_module_init(mraa interfaces) upm_module_init(mraa)

View File

@ -22,12 +22,12 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "interfaces/iLightController.hpp"
// #include "mraa/gpio.hpp" // #include "mraa/gpio.hpp"
#include "mraa/pwm.hpp" #include "mraa/pwm.hpp"
namespace upm namespace upm
{ {
#define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
/** /**
* @brief Meanwell HLG150H Lighting Power Supply Controller * @brief Meanwell HLG150H Lighting Power Supply Controller
@ -53,13 +53,13 @@ namespace upm
* @snippet hlg150h.cxx Interesting * @snippet hlg150h.cxx Interesting
*/ */
class HLG150H : public upm::ILightController class HLG150H
{ {
public: public:
HLG150H(int pinRelay, int pinPWM); HLG150H(int pinRelay, int pinPWM);
~HLG150H(); ~HLG150H();
virtual int getBrightness(); int getBrightness();
const char* getModuleName() { return "hlg150h"; } const char* getModuleName() { return "hlg150h"; }
void setPowerOn(); void setPowerOn();
void setPowerOff(); void setPowerOff();

View File

@ -4,8 +4,6 @@
#ifdef SWIGJAVA #ifdef SWIGJAVA
%include "arrays_java.i"; %include "arrays_java.i";
%include "../java_buffer.i" %include "../java_buffer.i"
%typemap(javaimports) SWIGTYPE %{import upm_interfaces.*;%}
%import "../interfaces/javaupm_iLightController.i"
JAVA_JNI_LOADLIBRARY(javaupm_hlg150h) JAVA_JNI_LOADLIBRARY(javaupm_hlg150h)
#endif #endif

View File

@ -2,14 +2,14 @@
%module (package="upm") htu21d %module (package="upm") htu21d
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
%ignore getHumidityData(float*, float*, float*); %ignore getHumidityData(float*, float*, float*);

View File

@ -2,14 +2,14 @@
%module (package="upm") hwxpxx %module (package="upm") hwxpxx
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
JAVA_JNI_LOADLIBRARY(javaupm_hwxpxx) JAVA_JNI_LOADLIBRARY(javaupm_hwxpxx)

View File

@ -2,14 +2,14 @@
%module (package="upm") htu21d %module (package="upm") htu21d
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
JAVA_JNI_LOADLIBRARY(javaupm_ims) JAVA_JNI_LOADLIBRARY(javaupm_ims)

View File

@ -1,22 +0,0 @@
set (libname "interfaces")
set (libdescription "CXX Interface Library")
set (module_src ${libname}.cxx)
upm_module_init()
# Add a PUBLIC include directory to the CMAKE src dir
target_include_directories (${libname} PUBLIC ${CMAKE_SOURCE_DIR}/src)
# Don't add the hpp files with upm_module_init, this allows
# them to be installed separately
set (module_hpp iADC.hpp
iCO2Sensor.hpp
iHumiditySensor.hpp
iLightController.hpp
iLightSensor.hpp
iModuleStatus.hpp
iPressureSensor.hpp
iTemperatureSensor.hpp)
# Install interfaces headers a bit differently
install (FILES ${module_hpp} DESTINATION include/upm/${libname}
COMPONENT ${CMAKE_PROJECT_NAME})

View File

@ -1,47 +0,0 @@
/*
* Author: Henry Bruce <henry.bruce@intel.com>
* Copyright (c) 2015 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include <stdint.h>
#include "iModuleStatus.hpp"
namespace upm
{
/**
* @brief Interface for ADC Sensors
*/
class IADC : virtual public IModuleStatus
{
public:
virtual unsigned int getResolutionInBits() = 0;
virtual unsigned int getNumInputs() = 0;
virtual uint16_t getRawValue(unsigned int input) = 0;
virtual float getVoltage(unsigned int input) = 0;
virtual ~IADC() {}
};
}

View File

@ -1,43 +0,0 @@
/*
* Author: Henry Bruce <henry.bruce@intel.com>
* Copyright (c) 2015 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include "iModuleStatus.hpp"
namespace upm
{
/**
* @brief Interface for CO Sensor
*/
class ICO2Sensor : virtual public IModuleStatus
{
public:
virtual uint16_t getPpm() = 0;
virtual ~ICO2Sensor() {}
};
}

View File

@ -1,42 +0,0 @@
/*
* Author: Henry Bruce <henry.bruce@intel.com>
* Copyright (c) 2015 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include "iModuleStatus.hpp"
namespace upm
{
/**
* @brief Interface for Humidity Sensors
*/
class IHumiditySensor : virtual public IModuleStatus
{
public:
virtual int getHumidityRelative () = 0;
virtual ~IHumiditySensor() {}
};
}

View File

@ -1,94 +0,0 @@
/*
* Author: Henry Bruce <henry.bruce@intel.com>
* Copyright (c) 2014 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include "iModuleStatus.hpp"
namespace upm
{
/**
* @brief ILightController Interface for Light Controllers
*/
/**
*
* @brief Interface for Light Controllers
* This interface is used to represent light controllers
* @snippet light-controllers.cxx Interesting
*/
class ILightController : virtual public IModuleStatus
{
public:
/**
* Turn on power
*
* @throws std::runtime_error
*/
virtual void setPowerOn() = 0;
/**
* Turn off power
*
* @throws std::runtime_error
*/
virtual void setPowerOff() = 0;
/**
* Get power state
*
* @return true if powered, false otherwise
*
* @throws std::runtime_error
*/
virtual bool isPowered() = 0;
/**
* Set brightness
*
* @param percent brightness as percentage
*
* @throws std::runtime_error
*/
virtual void setBrightness(int percent) = 0;
/**
* Get brightness
*
* @return brightness as percentage
*
* @throws std::runtime_error
*/
virtual int getBrightness() = 0;
virtual ~ILightController() {}
};
}

View File

@ -1,61 +0,0 @@
/*
* Author: Henry Bruce <henry.bruce@intel.com>
* Copyright (c) 2015 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include <stdint.h>
#include "iModuleStatus.hpp"
namespace upm
{
/**
* @brief ILightSensor Interface for Light Sensors
*/
/**
*
* @brief Interface for Light Sensors
* This interface is used to represent light sensors
* @snippet light-sensor.cxx Interesting
*/
class ILightSensor : virtual public IModuleStatus
{
public:
/**
* Get visible illuminance in Lux.
*
* @return double visible illuminance in Lux
*/
virtual double getVisibleLux() = 0;
virtual ~ILightSensor() {}
};
}

View File

@ -1,53 +0,0 @@
/*
* Author: Henry Bruce <henry.bruce@intel.com>
* Copyright (c) 2014 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include <stdexcept>
namespace upm
{
/**
* @brief Interface for Module Status. Sensor and Actuactor Interfaces Derive from this Interface.
*/
#define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
class IModuleStatus
{
public:
/**
* Returns name of module. This is the string in library name after libupm_
* @return name of module
*/
virtual const char* getModuleName() = 0;
virtual ~IModuleStatus() {}
};
}

View File

@ -1,44 +0,0 @@
/*
* Author: Henry Bruce <henry.bruce@intel.com>
* Copyright (c) 2014 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include <stdint.h>
#include "iModuleStatus.hpp"
namespace upm
{
/*
* @brief Interface for Pressue Sensors
*/
class IPressureSensor : virtual public IModuleStatus
{
public:
virtual int getPressurePa() = 0;
virtual ~IPressureSensor() {}
};
}

View File

@ -1,42 +0,0 @@
/*
* Author: Henry Bruce <henry.bruce@intel.com>
* Copyright (c) 2015 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include "iModuleStatus.hpp"
namespace upm
{
/**
* @brief Interface for Temperature Sensors
*/
class ITemperatureSensor : virtual public IModuleStatus
{
public:
virtual int getTemperatureCelsius () = 0;
virtual ~ITemperatureSensor() {}
};
}

View File

@ -1 +0,0 @@
#include "iLightSensor.hpp"

View File

@ -1,18 +0,0 @@
%include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA
%import "../_upm.i"
%include javaupm_iModuleStatus.i
%include javaupm_iADC.i
%include javaupm_iCO2Sensor.i
%include javaupm_iHumiditySensor.i
%include javaupm_iLightController.i
%include javaupm_iLightSensor.i
%include javaupm_iPressureSensor.i
%include javaupm_iTemperatureSensor.i
JAVA_JNI_LOADLIBRARY(javaupm_interfaces)
#endif
/* END Java syntax */

View File

@ -1,11 +0,0 @@
#if SWIG_VERSION >= 0x030009
%include <swiginterface.i>
%interface_impl(upm::IADC);
#endif
%include "interfaces.i"
%include "javaupm_iModuleStatus.i"
%include "iADC.hpp"
%{
#include "iADC.hpp"
%}

View File

@ -1,12 +0,0 @@
#if SWIG_VERSION >= 0x030009
%include <swiginterface.i>
%interface_impl(upm::ICO2Sensor);
#endif
%include "stdint.i"
%include "interfaces.i"
%include "javaupm_iModuleStatus.i"
%include "iCO2Sensor.hpp"
%{
#include "iCO2Sensor.hpp"
%}

View File

@ -1,11 +0,0 @@
#if SWIG_VERSION >= 0x030009
%include <swiginterface.i>
%interface_impl(upm::IHumiditySensor);
#endif
%include "interfaces.i"
%include "javaupm_iModuleStatus.i"
%include "iHumiditySensor.hpp"
%{
#include "iHumiditySensor.hpp"
%}

View File

@ -1,11 +0,0 @@
#if SWIG_VERSION >= 0x030009
%include <swiginterface.i>
%interface_impl(upm::ILightController);
#endif
%include "interfaces.i"
%include "javaupm_iModuleStatus.i"
%{
#include "iLightController.hpp"
%}
%include "iLightController.hpp"

View File

@ -1,11 +0,0 @@
#if SWIG_VERSION >= 0x030009
%include <swiginterface.i>
%interface_impl(upm::ILightSensor);
#endif
%include "interfaces.i"
%include "javaupm_iModuleStatus.i"
%include "iLightSensor.hpp"
%{
#include "iLightSensor.hpp"
%}

View File

@ -1,8 +0,0 @@
#if SWIG_VERSION >= 0x030009
%include <swiginterface.i>
%interface_impl(upm::IModuleStatus);
#endif
%include "iModuleStatus.hpp"
%{
#include "iModuleStatus.hpp"
%}

View File

@ -1,11 +0,0 @@
#if SWIG_VERSION >= 0x030009
%include <swiginterface.i>
%interface_impl(upm::IPressureSensor);
#endif
%include "interfaces.i"
%include "javaupm_iModuleStatus.i"
%include "iPressureSensor.hpp"
%{
#include "iPressureSensor.hpp"
%}

View File

@ -1,11 +0,0 @@
#if SWIG_VERSION >= 0x030009
%include <swiginterface.i>
%interface_impl(upm::ITemperatureSensor);
#endif
%include "interfaces.i"
%include "javaupm_iModuleStatus.i"
%include "iTemperatureSensor.hpp"
%{
#include "iTemperatureSensor.hpp"
%}

View File

@ -2,14 +2,14 @@
%module (package="upm") lidarlitev3 %module (package="upm") lidarlitev3
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
%} %}
JAVA_JNI_LOADLIBRARY(javaupm_lidarlitev3) JAVA_JNI_LOADLIBRARY(javaupm_lidarlitev3)

View File

@ -5,5 +5,6 @@ upm_mixed_module_init (NAME linefinder
CPP_HDR linefinder.hpp CPP_HDR linefinder.hpp
CPP_SRC linefinder.cxx CPP_SRC linefinder.cxx
FTI_SRC linefinder_fti.c FTI_SRC linefinder_fti.c
IFACE_HDR iLineFinder.hpp
CPP_WRAPS_C CPP_WRAPS_C
REQUIRES mraa) REQUIRES mraa)

View File

@ -2,7 +2,7 @@
%module (package="upm") lis2ds12 %module (package="upm") lis2ds12
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -12,7 +12,7 @@
#%ignore installISR(LIS2DS12_INTERRUPT_PINS_T , int , mraa::Edge, void *, void *); #%ignore installISR(LIS2DS12_INTERRUPT_PINS_T , int , mraa::Edge, void *, void *);
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,7 +2,7 @@
%module (package="upm") lis3dh %module (package="upm") lis3dh
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -16,7 +16,7 @@
%enddef %enddef
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,4 +2,4 @@ set (libname "lp8860")
set (libdescription "LED Lighting Controller") set (libdescription "LED Lighting Controller")
set (module_src ${libname}.cxx mraa-utils.cxx) set (module_src ${libname}.cxx mraa-utils.cxx)
set (module_hpp ${libname}.hpp) set (module_hpp ${libname}.hpp)
upm_module_init(mraa interfaces) upm_module_init(mraa)

View File

@ -22,11 +22,12 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "interfaces/iLightController.hpp"
#include "mraa/i2c.hpp" #include "mraa/i2c.hpp"
namespace upm namespace upm
{ {
#define UPM_THROW(msg) throw std::runtime_error(std::string(__FUNCTION__) + ": " + (msg))
/** /**
* @brief LP8860 LED Lighting Controller * @brief LP8860 LED Lighting Controller
* @defgroup lp8860 libupm-lp8860 * @defgroup lp8860 libupm-lp8860
@ -51,12 +52,12 @@ namespace upm
* *
* @snippet lp8860.cxx Interesting * @snippet lp8860.cxx Interesting
*/ */
class LP8860 : public upm::ILightController class LP8860
{ {
public: public:
LP8860(int gpioPower, int i2cBus); LP8860(int gpioPower, int i2cBus);
~LP8860(); ~LP8860();
virtual const char* getModuleName() { return "lp8860"; } const char* getModuleName() { return "lp8860"; }
bool isPowered(); bool isPowered();
void setPowerOn(); void setPowerOn();
void setPowerOff(); void setPowerOff();

View File

@ -2,9 +2,6 @@
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{import upm_interfaces.*;%}
%import "../interfaces/javaupm_iLightController.i"
JAVA_JNI_LOADLIBRARY(javaupm_lp8860) JAVA_JNI_LOADLIBRARY(javaupm_lp8860)
#endif #endif
/* END Java syntax */ /* END Java syntax */

View File

@ -2,7 +2,7 @@
%module (package="upm") lsm303agr %module (package="upm") lsm303agr
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -14,7 +14,7 @@
%ignore installISR(LSM303AGR_INTERRUPT_PINS_T , int , mraa::Edge , void *, void *); %ignore installISR(LSM303AGR_INTERRUPT_PINS_T , int , mraa::Edge , void *, void *);
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,7 +2,7 @@
%module (package="upm") lsm303d %module (package="upm") lsm303d
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -13,7 +13,7 @@
%ignore getAccelerometer(float *, float *, float *); %ignore getAccelerometer(float *, float *, float *);
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,14 +2,14 @@
%module (package="upm") lsm6ds3h %module (package="upm") lsm6ds3h
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,14 +2,14 @@
%module (package="upm") lsm6dsl %module (package="upm") lsm6dsl
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
/* BEGIN Java syntax ------------------------------------------------------- */ /* BEGIN Java syntax ------------------------------------------------------- */
#ifdef SWIGJAVA #ifdef SWIGJAVA
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

View File

@ -2,7 +2,7 @@
%module (package="upm") lsm9ds0 %module (package="upm") lsm9ds0
#endif #endif
%import "interfaces/new_interfaces.i" %import "interfaces/interfaces.i"
%include "../common_top.i" %include "../common_top.i"
@ -12,7 +12,7 @@
%include "../java_buffer.i" %include "../java_buffer.i"
%typemap(javaimports) SWIGTYPE %{ %typemap(javaimports) SWIGTYPE %{
import upm_new_interfaces.*; import upm_interfaces.*;
import java.util.AbstractList; import java.util.AbstractList;
import java.lang.Float; import java.lang.Float;

Some files were not shown because too many files have changed in this diff Show More