Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
silentrs committed Apr 19, 2021
0 parents commit f710696
Show file tree
Hide file tree
Showing 6 changed files with 652 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.example</groupId>
<artifactId>JPHP-SerialPort</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<!-- https://mvnrepository.com/artifact/com.fazecast/jSerialComm -->
<dependency>
<groupId>com.fazecast</groupId>
<artifactId>jSerialComm</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>

</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.develnext.jphp.ext.serialportextension;

import org.develnext.jphp.ext.serialportextension.classes.SerialPortWrapper;
import php.runtime.env.CompileScope;
import php.runtime.ext.support.Extension;

public class SerialPortExtension extends Extension {
public static final String NS = "php\\io";
@Override
public Status getStatus() {
return Status.EXPERIMENTAL;
}

@Override
public void onRegister(CompileScope compileScope) {
registerWrapperClass(compileScope, com.fazecast.jSerialComm.SerialPort.class, SerialPortWrapper.class);
}
}
Loading

0 comments on commit f710696

Please sign in to comment.