-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
06910d2
commit e41ef56
Showing
10 changed files
with
460 additions
and
6 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
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
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
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
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,35 @@ | ||
<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>inverter-growatt-hv-can</artifactId> | ||
|
||
<name>${project.artifactId}-${project.version}</name> | ||
<description>Module for the Growatt high voltage inverter 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>core-api</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
|
||
<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
...a/com/airepublic/bmstoinverter/inverter/growatthv/can/GrowattHVInverterCANDescriptor.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.inverter.growatthv.can; | ||
|
||
import com.airepublic.bmstoinverter.core.Inverter; | ||
import com.airepublic.bmstoinverter.core.InverterConfig; | ||
import com.airepublic.bmstoinverter.core.InverterDescriptor; | ||
import com.airepublic.bmstoinverter.core.Port; | ||
import com.airepublic.bmstoinverter.protocol.can.JavaCANPort; | ||
|
||
/** | ||
* The {@link InverterDescriptor} for the Growatt HV {@link Inverter} using the CAN protocol. | ||
*/ | ||
public class GrowattHVInverterCANDescriptor implements InverterDescriptor { | ||
@Override | ||
public String getName() { | ||
return "GROWATT_HV_CAN"; | ||
} | ||
|
||
|
||
@Override | ||
public int getDefaultBaudRate() { | ||
return 500000; | ||
} | ||
|
||
|
||
@Override | ||
public Class<? extends Inverter> getInverterClass() { | ||
return GrowattHVInverterCANProcessor.class; | ||
} | ||
|
||
|
||
@Override | ||
public Port createPort(final InverterConfig config) { | ||
final Port port = new JavaCANPort(config.getPortLocator(), config.getBaudRate()); | ||
return port; | ||
} | ||
|
||
} |
Oops, something went wrong.