Skip to content

Commit

Permalink
added LIA CAN BMS binding
Browse files Browse the repository at this point in the history
  • Loading branch information
ai-republic committed Nov 3, 2024
1 parent 59c708e commit c878412
Show file tree
Hide file tree
Showing 13 changed files with 482 additions and 3 deletions.
4 changes: 4 additions & 0 deletions bms-lia-can/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/target/
/.settings/
/.classpath
/.project
29 changes: 29 additions & 0 deletions bms-lia-can/pom.xml
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>
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;
}

}
Loading

0 comments on commit c878412

Please sign in to comment.