 In August, at the Intel Developer Forum in San Francisco, we presented a native mobile patient monitoring application for iPads, developed using the Intel Multi-OS Engine . The application provides data on the most important parameters of the patient's condition by connecting to the bedside monitors via a WiFi network (for more information about the application itself and its functionality, you can read on our website ).
 In August, at the Intel Developer Forum in San Francisco, we presented a native mobile patient monitoring application for iPads, developed using the Intel Multi-OS Engine . The application provides data on the most important parameters of the patient's condition by connecting to the bedside monitors via a WiFi network (for more information about the application itself and its functionality, you can read on our website ).Thread thread = new Thread() { public void run() { } }; thread.start(); private void openFileToRead() { String fileId = "hb"; NSBundle mainBundle = NSBundle.mainBundle(); String pathToFile = mainBundle.pathForResourceOfType(fileId, "dat"); File file = new File(pathToFile); FileInputStream fis = null; try { fis = new FileInputStream(file); DataInputStream dis = new DataInputStream(fis); //-   input stream } catch (IOException e) { e.printStackTrace(); } }  @Override @Selector("application:didFinishLaunchingWithOptions:") public boolean applicationDidFinishLaunchingWithOptions(UIApplication application, NSDictionary launchOptions) { performSelectorInBackgroundWithObject(new SEL("initQueueDispatcher"), null); return true; } @Selector("initQueueDispatcher") @Generated public void initQueueDispatcher() { QueueDispatcher.sharedQueueDispatcher().initQueue(); }  public void heartRate(PatientRealData data) { performSelectorOnMainThreadWithObjectWaitUntilDone(new SEL("updatePatientData:"), } @Selector("updatePatientData:") @Generated public void updatePatientData(PatientRealData data) { mHrLabel.setText(String.valueOf(data.getHeartRate())); }  UIImage image = UIImage.imageNamed("alarm_on"); mAlarmButton.setImageForState(image, UIControlState.Normal);  @com.intel.inde.moe.natj.general.ann.Runtime(ObjCRuntime.class) @ObjCClassName("PatientsTableVC") @RegisterOnStartup public class PatientsTableVC extends UITableViewController { static { NatJ.register(); } @Generated("NatJ") @Owned @Selector("alloc") public static native PatientsTableVC alloc(); @Generated("NatJ") @Owned @Selector("init") public native PatientsTableVC init(); @Generated("NatJ") protected PatientsTableVC(Pointer peer) { super(peer); } private ArrayList<PatientInfo> mPatients = new ArrayList<PatientInfo>(); @Selector("prefersStatusBarHidden") @Override public boolean prefersStatusBarHidden() { return true; } @Selector("viewDidLoad") @Override public void viewDidLoad() { setTitle("Select patient:"); } @Selector("numberOfSectionsInTableView:") @Override @NInt public long numberOfSectionsInTableView(UITableView tableView) { return 1; } @Selector("tableView:numberOfRowsInSection:") @Override @NInt public long tableViewNumberOfRowsInSection(UITableView tableView, long section) { return mPatients.size(); } @Selector("tableView:cellForRowAtIndexPath:") @Override public UITableViewCell tableViewCellForRowAtIndexPath(UITableView tableView, NSIndexPath indexPath) { String reusableId = "patientCell"; UITableViewCell cell = (UITableViewCell) tableView.dequeueReusableCellWithIdentifierForIndexPath(reusableId, indexPath); PatientInfo patient = mPatients.get((int) indexPath.row()); cell.textLabel().setText(patient.description()); return cell; } @Selector("prepareForSegue:sender:") @Generated public void prepareForSegueSender(UIStoryboardSegue segue, NSObject sender) { NSIndexPath indexPath = tableView().indexPathForSelectedRow(); PatientInfo patient = mPatients.get((int) indexPath.row()); MainMonitorVC controller = (MainMonitorVC) segue.destinationViewController(); controller.setPatient(patient); } } 
 UIWaveFormVC.h @interface UIWaveFormVC : GLKViewController @property (nonatomic, strong) DPSampleQueue * inputQueue; - (void)setDataQueue:(DPSampleQueue *) dataQueue; - (void)setWaveColor:(UIColor *)waveColor; - (void)setSampleFreq:(float)sampleFreq; UIWaveFormVC.m #import "UIWaveFormVC.h" @interface UIWaveFormVC () @property (strong, nonatomic) EAGLContext * context; @end - (void)setDataQueue:(DPSampleQueue *) dataQueue { self.inputQueue = dataQueue; } - (void)viewDidLoad { [super viewDidLoad]; self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; if (!self.context) NSLog(@"Failed to create ES context"); } - (void)glkView:(GLKView *)view drawInRect:(CGRect)rect { //     }  UIWaveFormVC.java @com.intel.inde.moe.natj.general.ann.Runtime(ObjCRuntime.class) @ObjCClassName("UIWaveFormVC") @RegisterOnStartup public class UIWaveFormVC extends GLKViewController { @Generated("NatJ") protected UIWaveFormVC(Pointer peer) { super(peer); } @Selector("setDataQueue:") @Generated public native void setDataQueue(DPSampleQueue dataQueue); @Selector("setWaveColor:") @Generated public native void setWaveColor(UIColor waveColor); @Selector("setSampleFreq:") @Generated public native void setSampleFreq(float sampleFreq); static { NatJ.register(); } }  @com.intel.inde.moe.natj.general.ann.Runtime(ObjCRuntime.class) @ObjCClassName("MainMonitorVC") @RegisterOnStartup public class MainMonitorVC extends UIViewController { static { NatJ.register(); } @Selector("alloc") public static native MainMonitorVC alloc(); @Selector("init") public native MainMonitorVC init(); @Generated("NatJ") protected MainMonitorVC(Pointer peer) { super(peer); } private QueueDispatcher mQueueDispatcher = null; @Selector("prepareForSegue:sender:") @Generated public void prepareForSegueSender(UIStoryboardSegue segue, NSObject sender) { if (segue.identifier() == null) return; UIWaveFormVC controller = (UIWaveFormVC) (segue.destinationViewController()); controller.setDataQueue(sharedQueueDispatcher().queueWithID(segue.identifier())); controller.setSampleFreq(SAMPLE_FREQ); controller.setWaveColor(WAVE_GREEN); } private QueueDispatcher sharedQueueDispatcher() { if (mQueueDispatcher == null) { mQueueDispatcher = QueueDispatcher.sharedQueueDispatcher(); mQueueDispatcher.startDataLoading(); } return mQueueDispatcher; } }  -keepattributes *Annotation* -keep class retrofit.** { *; } -keepclasseswithmembers class * { @retrofit.http.* <methods>; } -keepattributes Signature Source: https://habr.com/ru/post/275305/
All Articles