-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59c708e
commit c878412
Showing
13 changed files
with
482 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/target/ | ||
/.settings/ | ||
/.classpath | ||
/.project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.ai-republic.bms-to-inverter</groupId> | ||
<artifactId>bms-to-inverter-parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>bms-lia-can</artifactId> | ||
|
||
<name>${project.artifactId}-${project.version}</name> | ||
<description>Module for the LIA BMS CAN support</description> | ||
|
||
<properties> | ||
<encoding>UTF-8</encoding> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.ai-republic.bms-to-inverter</groupId> | ||
<artifactId>protocol-can</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
47 changes: 47 additions & 0 deletions
47
bms-lia-can/src/main/java/com/airepublic/bmstoinverter/bms/lia/can/LiaBmsCANDescriptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* This software is free to use and to distribute in its unchanged form for private use. | ||
* Commercial use is prohibited without an explicit license agreement of the copyright holder. | ||
* Any changes to this software must be made solely in the project repository at https://github.com/ai-republic/bms-to-inverter. | ||
* The copyright holder is not liable for any damages in whatever form that may occur by using this software. | ||
* | ||
* (c) Copyright 2022 and onwards - Torsten Oltmanns | ||
* | ||
* @author Torsten Oltmanns - bms-to-inverter''AT''gmail.com | ||
*/ | ||
package com.airepublic.bmstoinverter.bms.lia.can; | ||
|
||
import com.airepublic.bmstoinverter.core.BMS; | ||
import com.airepublic.bmstoinverter.core.BMSConfig; | ||
import com.airepublic.bmstoinverter.core.BMSDescriptor; | ||
import com.airepublic.bmstoinverter.core.Port; | ||
import com.airepublic.bmstoinverter.protocol.can.JavaCANPort; | ||
|
||
/** | ||
* The {@link BMSDescriptor} for the Pace BMS using the CAN protocol. | ||
*/ | ||
public class LiaBmsCANDescriptor implements BMSDescriptor { | ||
@Override | ||
public String getName() { | ||
return "LIA_CAN"; | ||
} | ||
|
||
|
||
@Override | ||
public int getDefaultBaudRate() { | ||
return 500000; | ||
} | ||
|
||
|
||
@Override | ||
public Class<? extends BMS> getBMSClass() { | ||
return LiaBmsCANProcessor.class; | ||
} | ||
|
||
|
||
@Override | ||
public Port createPort(final BMSConfig config) { | ||
final Port port = new JavaCANPort(config.getPortLocator(), config.getBaudRate()); | ||
return port; | ||
} | ||
|
||
} |
Oops, something went wrong.