Arduino-Redis
A Redis library for Arduino.
Public Member Functions | List of all members
RedisCommand Class Reference

Detailed Description

A Command (a specialized Array subclass): https://redis.io/topics/protocol#sending-commands-to-a-redis-server

Definition at line 133 of file RedisInternal.h.

Public Member Functions

 RedisCommand (String command)
 
 RedisCommand (String command, ArgList args)
 
std::shared_ptr< RedisObjectissue (Client &cmdClient)
 
template<typename T >
issue_typed (Client &cmdClient)
 
template<>
int issue_typed (Client &cmdClient)
 
template<>
bool issue_typed (Client &cmdClient)
 
template<>
String issue_typed (Client &cmdClient)
 
- Public Member Functions inherited from RedisArray
 RedisArray (Client &c)
 
void add (std::shared_ptr< RedisObject > param)
 
 operator std::vector< String > () const
 
virtual void init (Client &client) override
 
virtual String RESP () override
 
- Public Member Functions inherited from RedisObject
 RedisObject (Type tc)
 
 RedisObject (Type tc, Client &c)
 
virtual operator String ()
 
Type type () const
 

Additional Inherited Members

- Public Types inherited from RedisObject
enum  Type {
  NoType = '\0', SimpleString = '+', Error = '-', Integer = ':',
  BulkString = '$', Array = '*', InternalError = '!'
}
 
- Static Public Member Functions inherited from RedisObject
static std::shared_ptr< RedisObjectparseType (Client &)
 
- Protected Attributes inherited from RedisArray
std::vector< std::shared_ptr< RedisObject > > vec
 
- Protected Attributes inherited from RedisObject
String data
 
Type _type = Type::NoType
 

#include <RedisInternal.h>

Inheritance diagram for RedisCommand:
Inheritance graph
[legend]

Member Function Documentation

◆ issue()

std::shared_ptr< RedisObject > RedisCommand::issue ( Client &  cmdClient)

Issue the command on the bytestream represented by cmdClient.

Parameters
cmdClientThe client object representing the bytestream connection to a Redis server.
Returns
A shared pointer of a "RedisObject" representing a concrete subclass instantiated as a result of parsing the Redis server return value. Check RedisObject::type() to determine concrete type.

Definition at line 80 of file RedisInternal.cpp.