9 |
10 |
--------------------------------------------------------------------------------
/DesignMockups/9dots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/DesignMockups/9dots.png
--------------------------------------------------------------------------------
/DesignMockups/9dotsBlue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/DesignMockups/9dotsBlue.png
--------------------------------------------------------------------------------
/DesignMockups/detailsPage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/DesignMockups/detailsPage.png
--------------------------------------------------------------------------------
/DesignMockups/layoutPage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/DesignMockups/layoutPage.png
--------------------------------------------------------------------------------
/DesignMockups/masterPage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/DesignMockups/masterPage.png
--------------------------------------------------------------------------------
/DesignMockups/masterPageLight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/DesignMockups/masterPageLight.png
--------------------------------------------------------------------------------
/DesignMockups/rosLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/DesignMockups/rosLogo.png
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/release/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/app/release/app-release.apk
--------------------------------------------------------------------------------
/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "com.schneewittchen.rosandroid",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "versionCode": 7,
14 | "versionName": "2.1.0",
15 | "outputFile": "app-release.apk"
16 | }
17 | ]
18 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
21 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/db/BaseDao.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.db;
2 |
3 | import androidx.room.Delete;
4 | import androidx.room.Insert;
5 | import androidx.room.OnConflictStrategy;
6 | import androidx.room.Update;
7 |
8 | /**
9 | * TODO: Description
10 | *
11 | * @author Nico Studt
12 | * @version 1.0.0
13 | * @created on 31.01.20
14 | * @updated on 31.01.20
15 | * @modified by
16 | */
17 | public interface BaseDao {
18 |
19 | @Insert(onConflict = OnConflictStrategy.REPLACE)
20 | long insert(T obj);
21 |
22 | @Update(onConflict = OnConflictStrategy.REPLACE)
23 | void update(T obj);
24 |
25 | @Delete
26 | int delete(T obj);
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/db/ConfigDao.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.db;
2 |
3 | import androidx.lifecycle.LiveData;
4 | import androidx.room.Dao;
5 | import androidx.room.Query;
6 |
7 | import com.schneewittchen.rosandroid.model.entities.ConfigEntity;
8 |
9 | import java.util.List;
10 |
11 |
12 | /**
13 | * TODO: Description
14 | *
15 | * @author Nico Studt
16 | * @version 1.1
17 | * @created on 31.01.20
18 | * @updated on 04.06.20
19 | * @modified by Nils Rottmann
20 | * @updated on 27.07.20
21 | * @modified by Nils Rottmann
22 | * @updated on 23.09.20
23 | * @modified by Nico Studt
24 | */
25 | @Dao
26 | public abstract class ConfigDao implements BaseDao{
27 |
28 | static final String TAG = ConfigDao.class.getCanonicalName();
29 |
30 |
31 | @Query("SELECT * FROM config_table")
32 | abstract LiveData> getAllConfigs();
33 |
34 | @Query("SELECT * FROM config_table where id = :id")
35 | abstract LiveData getConfig(long id);
36 |
37 | @Query("SELECT * FROM config_table ORDER BY creationTime DESC LIMIT 1")
38 | abstract LiveData getLatestConfig();
39 |
40 | @Query("SELECT * FROM config_table ORDER BY creationTime DESC LIMIT 1")
41 | abstract ConfigEntity getLatestConfigDirect();
42 |
43 | @Query("DELETE FROM config_table where id = :id")
44 | abstract void removeConfig(long id);
45 |
46 | @Query("DELETE FROM config_table")
47 | abstract void deleteAll();
48 |
49 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/db/MasterDao.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.db;
2 |
3 | import androidx.lifecycle.LiveData;
4 | import androidx.room.Dao;
5 | import androidx.room.Query;
6 |
7 | import com.schneewittchen.rosandroid.model.entities.MasterEntity;
8 |
9 |
10 | /**
11 | * TODO: Description
12 | *
13 | * @author Nico Studt
14 | * @version 1.0.1
15 | * @created on 31.01.20
16 | * @updated on 01.10.20
17 | * @modified by Nico Studt
18 | */
19 | @Dao
20 | public abstract class MasterDao implements BaseDao{
21 |
22 | @Query("SELECT * FROM master_table WHERE configId = :configId LIMIT 1")
23 | abstract LiveData getMaster(long configId);
24 |
25 | @Query("DELETE FROM master_table WHERE configId = :configId")
26 | abstract void delete(long configId);
27 |
28 | @Query("DELETE FROM master_table")
29 | abstract void deleteAll();
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/db/SSHDao.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.db;
2 |
3 | import androidx.lifecycle.LiveData;
4 | import androidx.room.Dao;
5 | import androidx.room.Query;
6 |
7 | import com.schneewittchen.rosandroid.model.entities.SSHEntity;
8 |
9 |
10 | /**
11 | * TODO: Description
12 | *
13 | * @author Nils Rottmann
14 | * @version 1.0.1
15 | * @created on 04.06.20
16 | * @updated on 01.10.20
17 | * @modified by Nico Studt
18 | */
19 | @Dao
20 | public abstract class SSHDao implements BaseDao{
21 |
22 | @Query("SELECT * FROM ssh_table WHERE configId = :configId LIMIT 1")
23 | abstract LiveData getSSH(long configId);
24 |
25 | @Query("DELETE FROM ssh_table WHERE configId = :configId")
26 | abstract void delete(long configId);
27 |
28 | @Query("DELETE FROM ssh_table")
29 | abstract void deleteAll();
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/ConfigEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities;
2 |
3 | import androidx.room.Entity;
4 | import androidx.room.PrimaryKey;
5 |
6 |
7 | /**
8 | * TODO: Description
9 | *
10 | * @author Nico Studt
11 | * @version 1.0.2
12 | * @created on 30.01.20
13 | * @updated on 04.06.20
14 | * @modified by Nils Rottmann
15 | * @updated on 27.07.20
16 | * @modified by Nils Rottmann
17 | * @updated on 01.10.20
18 | * @modified by Nico Studt
19 | */
20 | @Entity(tableName = "config_table")
21 | public class ConfigEntity {
22 |
23 | @PrimaryKey(autoGenerate = true)
24 | public long id;
25 |
26 | public long creationTime;
27 | public long lastUsed;
28 | public String name = "DefaultName";
29 | public boolean isFavourite;
30 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/MasterEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities;
2 |
3 | import androidx.room.Entity;
4 | import androidx.room.PrimaryKey;
5 |
6 |
7 | /**
8 | * TODO: Description
9 | *
10 | * @author Nico Studt
11 | * @version 1.0.1
12 | * @created on 30.01.20
13 | * @updated on 31.01.20
14 | * @modified by
15 | */
16 | @Entity(tableName = "master_table")
17 | public class MasterEntity {
18 |
19 | @PrimaryKey(autoGenerate = true)
20 | public long id;
21 |
22 | public long configId;
23 | public String ip = "192.168.0.0";
24 | public int port = 11311;
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/SSHEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities;
2 |
3 | import androidx.room.Entity;
4 | import androidx.room.PrimaryKey;
5 |
6 |
7 | /**
8 | * TODO: Description
9 | *
10 | * @author Nils Rottmann
11 | * @version 1.0.0
12 | * @created on 04.06.20
13 | */
14 |
15 | @Entity(tableName = "ssh_table")
16 | public class SSHEntity {
17 |
18 | @PrimaryKey(autoGenerate = true)
19 | public long id;
20 |
21 | public long configId;
22 | public String ip = "192.168.1.1";
23 | public int port = 22;
24 | public String username = "pi";
25 | public String password = "raspberry";
26 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/WidgetCountEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.room.ColumnInfo;
5 | import androidx.room.Embedded;
6 | import androidx.room.Entity;
7 | import androidx.room.PrimaryKey;
8 |
9 |
10 | /**
11 | * TODO: Description
12 | *
13 | * @author Nico Studt
14 | * @version 1.0.0
15 | * @created on 26.07.20
16 | * @updated on 27.07.20
17 | * @modified by Nils Rottmann
18 | */
19 | @Entity(tableName = "widget_count_table")
20 | public class WidgetCountEntity {
21 |
22 | @PrimaryKey(autoGenerate = true)
23 | public long id;
24 |
25 | @ColumnInfo(name = "widget_config_id")
26 | @NonNull
27 | public long configId;
28 |
29 | @ColumnInfo(name = "widget_type")
30 | public String type;
31 |
32 | @ColumnInfo(name = "widget_count")
33 | public long count;
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/WidgetStorageData.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities;
2 |
3 | import androidx.annotation.NonNull;
4 | import androidx.room.ColumnInfo;
5 | import androidx.room.Entity;
6 | import androidx.room.PrimaryKey;
7 |
8 | /**
9 | * TODO: Description
10 | *
11 | * Replaced version of Base Entity.
12 | *
13 | * @author Nico Studt
14 | * @version 1.0.0
15 | * @created on 23.09.20
16 | * @updated on
17 | * @modified by
18 | */
19 |
20 | @Entity(tableName = "widget_table")
21 | public class WidgetStorageData {
22 |
23 | @PrimaryKey(autoGenerate = true)
24 | public long id;
25 |
26 | @ColumnInfo(name = "type_name")
27 | @NonNull
28 | public String typeName;
29 |
30 | @ColumnInfo(name = "widget_config_id")
31 | @NonNull
32 | public long configId;
33 |
34 | @ColumnInfo(name = "data")
35 | @NonNull
36 | public String data;
37 |
38 | @ColumnInfo(name = "name")
39 | @NonNull
40 | public String name;
41 | }
42 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/GroupEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 | import com.schneewittchen.rosandroid.ui.general.Position;
4 |
5 | /**
6 | * TODO: Description
7 | *
8 | * @author Nico Studt
9 | * @version 1.0.0
10 | * @created on 10.03.21
11 | * @updated on
12 | * @modified by
13 | */
14 | public class GroupEntity extends BaseEntity
15 | implements IPositionEntity,
16 | ISubscriberEntity,
17 | IPublisherEntity{
18 |
19 | public int posX;
20 | public int posY;
21 | public int width;
22 | public int height;
23 |
24 | @Override
25 | public Position getPosition() {
26 | return new Position(posX, posY, width, height);
27 | }
28 |
29 | @Override
30 | public void setPosition(Position position) {
31 | this.posX = position.x;
32 | this.posY = position.y;
33 | this.width = position.width;
34 | this.height = position.height;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/I2DLayerEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 |
4 | /**
5 | * Entity witch indicates layer characteristics to be able to display it
6 | * in a 2D view as a layer widget.
7 | *
8 | * @author Nico Studt
9 | * @version 1.0.0
10 | * @created on 10.03.21
11 | */
12 | public interface I2DLayerEntity { }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/IPositionEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 | import com.schneewittchen.rosandroid.ui.general.Position;
4 |
5 | /**
6 | * Entity with positional information to be able to display it
7 | * in the visualisation view as a stand-alone widget.
8 | *
9 | * @author Nico Studt
10 | * @version 1.0.0
11 | * @created on 10.03.21
12 | */
13 | public interface IPositionEntity {
14 |
15 | Position getPosition();
16 | void setPosition(Position position);
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/IPublisherEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 | /**
4 | * Entity with publisher information to be able
5 | * to create a appropriate publisher node in the ROS-network.
6 | *
7 | * @author Nico Studt
8 | * @version 1.0.0
9 | * @created on 10.03.21
10 | */
11 | public interface IPublisherEntity {
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/ISilentEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 | /**
4 | * Silent entity which does not interfere in any way with the ROS structure.
5 | *
6 | * @author Nico Studt
7 | * @version 1.0.0
8 | * @created on 01.04.21
9 | */
10 | public interface ISilentEntity { }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/ISubscriberEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 | /**
4 | * Entity with subscriber information to be able
5 | * to create a appropriate subscriber node in the ROS-network.
6 | *
7 | * @author Nico Studt
8 | * @version 1.0.0
9 | * @created on 10.03.21
10 | */
11 | public interface ISubscriberEntity {
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/PublisherLayerEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 |
4 | /**
5 | * TODO: Description
6 | *
7 | * @author Nico Studt
8 | * @version 1.0.0
9 | * @created on 24.09.20
10 | */
11 | public abstract class PublisherLayerEntity extends BaseEntity
12 | implements I2DLayerEntity, IPublisherEntity {
13 |
14 | public float publishRate = 1f;
15 | public boolean immediatePublish = false;
16 |
17 |
18 | @Override
19 | public boolean equalRosState(BaseEntity other) {
20 | if (!super.equalRosState(other)) {
21 | return false;
22 | }
23 |
24 | if (!(other instanceof PublisherLayerEntity)) {
25 | return false;
26 | }
27 |
28 | PublisherLayerEntity otherPub = (PublisherLayerEntity) other;
29 |
30 | return this.publishRate == otherPub.publishRate
31 | && this.immediatePublish == otherPub.immediatePublish;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/PublisherWidgetEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 |
4 | import com.schneewittchen.rosandroid.ui.general.Position;
5 |
6 | /**
7 | * TODO: Description
8 | *
9 | * @author Nico Studt
10 | * @version 1.0.0
11 | * @created on 24.09.20
12 | */
13 | public abstract class PublisherWidgetEntity
14 | extends BaseEntity
15 | implements IPositionEntity, IPublisherEntity{
16 |
17 | public float publishRate = 1f;
18 | public boolean immediatePublish = false;
19 | public int posX;
20 | public int posY;
21 | public int width;
22 | public int height;
23 |
24 |
25 | @Override
26 | public boolean equalRosState(BaseEntity other) {
27 | if (!super.equalRosState(other)) {
28 | return false;
29 | }
30 |
31 | if (!(other instanceof PublisherWidgetEntity)) {
32 | return false;
33 | }
34 |
35 | PublisherWidgetEntity otherPub = (PublisherWidgetEntity) other;
36 |
37 | return this.publishRate == otherPub.publishRate
38 | && this.immediatePublish == otherPub.immediatePublish;
39 | }
40 |
41 | @Override
42 | public Position getPosition() {
43 | return new Position(posX, posY, width, height);
44 | }
45 |
46 | @Override
47 | public void setPosition(Position position) {
48 | this.posX = position.x;
49 | this.posY = position.y;
50 | this.width = position.width;
51 | this.height = position.height;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/SilentLayerEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 | /**
4 | * TODO: Description
5 | *
6 | * @author Nico Studt
7 | * @version 1.0.0
8 | * @created on 05.04.21
9 | */
10 | public abstract class SilentLayerEntity extends BaseEntity implements ISilentEntity, I2DLayerEntity {
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/SilentWidgetEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 | import com.schneewittchen.rosandroid.ui.general.Position;
4 |
5 | /**
6 | * TODO: Description
7 | *
8 | * @author Nico Studt
9 | * @version 1.0.0
10 | * @created on 24.09.20
11 | */
12 | public abstract class SilentWidgetEntity extends BaseEntity implements ISilentEntity, IPositionEntity {
13 |
14 | public int posX;
15 | public int posY;
16 | public int width;
17 | public int height;
18 |
19 |
20 | @Override
21 | public Position getPosition() {
22 | return new Position(posX, posY, width, height);
23 | }
24 |
25 | @Override
26 | public void setPosition(Position position) {
27 | this.posX = position.x;
28 | this.posY = position.y;
29 | this.width = position.width;
30 | this.height = position.height;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/SubscriberLayerEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 | /**
4 | * TODO: Description
5 | *
6 | * @author Nico Studt
7 | * @version 1.0.0
8 | * @created on 24.09.20
9 | */
10 | public abstract class SubscriberLayerEntity
11 | extends BaseEntity
12 | implements I2DLayerEntity, ISubscriberEntity{
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/entities/widgets/SubscriberWidgetEntity.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.entities.widgets;
2 |
3 | import com.schneewittchen.rosandroid.ui.general.Position;
4 |
5 | /**
6 | * TODO: Description
7 | *
8 | * @author Nico Studt
9 | * @version 1.0.0
10 | * @created on 24.09.20
11 | */
12 | public abstract class SubscriberWidgetEntity
13 | extends BaseEntity
14 | implements ISubscriberEntity, IPositionEntity{
15 |
16 | public int posX;
17 | public int posY;
18 | public int width;
19 | public int height;
20 |
21 |
22 | @Override
23 | public Position getPosition() {
24 | return new Position(posX, posY, width, height);
25 | }
26 |
27 | @Override
28 | public void setPosition(Position position) {
29 | this.posX = position.x;
30 | this.posY = position.y;
31 | this.width = position.width;
32 | this.height = position.height;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/SshRepository.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories;
2 |
3 | import androidx.lifecycle.LiveData;
4 |
5 | import com.schneewittchen.rosandroid.model.entities.SSHEntity;
6 |
7 |
8 | /**
9 | * TODO: Description
10 | *
11 | * @author Nils Rottmann
12 | * @version 1.0.0
13 | * @created on 04.06.20
14 | * @updated on
15 | * @modified by
16 | */
17 |
18 | public interface SshRepository {
19 |
20 | void startSession();
21 |
22 | void stopSession();
23 |
24 | LiveData isConnected();
25 |
26 | void sendMessage(String message);
27 |
28 | void abort();
29 |
30 | LiveData getOutputData();
31 |
32 | void updateSSH(SSHEntity ssh);
33 |
34 | LiveData getCurrentSSH();
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/TransformProvider.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories.rosRepo;
2 |
3 | import org.ros.rosjava_geometry.FrameTransformTree;
4 |
5 | /**
6 | * TODO: Description
7 | *
8 | * @author Nico Studt
9 | * @version 1.0.0
10 | * @created on 20.05.21
11 | */
12 | public class TransformProvider {
13 |
14 | private static TransformProvider instance;
15 |
16 | private FrameTransformTree frameTransformTree;
17 |
18 |
19 | public TransformProvider() {
20 | this.reset();
21 | }
22 |
23 |
24 | public static TransformProvider getInstance() {
25 | if (instance == null) {
26 | instance = new TransformProvider();
27 | }
28 |
29 | return instance;
30 | }
31 |
32 | public FrameTransformTree getTree() {
33 | return frameTransformTree;
34 | }
35 |
36 | public void reset() {
37 | this.frameTransformTree = new FrameTransformTree();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/connection/ConnectionCheckTask.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories.rosRepo.connection;
2 |
3 | import android.os.AsyncTask;
4 |
5 | import com.schneewittchen.rosandroid.model.entities.MasterEntity;
6 | import com.schneewittchen.rosandroid.utility.Utils;
7 |
8 | /**
9 | * TODO: Description
10 | *
11 | * @author Nico Studt
12 | * @version 1.0.1
13 | * @created on 15.04.20
14 | * @updated on 16.04.20
15 | * @modified by
16 | */
17 | public class ConnectionCheckTask extends AsyncTask {
18 |
19 | private static final int TIMEOUT_TIME = 2 * 1000;
20 |
21 | private final ConnectionListener listener;
22 |
23 | public ConnectionCheckTask(ConnectionListener listener) {
24 | this.listener = listener;
25 | }
26 |
27 | @Override
28 | protected Boolean doInBackground(MasterEntity... masterEnts) {
29 | MasterEntity masterEnt = masterEnts[0];
30 | return Utils.isHostAvailable(masterEnt.ip, masterEnt.port, TIMEOUT_TIME);
31 | }
32 |
33 | @Override
34 | protected void onPostExecute(Boolean success) {
35 | if (success)
36 | listener.onSuccess();
37 | else
38 | listener.onFailed();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/connection/ConnectionListener.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories.rosRepo.connection;
2 |
3 | /**
4 | * TODO: Description
5 | *
6 | * @author Nico Studt
7 | * @version 1.0.0
8 | * @created on 16.04.20
9 | * @updated on 16.04.20
10 | * @modified by
11 | */
12 | public interface ConnectionListener {
13 |
14 | void onSuccess();
15 | void onFailed();
16 |
17 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/connection/ConnectionType.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories.rosRepo.connection;
2 |
3 | /**
4 | * TODO: Description
5 | *
6 | * @author Nico Studt
7 | * @version 1.0.0
8 | * @created on 15.04.20
9 | * @updated on 15.04.20
10 | * @modified by
11 | */
12 | public enum ConnectionType {DISCONNECTED, PENDING, CONNECTED, FAILED}
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/message/RosData.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories.rosRepo.message;
2 |
3 | import org.ros.internal.message.Message;
4 |
5 | /**
6 | * TODO: Description
7 | *
8 | * @author Nico Studt
9 | * @version 1.0.0
10 | * @created on 21.09.20
11 | * @updated on
12 | * @modified by
13 | */
14 | public class RosData {
15 |
16 | private final Topic topic;
17 | private final Message message;
18 |
19 |
20 | public RosData(Topic topic, Message message) {
21 | this.topic = topic;
22 | this.message = message;
23 | }
24 |
25 |
26 | public Topic getTopic() {
27 | return this.topic;
28 | }
29 |
30 | public Message getMessage() {
31 | return this.message;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/message/Topic.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories.rosRepo.message;
2 |
3 |
4 | /**
5 | * ROS topic class for subscriber/publisher nodes.
6 | *
7 | * @author Nico Studt
8 | * @version 1.0.0
9 | * @created on 15.09.2020
10 | */
11 | public class Topic {
12 |
13 | /**
14 | * Topic name e.g. '/map'
15 | */
16 | public String name = "";
17 |
18 | /**
19 | * Type of the topic e.g. 'nav_msgs.OccupancyGrid'
20 | */
21 | public String type = "";
22 |
23 |
24 | public Topic(String name, String type) {
25 | this.name = name;
26 | this.type = type;
27 | }
28 |
29 | public Topic(Topic other) {
30 | if (other == null) {
31 | return;
32 | }
33 |
34 | this.name = other.name;
35 | this.type = other.type;
36 | }
37 |
38 |
39 | @Override
40 | public boolean equals(Object object) {
41 | if (object == this) {
42 | return true;
43 |
44 | } else if (object.getClass() != this.getClass()) {
45 | return false;
46 | }
47 |
48 | Topic other = (Topic) object;
49 |
50 | return other.name.equals(name) && other.type.equals(type);
51 | }
52 |
53 | @Override
54 | public int hashCode() {
55 | return name.hashCode() + 31 * type.hashCode();
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/node/AbstractNode.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories.rosRepo.node;
2 |
3 | import android.util.Log;
4 |
5 | import com.schneewittchen.rosandroid.model.repositories.rosRepo.message.Topic;
6 | import com.schneewittchen.rosandroid.model.entities.widgets.BaseEntity;
7 |
8 | import org.ros.namespace.GraphName;
9 | import org.ros.node.ConnectedNode;
10 | import org.ros.node.Node;
11 | import org.ros.node.NodeMain;
12 |
13 |
14 | /**
15 | * TODO: Description
16 | *
17 | * @author Nico Studt
18 | * @version 1.0.0
19 | * @created on 15.09.20
20 | */
21 | public class AbstractNode implements NodeMain {
22 |
23 | public static final String TAG = AbstractNode.class.getSimpleName();
24 |
25 | protected Topic topic;
26 | protected BaseEntity widget;
27 |
28 |
29 | @Override
30 | public void onStart(ConnectedNode parentNode) {
31 | Log.i(TAG, "On Start: " + topic.name);
32 | }
33 |
34 | @Override
35 | public void onShutdown(Node node) {
36 | Log.i(TAG, "On Shutdown: " + topic.name);
37 | }
38 |
39 | @Override
40 | public void onShutdownComplete(Node node) {
41 | Log.i(TAG, "On Shutdown Complete: " + topic.name);
42 | }
43 |
44 | @Override
45 | public void onError(Node node, Throwable throwable) {
46 | throwable.printStackTrace();
47 | }
48 |
49 | @Override
50 | public GraphName getDefaultNodeName() {
51 | return GraphName.of(topic.name);
52 | }
53 |
54 |
55 | public Topic getTopic() {
56 | return this.topic;
57 | }
58 |
59 | public void setTopic(Topic topic) {
60 | this.topic = topic;
61 | }
62 |
63 | public void setWidget(BaseEntity widget) {
64 | this.widget = widget;
65 | this.setTopic(widget.topic);
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/node/BaseData.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories.rosRepo.node;
2 |
3 | import com.schneewittchen.rosandroid.model.repositories.rosRepo.message.Topic;
4 | import com.schneewittchen.rosandroid.model.entities.widgets.BaseEntity;
5 |
6 | import org.ros.internal.message.Message;
7 | import org.ros.node.topic.Publisher;
8 |
9 |
10 | public abstract class BaseData {
11 |
12 | protected Topic topic;
13 |
14 |
15 | public void setTopic(Topic topic) {
16 | this.topic = topic;
17 | }
18 |
19 | public Topic getTopic() {
20 | return this.topic;
21 | }
22 |
23 | public Message toRosMessage(Publisher publisher, BaseEntity widget){
24 | return null;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/node/NodeMainExecutorServiceListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package com.schneewittchen.rosandroid.model.repositories.rosRepo.node;
18 |
19 | /**
20 | * TODO: Description
21 | *
22 | * @author Damon Kohler
23 | * @version 1.0.0
24 | * @created on 15.04.20
25 | * @updated on 15.04.20
26 | * @modified by Nico Studt
27 | */
28 | public interface NodeMainExecutorServiceListener {
29 |
30 | /**
31 | * @param nodeMainExecutorService the {@link NodeMainExecutorService} that was shut down
32 | */
33 | void onShutdown(NodeMainExecutorService nodeMainExecutorService);
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/model/repositories/rosRepo/node/SubNode.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.model.repositories.rosRepo.node;
2 |
3 | import com.schneewittchen.rosandroid.model.repositories.rosRepo.message.RosData;
4 |
5 | import org.ros.internal.message.Message;
6 | import org.ros.node.ConnectedNode;
7 | import org.ros.node.topic.Subscriber;
8 |
9 |
10 | /**
11 | * TODO: Description
12 | *
13 | * @author Nico Studt
14 | * @version 1.0.0
15 | * @created on 16.09.20
16 | */
17 | public class SubNode extends AbstractNode {
18 |
19 | private final NodeListener listener;
20 |
21 |
22 | public SubNode(NodeListener listener) {
23 | this.listener = listener;
24 | }
25 |
26 |
27 | @Override
28 | public void onStart(ConnectedNode parentNode) {
29 | super.onStart(parentNode);
30 |
31 | try {
32 | if (this.widget != null) {
33 | this.widget.validMessage = true;
34 | }
35 |
36 | Subscriber extends Message> subscriber = parentNode.newSubscriber(topic.name, topic.type);
37 |
38 | subscriber.addMessageListener(data -> {
39 | listener.onNewMessage(new RosData(topic, data));
40 | });
41 |
42 | } catch(Exception e) {
43 | if (this.widget != null) {
44 | this.widget.validMessage = false;
45 | }
46 | e.printStackTrace();
47 | }
48 |
49 | }
50 |
51 | public interface NodeListener {
52 | void onNewMessage(RosData message);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/fragments/config/CustumLinearLayoutManager.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.ui.fragments.config;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.recyclerview.widget.LinearLayoutManager;
6 |
7 |
8 | /**
9 | * TODO: Description
10 | *
11 | * @author Nico Studt
12 | * @version 1.0.0
13 | * @created on 05.02.20
14 | * @updated on 05.02.20
15 | * @modified by
16 | */
17 | public class CustumLinearLayoutManager extends LinearLayoutManager {
18 |
19 | private boolean isScrollEnabled = false;
20 |
21 |
22 | public CustumLinearLayoutManager(Context context) {
23 | super(context);
24 | }
25 |
26 |
27 | public void setScrollEnabled(boolean flag) {
28 | this.isScrollEnabled = flag;
29 | }
30 |
31 | @Override
32 | public boolean canScrollVertically() {
33 | //Similarly you can customize "canScrollHorizontally()" for managing horizontal scroll
34 | return isScrollEnabled && super.canScrollVertically();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/fragments/config/RecyclerViewItemClickListener.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.ui.fragments.config;
2 |
3 | import android.view.View;
4 |
5 | import androidx.recyclerview.widget.RecyclerView;
6 |
7 |
8 | /**
9 | * TODO: Description
10 | *
11 | * @author Nico Studt
12 | * @version 1.0.0
13 | * @created on 05.02.20
14 | * @updated on 05.02.20
15 | * @modified by
16 | */
17 | public interface RecyclerViewItemClickListener {
18 |
19 | void onClick(RecyclerView parent, View view, int position);
20 |
21 | //void onLongClick(View view, int position);
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/fragments/intro/ScreenItem.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.ui.fragments.intro;
2 |
3 | /**
4 | * TODO: Description
5 | *
6 | * @author Nils Rottmann
7 | * @version 1.0.0
8 | * @created on 19.06.20
9 | * @updated on
10 | * @modified by
11 | */
12 |
13 | public class ScreenItem {
14 |
15 | String title, description;
16 | int screenImage;
17 |
18 |
19 | public ScreenItem(String title, String description, int screenImage) {
20 | this.title = title;
21 | this.description = description;
22 | this.screenImage = screenImage;
23 | }
24 |
25 |
26 | public void setTitle(String title) {
27 | this.title = title;
28 | }
29 |
30 | public void setDescription(String description) {
31 | this.description = description;
32 | }
33 |
34 | public void setScreenImage(int screenImage) {
35 | this.screenImage = screenImage;
36 | }
37 |
38 | public String getTitle() {
39 | return title;
40 | }
41 |
42 | public String getDescription() {
43 | return description;
44 | }
45 |
46 | public int getScreenImage() {
47 | return screenImage;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/fragments/main/OnBackPressedListener.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.ui.fragments.main;
2 |
3 | /**
4 | * TODO: Description
5 | *
6 | * @author Nico Studt
7 | * @version 1.0.0
8 | * @created on 16.01.20
9 | * @updated on 16.01.20
10 | * @modified by
11 | */
12 | public interface OnBackPressedListener {
13 |
14 | boolean onBackPressed();
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/general/DataListener.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.ui.general;
2 |
3 |
4 | import com.schneewittchen.rosandroid.model.repositories.rosRepo.node.BaseData;
5 |
6 | /**
7 | * TODO: Description
8 | *
9 | * @author Nico Studt
10 | * @version 1.0.0
11 | * @created on 15.03.20
12 | * @updated on 15.03.20
13 | * @modified by
14 | */
15 | public interface DataListener {
16 |
17 | void onNewWidgetData(BaseData data);
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/general/Position.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.ui.general;
2 |
3 | /**
4 | * TODO: Description
5 | *
6 | * @author Nico Studt
7 | * @version 1.0.0
8 | * @created on 17.03.20
9 | * @updated on 17.03.20
10 | * @modified by
11 | */
12 | public class Position {
13 |
14 | public int x;
15 | public int y;
16 | public int width;
17 | public int height;
18 |
19 |
20 | public Position() {
21 | this(0, 0, 0, 0);
22 | }
23 |
24 | public Position(int x, int y, int width, int height) {
25 | this.x = x;
26 | this.y = y;
27 | this.width = width;
28 | this.height = height;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/general/TextChangeListener.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.ui.general;
2 |
3 | import android.text.Editable;
4 | import android.text.TextWatcher;
5 |
6 |
7 | /**
8 | * TODO: Description
9 | *
10 | * @author Nico Studt
11 | * @version 1.0.0
12 | * @created on 19.01.20
13 | * @updated on 19.01.20
14 | * @modified by
15 | */
16 |
17 | public abstract class TextChangeListener implements TextWatcher {
18 |
19 | private final T target;
20 |
21 |
22 | public TextChangeListener(T target) {
23 | this.target = target;
24 | }
25 |
26 | @Override
27 | public void beforeTextChanged(CharSequence s, int start, int count, int after) {
28 | return;
29 | // System.out.println("Before Text Changed: " + s);
30 | }
31 |
32 | @Override
33 | public void onTextChanged(CharSequence s, int start, int before, int count) {
34 | return;
35 | // System.out.println("On Text Changed: " + s);
36 | }
37 |
38 | @Override
39 | public void afterTextChanged(Editable s) {
40 | // System.out.println("After Text Changed: " + s.toString());
41 | this.onTextChanged(target, s);
42 | }
43 |
44 | public abstract void onTextChanged(T target, Editable s);
45 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/general/WidgetChangeListener.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.ui.general;
2 |
3 | import com.schneewittchen.rosandroid.model.entities.widgets.BaseEntity;
4 |
5 |
6 | /**
7 | * TODO: Description
8 | *
9 | * @author Nico Studt
10 | * @version 1.0.1
11 | * @created on 17.03.20
12 | * @updated on 27.10.2020
13 | * @modified by Nico Studt
14 | */
15 | public interface WidgetChangeListener {
16 |
17 | void onWidgetDetailsChanged(BaseEntity widgetEntity);
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/general/WidgetEditListener.java:
--------------------------------------------------------------------------------
1 | package com.schneewittchen.rosandroid.ui.general;
2 |
3 | import com.schneewittchen.rosandroid.model.entities.widgets.BaseEntity;
4 |
5 |
6 | /**
7 | * TODO: Description
8 | *
9 | * @author Sarthak Mittal
10 | * @version 1.0.1
11 | * @created on 01.07.21
12 | */
13 | public interface WidgetEditListener {
14 |
15 | void onWidgetEdited(BaseEntity widgetEntity, boolean updateConfig);
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/opengl/layer/CameraControlListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package com.schneewittchen.rosandroid.ui.opengl.layer;
18 |
19 | /**
20 | * @author damonkohler@google.com (Damon Kohler)
21 | */
22 | public interface CameraControlListener {
23 | void onTranslate(float distanceX, float distanceY);
24 |
25 | void onRotate(float focusX, float focusY, double deltaAngle);
26 |
27 | void onZoom(float focusX, float focusY, float factor);
28 |
29 | void onDoubleTap(float x, float y);
30 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/opengl/shape/GoalShape.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package com.schneewittchen.rosandroid.ui.opengl.shape;
18 |
19 | import com.schneewittchen.rosandroid.ui.opengl.visualisation.ROSColor;
20 |
21 | /**
22 | * Represents the robot's current goal pose.
23 | *
24 | * @author damonkohler@google.com (Damon Kohler)
25 | */
26 | public class GoalShape extends MetricSpacePoseShape {
27 |
28 | private static final ROSColor COLOR = ROSColor.fromHexAndAlpha("ff0000", 1f);
29 |
30 | public GoalShape() {
31 | super();
32 | setColor(COLOR);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/opengl/shape/MetricSpacePoiShape.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package com.schneewittchen.rosandroid.ui.opengl.shape;
18 |
19 |
20 | import com.schneewittchen.rosandroid.ui.opengl.visualisation.ROSColor;
21 |
22 | /**
23 | * Represents a pose.
24 | *
25 | * @author damonkohler@google.com (Damon Kohler)
26 | */
27 | public class MetricSpacePoiShape extends TriangleFanShape {
28 |
29 | private static final ROSColor COLOR = ROSColor.fromHexAndAlpha("377dfa", 1.0f);
30 | private static final float VERTICES[] = {
31 | -0.2f, 0.2f, 0.f,
32 | 0.2f, 0.2f, 0.f,
33 | 0.5f, 0.f, 0.f,
34 | 0.2f, -0.2f, 0.f,
35 | -0.2f, -0.2f, 0.f,
36 | -0.2f, 0.2f, 0.f
37 | };
38 |
39 | public MetricSpacePoiShape() {
40 | super(VERTICES, COLOR);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/opengl/shape/MetricSpacePoseShape.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package com.schneewittchen.rosandroid.ui.opengl.shape;
18 |
19 | import com.schneewittchen.rosandroid.ui.opengl.visualisation.ROSColor;
20 |
21 | /**
22 | * Represents a pose.
23 | *
24 | * @author damonkohler@google.com (Damon Kohler)
25 | */
26 | public class MetricSpacePoseShape extends TriangleFanShape {
27 |
28 | private static final ROSColor COLOR = ROSColor.fromHexAndAlpha("377dfa", 1.0f);
29 | private static final float VERTICES[] = {
30 | 0.2f, 0.f, 0.f,
31 | -0.2f, -0.15f, 0.f,
32 | -0.05f, 0.f, 0.f,
33 | -0.2f, 0.15f, 0.f,
34 | 0.2f, 0.f, 0.f
35 | };
36 |
37 | public MetricSpacePoseShape() {
38 | super(VERTICES, COLOR);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/opengl/shape/PixelSpacePoiShape.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package com.schneewittchen.rosandroid.ui.opengl.shape;
18 |
19 |
20 | import com.schneewittchen.rosandroid.ui.opengl.visualisation.VisualizationView;
21 |
22 | import javax.microedition.khronos.opengles.GL10;
23 |
24 |
25 | /**
26 | * Represents a pose.
27 | *
28 | * This shape is defined in pixel space and will not be affected by the zoom
29 | * level of the camera.
30 | *
31 | * @author damonkohler@google.com (Damon Kohler)
32 | */
33 | public class PixelSpacePoiShape extends MetricSpacePoiShape {
34 |
35 | private static final float PIXELS_PER_METER = 100.f;
36 |
37 |
38 | @Override
39 | protected void scale(VisualizationView view, GL10 gl) {
40 | // Adjust for metric scale definition of MetricSpacePoseShape vertices.
41 | gl.glScalef(PIXELS_PER_METER, PIXELS_PER_METER, 1.f);
42 | // Counter adjust for the camera zoom.
43 | gl.glScalef(1 / (float) view.getCamera().getZoom(),
44 | 1 / (float) view.getCamera().getZoom(),
45 | 1.0f);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/src/main/java/com/schneewittchen/rosandroid/ui/opengl/shape/PixelSpacePoseShape.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5 | * use this file except in compliance with the License. You may obtain a copy of
6 | * the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 |
17 | package com.schneewittchen.rosandroid.ui.opengl.shape;
18 |
19 | import com.schneewittchen.rosandroid.ui.opengl.visualisation.VisualizationView;
20 |
21 | import javax.microedition.khronos.opengles.GL10;
22 |
23 | /**
24 | * Represents a pose.
25 | *
26 |
27 |
28 |
--------------------------------------------------------------------------------
/doc/package-list:
--------------------------------------------------------------------------------
1 | com.schneewittchen.rosandroid.domain
2 | com.schneewittchen.rosandroid.model.db
3 | com.schneewittchen.rosandroid.model.entities
4 | com.schneewittchen.rosandroid.model.repositories
5 | com.schneewittchen.rosandroid.model.repositories.rosRepo
6 | com.schneewittchen.rosandroid.model.repositories.rosRepo.connection
7 | com.schneewittchen.rosandroid.model.repositories.rosRepo.message
8 | com.schneewittchen.rosandroid.model.repositories.rosRepo.node
9 | com.schneewittchen.rosandroid.ui.activity
10 | com.schneewittchen.rosandroid.ui.custum_views
11 | com.schneewittchen.rosandroid.ui.fragments
12 | com.schneewittchen.rosandroid.ui.helper
13 | com.schneewittchen.rosandroid.utility
14 | com.schneewittchen.rosandroid.viewmodel
15 | com.schneewittchen.rosandroid.widgets.base
16 | com.schneewittchen.rosandroid.widgets.joystick
17 | com.schneewittchen.rosandroid.widgets.test
18 |
--------------------------------------------------------------------------------
/doc/script.js:
--------------------------------------------------------------------------------
1 | function show(type)
2 | {
3 | count = 0;
4 | for (var key in methods) {
5 | var row = document.getElementById(key);
6 | if ((methods[key] & type) != 0) {
7 | row.style.display = '';
8 | row.className = (count++ % 2) ? rowColor : altColor;
9 | }
10 | else
11 | row.style.display = 'none';
12 | }
13 | updateTabs(type);
14 | }
15 |
16 | function updateTabs(type)
17 | {
18 | for (var value in tabs) {
19 | var sNode = document.getElementById(tabs[value][0]);
20 | var spanNode = sNode.firstChild;
21 | if (value == type) {
22 | sNode.className = activeTableTab;
23 | spanNode.innerHTML = tabs[value][1];
24 | }
25 | else {
26 | sNode.className = tableTab;
27 | spanNode.innerHTML = "" + tabs[value][1] + "";
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Oct 26 19:00:13 CET 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
7 |
--------------------------------------------------------------------------------
/images/Boat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/Boat.png
--------------------------------------------------------------------------------
/images/CameraDetails.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/CameraDetails.jpg
--------------------------------------------------------------------------------
/images/CameraViz.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/CameraViz.jpg
--------------------------------------------------------------------------------
/images/ExampleNodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/ExampleNodes.png
--------------------------------------------------------------------------------
/images/GPSDetails.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/GPSDetails.jpg
--------------------------------------------------------------------------------
/images/GPSViz.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/GPSViz.jpg
--------------------------------------------------------------------------------
/images/JoystickDetails.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/JoystickDetails.jpg
--------------------------------------------------------------------------------
/images/JoystickViz.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/JoystickViz.jpg
--------------------------------------------------------------------------------
/images/LawnMower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/LawnMower.png
--------------------------------------------------------------------------------
/images/MIRANA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/MIRANA.png
--------------------------------------------------------------------------------
/images/OccGridDetails.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/OccGridDetails.jpg
--------------------------------------------------------------------------------
/images/OccGridViz.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/OccGridViz.jpg
--------------------------------------------------------------------------------
/images/ShortExample01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/ShortExample01.jpg
--------------------------------------------------------------------------------
/images/ShortExample02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/ShortExample02.jpg
--------------------------------------------------------------------------------
/images/ShortExample03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/ShortExample03.jpg
--------------------------------------------------------------------------------
/images/ShortExample04.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/images/ShortExample04.jpg
--------------------------------------------------------------------------------
/jcraft/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/jcraft/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.3"
6 |
7 | defaultConfig {
8 | minSdkVersion 16
9 | targetSdkVersion 29
10 | versionCode 1
11 | versionName "1.0"
12 |
13 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
14 | consumerProguardFiles 'consumer-rules.pro'
15 | }
16 |
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 |
24 | }
25 |
26 | dependencies {
27 | implementation fileTree(dir: 'libs', include: ['*.jar'])
28 |
29 | implementation 'androidx.appcompat:appcompat:1.1.0'
30 | testImplementation 'junit:junit:4.13'
31 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
32 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
33 | }
34 |
--------------------------------------------------------------------------------
/jcraft/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ROS-Mobile/ROS-Mobile-Android/70a369d26810fdf38c51b6c857badcd6d2230e51/jcraft/consumer-rules.pro
--------------------------------------------------------------------------------
/jcraft/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/jcraft/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/DHEC256.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch;
31 |
32 | public class DHEC256 extends DHECN {
33 | public DHEC256(){
34 | sha_name="sha-256";
35 | key_size=256;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/DHEC384.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch;
31 |
32 | public class DHEC384 extends DHECN {
33 | public DHEC384(){
34 | sha_name="sha-384";
35 | key_size=384;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/DHEC521.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch;
31 |
32 | public class DHEC521 extends DHECN {
33 | public DHEC521(){
34 | sha_name="sha-512";
35 | key_size=521;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/DHGEX256.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch;
31 |
32 | public class DHGEX256 extends DHGEX {
33 | DHGEX256(){
34 | hash="sha-256";
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/KeyPairGenECDSA.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch;
31 |
32 | public interface KeyPairGenECDSA{
33 | void init(int key_size) throws Exception;
34 | byte[] getD();
35 | byte[] getR();
36 | byte[] getS();
37 | }
38 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/PBKDF.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2013-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch;
31 |
32 | public interface PBKDF {
33 | byte[] getKey(byte[] pass, byte[] salt, int iteration, int size);
34 | }
35 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/Random.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch;
31 |
32 | public interface Random{
33 | void fill(byte[] foo, int start, int len);
34 | }
35 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/SignatureECDSA.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch;
31 |
32 | public interface SignatureECDSA extends Signature {
33 | void setPubKey(byte[] r, byte[] s) throws Exception;
34 | void setPrvKey(byte[] s) throws Exception;
35 | }
36 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/SignatureRSA.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch;
31 |
32 | public interface SignatureRSA extends Signature {
33 | void setPubKey(byte[] e, byte[] n) throws Exception;
34 | void setPrvKey(byte[] d, byte[] n) throws Exception;
35 | }
36 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/jce/ECDH256.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch.jce;
31 |
32 | public class ECDH256 extends ECDHN implements com.jcraft.jsch.ECDH {
33 | public void init() throws Exception {
34 | super.init(256);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/jce/ECDH384.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch.jce;
31 |
32 | public class ECDH384 extends ECDHN implements com.jcraft.jsch.ECDH {
33 | public void init() throws Exception {
34 | super.init(384);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/jce/ECDH521.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch.jce;
31 |
32 | public class ECDH521 extends ECDHN implements com.jcraft.jsch.ECDH {
33 | public void init() throws Exception {
34 | super.init(521);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/jce/HMACSHA1.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch.jce;
31 |
32 | public class HMACSHA1 extends HMAC {
33 | public HMACSHA1(){
34 | name = "hmac-sha1";
35 | bsize = 20;
36 | algorithm = "HmacSHA1";
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/jce/HMACSHA256.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2012-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch.jce;
31 |
32 | public class HMACSHA256 extends HMAC {
33 | public HMACSHA256(){
34 | name = "hmac-sha2-256";
35 | bsize = 32;
36 | algorithm = "HmacSHA256";
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/jcraft/src/main/java/com/jcraft/jsch/jce/HMACSHA512.java:
--------------------------------------------------------------------------------
1 | /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
2 | /*
3 | Copyright (c) 2012-2018 ymnk, JCraft,Inc. All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | 1. Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the above copyright
12 | notice, this list of conditions and the following disclaimer in
13 | the documentation and/or other materials provided with the distribution.
14 |
15 | 3. The names of the authors may not be used to endorse or promote products
16 | derived from this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 | FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
21 | INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | */
29 |
30 | package com.jcraft.jsch.jce;
31 |
32 | public class HMACSHA512 extends HMAC {
33 | public HMACSHA512(){
34 | name = "hmac-sha2-512";
35 | bsize = 64;
36 | algorithm = "HmacSHA512";
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name='RosAndroid'
3 | include ':jcraft'
4 |
--------------------------------------------------------------------------------